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"
17 __kernel void m02410_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)
23 const u32 lid = get_local_id (0);
29 const u32 gid = get_global_id (0);
31 if (gid >= gid_max) return;
36 pw_buf0[0] = pws[gid].i[0];
37 pw_buf0[1] = pws[gid].i[1];
38 pw_buf0[2] = pws[gid].i[2];
39 pw_buf0[3] = pws[gid].i[3];
40 pw_buf1[0] = pws[gid].i[4];
41 pw_buf1[1] = pws[gid].i[5];
42 pw_buf1[2] = pws[gid].i[6];
43 pw_buf1[3] = pws[gid].i[7];
45 const u32 pw_l_len = pws[gid].pw_len;
56 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
77 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
79 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
81 const u32x pw_len = pw_l_len + pw_r_len;
84 * concat password candidate
87 u32x wordl0[4] = { 0 };
88 u32x wordl1[4] = { 0 };
89 u32x wordl2[4] = { 0 };
90 u32x wordl3[4] = { 0 };
92 wordl0[0] = pw_buf0[0];
93 wordl0[1] = pw_buf0[1];
94 wordl0[2] = pw_buf0[2];
95 wordl0[3] = pw_buf0[3];
96 wordl1[0] = pw_buf1[0];
97 wordl1[1] = pw_buf1[1];
98 wordl1[2] = pw_buf1[2];
99 wordl1[3] = pw_buf1[3];
101 u32x wordr0[4] = { 0 };
102 u32x wordr1[4] = { 0 };
103 u32x wordr2[4] = { 0 };
104 u32x wordr3[4] = { 0 };
106 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
107 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
108 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
109 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
110 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
111 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
112 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
113 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
115 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
117 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
121 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
129 w0[0] = wordl0[0] | wordr0[0];
130 w0[1] = wordl0[1] | wordr0[1];
131 w0[2] = wordl0[2] | wordr0[2];
132 w0[3] = wordl0[3] | wordr0[3];
133 w1[0] = wordl1[0] | wordr1[0];
134 w1[1] = wordl1[1] | wordr1[1];
135 w1[2] = wordl1[2] | wordr1[2];
136 w1[3] = wordl1[3] | wordr1[3];
137 w2[0] = wordl2[0] | wordr2[0];
138 w2[1] = wordl2[1] | wordr2[1];
139 w2[2] = wordl2[2] | wordr2[2];
140 w2[3] = wordl2[3] | wordr2[3];
141 w3[0] = wordl3[0] | wordr3[0];
142 w3[1] = wordl3[1] | wordr3[1];
143 w3[2] = wordl3[2] | wordr3[2];
144 w3[3] = wordl3[3] | wordr3[3];
155 s0[0] = salt_buf0[0];
156 s0[1] = salt_buf0[1];
157 s0[2] = salt_buf0[2];
158 s0[3] = salt_buf0[3];
159 s1[0] = salt_buf1[0];
160 s1[1] = salt_buf1[1];
161 s1[2] = salt_buf1[2];
162 s1[3] = salt_buf1[3];
163 s2[0] = salt_buf2[0];
164 s2[1] = salt_buf2[1];
165 s2[2] = salt_buf2[2];
166 s2[3] = salt_buf2[3];
167 s3[0] = salt_buf3[0];
168 s3[1] = salt_buf3[1];
169 s3[2] = salt_buf3[2];
170 s3[3] = salt_buf3[3];
172 switch_buffer_by_offset_le_VV (s0, s1, s2, s3, pw_len);
213 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
214 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
215 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
216 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
217 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
218 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
219 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
220 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
221 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
222 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
223 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
224 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
225 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
226 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
227 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
228 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
230 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
231 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
232 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
233 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
234 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
235 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
236 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
237 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
238 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
239 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
240 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
241 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
242 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
243 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
244 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
245 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
247 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
248 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
249 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
250 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
251 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
252 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
253 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
254 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
255 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
256 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
257 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
258 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
259 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
260 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
261 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
262 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
264 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
265 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
266 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
267 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
268 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
269 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
270 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
271 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
272 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
273 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
274 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
275 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
276 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
277 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
278 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
279 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
286 COMPARE_M_SIMD (a, d, c, b);
290 __kernel void m02410_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)
294 __kernel void m02410_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)
298 __kernel void m02410_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)
304 const u32 lid = get_local_id (0);
310 const u32 gid = get_global_id (0);
312 if (gid >= gid_max) return;
317 pw_buf0[0] = pws[gid].i[0];
318 pw_buf0[1] = pws[gid].i[1];
319 pw_buf0[2] = pws[gid].i[2];
320 pw_buf0[3] = pws[gid].i[3];
321 pw_buf1[0] = pws[gid].i[4];
322 pw_buf1[1] = pws[gid].i[5];
323 pw_buf1[2] = pws[gid].i[6];
324 pw_buf1[3] = pws[gid].i[7];
326 const u32 pw_l_len = pws[gid].pw_len;
337 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
358 const u32 search[4] =
360 digests_buf[digests_offset].digest_buf[DGST_R0],
361 digests_buf[digests_offset].digest_buf[DGST_R1],
362 digests_buf[digests_offset].digest_buf[DGST_R2],
363 digests_buf[digests_offset].digest_buf[DGST_R3]
370 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
372 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
374 const u32x pw_len = pw_l_len + pw_r_len;
377 * concat password candidate
380 u32x wordl0[4] = { 0 };
381 u32x wordl1[4] = { 0 };
382 u32x wordl2[4] = { 0 };
383 u32x wordl3[4] = { 0 };
385 wordl0[0] = pw_buf0[0];
386 wordl0[1] = pw_buf0[1];
387 wordl0[2] = pw_buf0[2];
388 wordl0[3] = pw_buf0[3];
389 wordl1[0] = pw_buf1[0];
390 wordl1[1] = pw_buf1[1];
391 wordl1[2] = pw_buf1[2];
392 wordl1[3] = pw_buf1[3];
394 u32x wordr0[4] = { 0 };
395 u32x wordr1[4] = { 0 };
396 u32x wordr2[4] = { 0 };
397 u32x wordr3[4] = { 0 };
399 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
400 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
401 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
402 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
403 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
404 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
405 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
406 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
408 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
410 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
414 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
422 w0[0] = wordl0[0] | wordr0[0];
423 w0[1] = wordl0[1] | wordr0[1];
424 w0[2] = wordl0[2] | wordr0[2];
425 w0[3] = wordl0[3] | wordr0[3];
426 w1[0] = wordl1[0] | wordr1[0];
427 w1[1] = wordl1[1] | wordr1[1];
428 w1[2] = wordl1[2] | wordr1[2];
429 w1[3] = wordl1[3] | wordr1[3];
430 w2[0] = wordl2[0] | wordr2[0];
431 w2[1] = wordl2[1] | wordr2[1];
432 w2[2] = wordl2[2] | wordr2[2];
433 w2[3] = wordl2[3] | wordr2[3];
434 w3[0] = wordl3[0] | wordr3[0];
435 w3[1] = wordl3[1] | wordr3[1];
436 w3[2] = wordl3[2] | wordr3[2];
437 w3[3] = wordl3[3] | wordr3[3];
448 s0[0] = salt_buf0[0];
449 s0[1] = salt_buf0[1];
450 s0[2] = salt_buf0[2];
451 s0[3] = salt_buf0[3];
452 s1[0] = salt_buf1[0];
453 s1[1] = salt_buf1[1];
454 s1[2] = salt_buf1[2];
455 s1[3] = salt_buf1[3];
456 s2[0] = salt_buf2[0];
457 s2[1] = salt_buf2[1];
458 s2[2] = salt_buf2[2];
459 s2[3] = salt_buf2[3];
460 s3[0] = salt_buf3[0];
461 s3[1] = salt_buf3[1];
462 s3[2] = salt_buf3[2];
463 s3[3] = salt_buf3[3];
465 switch_buffer_by_offset_le_VV (s0, s1, s2, s3, pw_len);
506 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
507 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
508 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
509 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
510 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
511 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
512 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
513 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
514 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
515 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
516 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
517 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
518 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
519 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
520 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
521 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
523 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
524 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
525 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
526 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
527 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
528 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
529 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
530 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
531 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
532 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
533 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
534 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
535 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
536 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
537 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
538 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
540 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
541 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
542 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
543 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
544 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
545 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
546 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
547 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
548 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
549 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
550 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
551 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
552 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
553 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
554 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
555 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
557 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
558 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
559 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
560 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
561 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
562 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
563 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
564 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
565 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
566 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
567 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
568 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
569 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
571 if (MATCHES_NONE_VS ((a & 0x00ffffff), search[0])) continue;
573 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
574 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
575 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
582 COMPARE_S_SIMD (a, d, c, b);
586 __kernel void m02410_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)
590 __kernel void m02410_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)