2 * Author......: Jens Steube <jens.steube@gmail.com>
10 #include "inc_vendor.cl"
11 #include "inc_hash_constants.h"
12 #include "inc_hash_functions.cl"
13 #include "inc_types.cl"
14 #include "inc_common.cl"
15 #include "inc_simd.cl"
18 #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i)])
20 #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
22 #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
24 #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])
26 #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])
29 __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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
35 const u32 gid = get_global_id (0);
36 const u32 lid = get_local_id (0);
38 if (gid >= gid_max) return;
47 pw_buf0[0] = pws[gid].i[0];
48 pw_buf0[1] = pws[gid].i[1];
49 pw_buf0[2] = pws[gid].i[2];
50 pw_buf0[3] = pws[gid].i[3];
51 pw_buf1[0] = pws[gid].i[4];
52 pw_buf1[1] = pws[gid].i[5];
53 pw_buf1[2] = pws[gid].i[6];
54 pw_buf1[3] = pws[gid].i[7];
56 const u32 pw_l_len = pws[gid].pw_len;
64 salt_buf[0] = salt_bufs[salt_pos].salt_buf[0];
65 salt_buf[1] = salt_bufs[salt_pos].salt_buf[1];
66 salt_buf[2] = salt_bufs[salt_pos].salt_buf[2];
67 salt_buf[3] = salt_bufs[salt_pos].salt_buf[3];
68 salt_buf[4] = salt_bufs[salt_pos].salt_buf[4];
70 const u32 salt_len = salt_bufs[salt_pos].salt_len;
76 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
78 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
80 const u32x pw_len = pw_l_len + pw_r_len;
82 const u32x pw_salt_len = pw_len + salt_len;
85 * concat password candidate
88 u32x wordl0[4] = { 0 };
89 u32x wordl1[4] = { 0 };
90 u32x wordl2[4] = { 0 };
91 u32x wordl3[4] = { 0 };
93 wordl0[0] = pw_buf0[0];
94 wordl0[1] = pw_buf0[1];
95 wordl0[2] = pw_buf0[2];
96 wordl0[3] = pw_buf0[3];
97 wordl1[0] = pw_buf1[0];
98 wordl1[1] = pw_buf1[1];
99 wordl1[2] = pw_buf1[2];
100 wordl1[3] = pw_buf1[3];
102 u32x wordr0[4] = { 0 };
103 u32x wordr1[4] = { 0 };
104 u32x wordr2[4] = { 0 };
105 u32x wordr3[4] = { 0 };
107 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
108 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
109 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
110 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
111 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
112 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
113 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
114 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
116 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
118 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
122 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
130 w0[0] = wordl0[0] | wordr0[0];
131 w0[1] = wordl0[1] | wordr0[1];
132 w0[2] = wordl0[2] | wordr0[2];
133 w0[3] = wordl0[3] | wordr0[3];
134 w1[0] = wordl1[0] | wordr1[0];
135 w1[1] = wordl1[1] | wordr1[1];
136 w1[2] = wordl1[2] | wordr1[2];
137 w1[3] = wordl1[3] | wordr1[3];
138 w2[0] = wordl2[0] | wordr2[0];
139 w2[1] = wordl2[1] | wordr2[1];
140 w2[2] = wordl2[2] | wordr2[2];
141 w2[3] = wordl2[3] | wordr2[3];
142 w3[0] = wordl3[0] | wordr3[0];
143 w3[1] = wordl3[1] | wordr3[1];
144 w3[2] = wordl3[2] | wordr3[2];
145 w3[3] = wordl3[3] | wordr3[3];
173 switch_buffer_by_offset_le_VV (s0, s1, s2, s3, pw_len);
196 switch_buffer_by_offset_le (w0, w1, w2, w3, 1);
198 w0[0] |= salt_buf[4];
200 w3[2] = pw_salt_len * 8;
212 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
213 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
214 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
215 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
216 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
217 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
218 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
219 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
220 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
221 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
222 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
223 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
224 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
225 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
226 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
227 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
229 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
230 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
231 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
232 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
233 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
234 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
235 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
236 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
237 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
238 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
239 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
240 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
241 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
242 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
243 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
244 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
246 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
247 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
248 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
249 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
250 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
251 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
252 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
253 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
254 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
255 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
256 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
257 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
258 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
259 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
260 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
261 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
263 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
264 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
265 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
266 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
267 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
268 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
269 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
270 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
271 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
272 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
273 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
274 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
275 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
276 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
277 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
278 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
280 COMPARE_M_SIMD (a, d, c, b);
284 __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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
288 __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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
292 __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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 const u32 gid = get_global_id (0);
299 const u32 lid = get_local_id (0);
301 if (gid >= gid_max) return;
310 pw_buf0[0] = pws[gid].i[0];
311 pw_buf0[1] = pws[gid].i[1];
312 pw_buf0[2] = pws[gid].i[2];
313 pw_buf0[3] = pws[gid].i[3];
314 pw_buf1[0] = pws[gid].i[4];
315 pw_buf1[1] = pws[gid].i[5];
316 pw_buf1[2] = pws[gid].i[6];
317 pw_buf1[3] = pws[gid].i[7];
319 const u32 pw_l_len = pws[gid].pw_len;
327 salt_buf[0] = salt_bufs[salt_pos].salt_buf[0];
328 salt_buf[1] = salt_bufs[salt_pos].salt_buf[1];
329 salt_buf[2] = salt_bufs[salt_pos].salt_buf[2];
330 salt_buf[3] = salt_bufs[salt_pos].salt_buf[3];
331 salt_buf[4] = salt_bufs[salt_pos].salt_buf[4];
333 const u32 salt_len = salt_bufs[salt_pos].salt_len;
339 const u32 search[4] =
341 digests_buf[digests_offset].digest_buf[DGST_R0],
342 digests_buf[digests_offset].digest_buf[DGST_R1],
343 digests_buf[digests_offset].digest_buf[DGST_R2],
344 digests_buf[digests_offset].digest_buf[DGST_R3]
351 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
353 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
355 const u32x pw_len = pw_l_len + pw_r_len;
357 const u32x pw_salt_len = pw_len + salt_len;
360 * concat password candidate
363 u32x wordl0[4] = { 0 };
364 u32x wordl1[4] = { 0 };
365 u32x wordl2[4] = { 0 };
366 u32x wordl3[4] = { 0 };
368 wordl0[0] = pw_buf0[0];
369 wordl0[1] = pw_buf0[1];
370 wordl0[2] = pw_buf0[2];
371 wordl0[3] = pw_buf0[3];
372 wordl1[0] = pw_buf1[0];
373 wordl1[1] = pw_buf1[1];
374 wordl1[2] = pw_buf1[2];
375 wordl1[3] = pw_buf1[3];
377 u32x wordr0[4] = { 0 };
378 u32x wordr1[4] = { 0 };
379 u32x wordr2[4] = { 0 };
380 u32x wordr3[4] = { 0 };
382 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
383 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
384 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
385 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
386 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
387 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
388 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
389 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
391 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
393 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
397 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
405 w0[0] = wordl0[0] | wordr0[0];
406 w0[1] = wordl0[1] | wordr0[1];
407 w0[2] = wordl0[2] | wordr0[2];
408 w0[3] = wordl0[3] | wordr0[3];
409 w1[0] = wordl1[0] | wordr1[0];
410 w1[1] = wordl1[1] | wordr1[1];
411 w1[2] = wordl1[2] | wordr1[2];
412 w1[3] = wordl1[3] | wordr1[3];
413 w2[0] = wordl2[0] | wordr2[0];
414 w2[1] = wordl2[1] | wordr2[1];
415 w2[2] = wordl2[2] | wordr2[2];
416 w2[3] = wordl2[3] | wordr2[3];
417 w3[0] = wordl3[0] | wordr3[0];
418 w3[1] = wordl3[1] | wordr3[1];
419 w3[2] = wordl3[2] | wordr3[2];
420 w3[3] = wordl3[3] | wordr3[3];
448 switch_buffer_by_offset_le_VV (s0, s1, s2, s3, pw_len);
471 switch_buffer_by_offset_le (w0, w1, w2, w3, 1);
473 w0[0] |= salt_buf[4];
475 w3[2] = pw_salt_len * 8;
487 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
488 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
489 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
490 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
491 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
492 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
493 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
494 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
495 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
496 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
497 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
498 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
499 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
500 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
501 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
502 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
504 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
505 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
506 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
507 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
508 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
509 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
510 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
511 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
512 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
513 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
514 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
515 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
516 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
517 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
518 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
519 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
521 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
522 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
523 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
524 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
525 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
526 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
527 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
528 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
529 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
530 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
531 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
532 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
533 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
534 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
535 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
536 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
538 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
539 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
540 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
541 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
542 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
543 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
544 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
545 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
546 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
547 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
548 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
549 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
550 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
552 if (MATCHES_NONE_VS (a, search[0])) continue;
554 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
555 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
556 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
558 COMPARE_S_SIMD (a, d, c, b);
562 __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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
566 __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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)