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 m00010_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];
57 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
58 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
59 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
60 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
61 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
62 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
63 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
64 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
65 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
66 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
67 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
68 salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
69 salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
70 salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14];
71 salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15];
73 const u32 salt_len = salt_bufs[salt_pos].salt_len;
79 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
81 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
83 const u32x pw_len = pw_l_len + pw_r_len;
86 * concat password candidate
89 u32x wordl0[4] = { 0 };
90 u32x wordl1[4] = { 0 };
91 u32x wordl2[4] = { 0 };
92 u32x wordl3[4] = { 0 };
94 wordl0[0] = pw_buf0[0];
95 wordl0[1] = pw_buf0[1];
96 wordl0[2] = pw_buf0[2];
97 wordl0[3] = pw_buf0[3];
98 wordl1[0] = pw_buf1[0];
99 wordl1[1] = pw_buf1[1];
100 wordl1[2] = pw_buf1[2];
101 wordl1[3] = pw_buf1[3];
103 u32x wordr0[4] = { 0 };
104 u32x wordr1[4] = { 0 };
105 u32x wordr2[4] = { 0 };
106 u32x wordr3[4] = { 0 };
108 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
109 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
110 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
111 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
112 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
113 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
114 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
115 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
117 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
119 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
123 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
131 w0[0] = wordl0[0] | wordr0[0];
132 w0[1] = wordl0[1] | wordr0[1];
133 w0[2] = wordl0[2] | wordr0[2];
134 w0[3] = wordl0[3] | wordr0[3];
135 w1[0] = wordl1[0] | wordr1[0];
136 w1[1] = wordl1[1] | wordr1[1];
137 w1[2] = wordl1[2] | wordr1[2];
138 w1[3] = wordl1[3] | wordr1[3];
139 w2[0] = wordl2[0] | wordr2[0];
140 w2[1] = wordl2[1] | wordr2[1];
141 w2[2] = wordl2[2] | wordr2[2];
142 w2[3] = wordl2[3] | wordr2[3];
143 w3[0] = wordl3[0] | wordr3[0];
144 w3[1] = wordl3[1] | wordr3[1];
145 w3[2] = wordl3[2] | wordr3[2];
146 w3[3] = wordl3[3] | wordr3[3];
157 s0[0] = salt_buf0[0];
158 s0[1] = salt_buf0[1];
159 s0[2] = salt_buf0[2];
160 s0[3] = salt_buf0[3];
161 s1[0] = salt_buf1[0];
162 s1[1] = salt_buf1[1];
163 s1[2] = salt_buf1[2];
164 s1[3] = salt_buf1[3];
165 s2[0] = salt_buf2[0];
166 s2[1] = salt_buf2[1];
167 s2[2] = salt_buf2[2];
168 s2[3] = salt_buf2[3];
169 s3[0] = salt_buf3[0];
170 s3[1] = salt_buf3[1];
171 s3[2] = salt_buf3[2];
172 s3[3] = salt_buf3[3];
174 switch_buffer_by_offset_le_VV (s0, s1, s2, s3, pw_len);
176 const u32x pw_salt_len = pw_len + salt_len;
192 w3[2] = pw_salt_len * 8;
204 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
205 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
206 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
207 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
208 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
209 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
210 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
211 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
212 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
213 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
214 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
215 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
216 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
217 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
218 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
219 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
221 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
222 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
223 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
224 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
225 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
226 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
227 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
228 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
229 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
230 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
231 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
232 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
233 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
234 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
235 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
236 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
238 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
239 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
240 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
241 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
242 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
243 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
244 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
245 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
246 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
247 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
248 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
249 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
250 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
251 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
252 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
253 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
255 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
256 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
257 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
258 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
259 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
260 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
261 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
262 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
263 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
264 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
265 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
266 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
267 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
268 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
269 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
270 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
272 COMPARE_M_SIMD (a, d, c, b);
276 __kernel void m00010_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)
280 __kernel void m00010_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)
284 __kernel void m00010_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)
290 const u32 lid = get_local_id (0);
296 const u32 gid = get_global_id (0);
298 if (gid >= gid_max) return;
303 pw_buf0[0] = pws[gid].i[0];
304 pw_buf0[1] = pws[gid].i[1];
305 pw_buf0[2] = pws[gid].i[2];
306 pw_buf0[3] = pws[gid].i[3];
307 pw_buf1[0] = pws[gid].i[4];
308 pw_buf1[1] = pws[gid].i[5];
309 pw_buf1[2] = pws[gid].i[6];
310 pw_buf1[3] = pws[gid].i[7];
312 const u32 pw_l_len = pws[gid].pw_len;
323 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
324 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
325 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
326 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
327 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
328 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
329 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
330 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
331 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
332 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
333 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
334 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
335 salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
336 salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
337 salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14];
338 salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15];
340 const u32 salt_len = salt_bufs[salt_pos].salt_len;
346 const u32 search[4] =
348 digests_buf[digests_offset].digest_buf[DGST_R0],
349 digests_buf[digests_offset].digest_buf[DGST_R1],
350 digests_buf[digests_offset].digest_buf[DGST_R2],
351 digests_buf[digests_offset].digest_buf[DGST_R3]
358 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
360 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
362 const u32x pw_len = pw_l_len + pw_r_len;
365 * concat password candidate
368 u32x wordl0[4] = { 0 };
369 u32x wordl1[4] = { 0 };
370 u32x wordl2[4] = { 0 };
371 u32x wordl3[4] = { 0 };
373 wordl0[0] = pw_buf0[0];
374 wordl0[1] = pw_buf0[1];
375 wordl0[2] = pw_buf0[2];
376 wordl0[3] = pw_buf0[3];
377 wordl1[0] = pw_buf1[0];
378 wordl1[1] = pw_buf1[1];
379 wordl1[2] = pw_buf1[2];
380 wordl1[3] = pw_buf1[3];
382 u32x wordr0[4] = { 0 };
383 u32x wordr1[4] = { 0 };
384 u32x wordr2[4] = { 0 };
385 u32x wordr3[4] = { 0 };
387 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
388 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
389 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
390 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
391 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
392 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
393 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
394 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
396 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
398 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
402 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
410 w0[0] = wordl0[0] | wordr0[0];
411 w0[1] = wordl0[1] | wordr0[1];
412 w0[2] = wordl0[2] | wordr0[2];
413 w0[3] = wordl0[3] | wordr0[3];
414 w1[0] = wordl1[0] | wordr1[0];
415 w1[1] = wordl1[1] | wordr1[1];
416 w1[2] = wordl1[2] | wordr1[2];
417 w1[3] = wordl1[3] | wordr1[3];
418 w2[0] = wordl2[0] | wordr2[0];
419 w2[1] = wordl2[1] | wordr2[1];
420 w2[2] = wordl2[2] | wordr2[2];
421 w2[3] = wordl2[3] | wordr2[3];
422 w3[0] = wordl3[0] | wordr3[0];
423 w3[1] = wordl3[1] | wordr3[1];
424 w3[2] = wordl3[2] | wordr3[2];
425 w3[3] = wordl3[3] | wordr3[3];
436 s0[0] = salt_buf0[0];
437 s0[1] = salt_buf0[1];
438 s0[2] = salt_buf0[2];
439 s0[3] = salt_buf0[3];
440 s1[0] = salt_buf1[0];
441 s1[1] = salt_buf1[1];
442 s1[2] = salt_buf1[2];
443 s1[3] = salt_buf1[3];
444 s2[0] = salt_buf2[0];
445 s2[1] = salt_buf2[1];
446 s2[2] = salt_buf2[2];
447 s2[3] = salt_buf2[3];
448 s3[0] = salt_buf3[0];
449 s3[1] = salt_buf3[1];
450 s3[2] = salt_buf3[2];
451 s3[3] = salt_buf3[3];
453 switch_buffer_by_offset_le_VV (s0, s1, s2, s3, pw_len);
455 const u32x pw_salt_len = pw_len + salt_len;
471 w3[2] = pw_salt_len * 8;
483 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
484 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
485 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
486 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
487 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
488 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
489 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
490 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
491 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
492 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
493 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
494 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
495 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
496 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
497 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
498 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
500 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
501 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
502 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
503 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
504 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
505 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
506 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
507 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
508 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
509 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
510 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
511 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
512 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
513 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
514 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
515 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
517 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
518 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
519 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
520 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
521 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
522 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
523 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
524 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
525 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
526 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
527 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
528 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
529 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
530 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
531 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
532 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
534 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
535 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
536 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
537 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
538 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
539 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
540 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
541 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
542 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
543 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
544 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
545 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
546 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
548 if (MATCHES_NONE_VS (a, search[0])) continue;
550 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
551 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
552 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
554 COMPARE_S_SIMD (a, d, c, b);
558 __kernel void m00010_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)
562 __kernel void m00010_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)