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"
19 __kernel void m00030_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)
25 const u32 lid = get_local_id (0);
31 const u32 gid = get_global_id (0);
33 if (gid >= gid_max) return;
38 pw_buf0[0] = pws[gid].i[0];
39 pw_buf0[1] = pws[gid].i[1];
40 pw_buf0[2] = pws[gid].i[2];
41 pw_buf0[3] = pws[gid].i[3];
42 pw_buf1[0] = pws[gid].i[4];
43 pw_buf1[1] = pws[gid].i[5];
44 pw_buf1[2] = pws[gid].i[6];
45 pw_buf1[3] = pws[gid].i[7];
47 const u32 pw_l_len = pws[gid].pw_len;
58 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
59 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
60 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
61 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
62 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
63 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
64 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
65 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
66 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
67 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
68 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
69 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
70 salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
71 salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
72 salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14];
73 salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15];
75 const u32 salt_len = salt_bufs[salt_pos].salt_len;
81 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
83 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
85 const u32x pw_len = pw_l_len + pw_r_len;
88 * concat password candidate
91 u32x wordl0[4] = { 0 };
92 u32x wordl1[4] = { 0 };
93 u32x wordl2[4] = { 0 };
94 u32x wordl3[4] = { 0 };
96 wordl0[0] = pw_buf0[0];
97 wordl0[1] = pw_buf0[1];
98 wordl0[2] = pw_buf0[2];
99 wordl0[3] = pw_buf0[3];
100 wordl1[0] = pw_buf1[0];
101 wordl1[1] = pw_buf1[1];
102 wordl1[2] = pw_buf1[2];
103 wordl1[3] = pw_buf1[3];
105 u32x wordr0[4] = { 0 };
106 u32x wordr1[4] = { 0 };
107 u32x wordr2[4] = { 0 };
108 u32x wordr3[4] = { 0 };
110 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
111 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
112 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
113 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
114 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
115 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
116 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
117 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
119 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
121 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
125 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
133 w0[0] = wordl0[0] | wordr0[0];
134 w0[1] = wordl0[1] | wordr0[1];
135 w0[2] = wordl0[2] | wordr0[2];
136 w0[3] = wordl0[3] | wordr0[3];
137 w1[0] = wordl1[0] | wordr1[0];
138 w1[1] = wordl1[1] | wordr1[1];
139 w1[2] = wordl1[2] | wordr1[2];
140 w1[3] = wordl1[3] | wordr1[3];
141 w2[0] = wordl2[0] | wordr2[0];
142 w2[1] = wordl2[1] | wordr2[1];
143 w2[2] = wordl2[2] | wordr2[2];
144 w2[3] = wordl2[3] | wordr2[3];
145 w3[0] = wordl3[0] | wordr3[0];
146 w3[1] = wordl3[1] | wordr3[1];
147 w3[2] = wordl3[2] | wordr3[2];
148 w3[3] = wordl3[3] | wordr3[3];
150 make_unicode (w1, w2, w3);
151 make_unicode (w0, w0, w1);
153 const u32x pw_len2 = pw_len * 2;
164 s0[0] = salt_buf0[0];
165 s0[1] = salt_buf0[1];
166 s0[2] = salt_buf0[2];
167 s0[3] = salt_buf0[3];
168 s1[0] = salt_buf1[0];
169 s1[1] = salt_buf1[1];
170 s1[2] = salt_buf1[2];
171 s1[3] = salt_buf1[3];
172 s2[0] = salt_buf2[0];
173 s2[1] = salt_buf2[1];
174 s2[2] = salt_buf2[2];
175 s2[3] = salt_buf2[3];
176 s3[0] = salt_buf3[0];
177 s3[1] = salt_buf3[1];
178 s3[2] = salt_buf3[2];
179 s3[3] = salt_buf3[3];
181 switch_buffer_by_offset_le_VV (s0, s1, s2, s3, pw_len2);
183 const u32x pw_salt_len = pw_len2 + salt_len;
199 w3[2] = pw_salt_len * 8;
211 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
212 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
213 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
214 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
215 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
216 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
217 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
218 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
219 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
220 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
221 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
222 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
223 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
224 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
225 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
226 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
228 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
229 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
230 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
231 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
232 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
233 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
234 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
235 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
236 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
237 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
238 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
239 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
240 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
241 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
242 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
243 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
245 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
246 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
247 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
248 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
249 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
250 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
251 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
252 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
253 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
254 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
255 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
256 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
257 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
258 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
259 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
260 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
262 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
263 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
264 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
265 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
266 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
267 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
268 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
269 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
270 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
271 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
272 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
273 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
274 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
275 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
276 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
277 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
279 COMPARE_M_SIMD (a, d, c, b);
283 __kernel void m00030_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)
287 __kernel void m00030_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)
291 __kernel void m00030_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)
297 const u32 lid = get_local_id (0);
303 const u32 gid = get_global_id (0);
305 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;
330 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
331 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
332 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
333 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
334 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
335 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
336 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
337 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
338 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
339 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
340 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
341 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
342 salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
343 salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
344 salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14];
345 salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15];
347 const u32 salt_len = salt_bufs[salt_pos].salt_len;
353 const u32 search[4] =
355 digests_buf[digests_offset].digest_buf[DGST_R0],
356 digests_buf[digests_offset].digest_buf[DGST_R1],
357 digests_buf[digests_offset].digest_buf[DGST_R2],
358 digests_buf[digests_offset].digest_buf[DGST_R3]
365 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
367 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
369 const u32x pw_len = pw_l_len + pw_r_len;
372 * concat password candidate
375 u32x wordl0[4] = { 0 };
376 u32x wordl1[4] = { 0 };
377 u32x wordl2[4] = { 0 };
378 u32x wordl3[4] = { 0 };
380 wordl0[0] = pw_buf0[0];
381 wordl0[1] = pw_buf0[1];
382 wordl0[2] = pw_buf0[2];
383 wordl0[3] = pw_buf0[3];
384 wordl1[0] = pw_buf1[0];
385 wordl1[1] = pw_buf1[1];
386 wordl1[2] = pw_buf1[2];
387 wordl1[3] = pw_buf1[3];
389 u32x wordr0[4] = { 0 };
390 u32x wordr1[4] = { 0 };
391 u32x wordr2[4] = { 0 };
392 u32x wordr3[4] = { 0 };
394 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
395 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
396 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
397 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
398 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
399 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
400 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
401 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
403 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
405 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
409 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
417 w0[0] = wordl0[0] | wordr0[0];
418 w0[1] = wordl0[1] | wordr0[1];
419 w0[2] = wordl0[2] | wordr0[2];
420 w0[3] = wordl0[3] | wordr0[3];
421 w1[0] = wordl1[0] | wordr1[0];
422 w1[1] = wordl1[1] | wordr1[1];
423 w1[2] = wordl1[2] | wordr1[2];
424 w1[3] = wordl1[3] | wordr1[3];
425 w2[0] = wordl2[0] | wordr2[0];
426 w2[1] = wordl2[1] | wordr2[1];
427 w2[2] = wordl2[2] | wordr2[2];
428 w2[3] = wordl2[3] | wordr2[3];
429 w3[0] = wordl3[0] | wordr3[0];
430 w3[1] = wordl3[1] | wordr3[1];
431 w3[2] = wordl3[2] | wordr3[2];
432 w3[3] = wordl3[3] | wordr3[3];
434 make_unicode (w1, w2, w3);
435 make_unicode (w0, w0, w1);
437 const u32x pw_len2 = pw_len * 2;
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_len2);
467 const u32x pw_salt_len = pw_len2 + salt_len;
483 w3[2] = pw_salt_len * 8;
495 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
496 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
497 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
498 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
499 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
500 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
501 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
502 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
503 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
504 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
505 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
506 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
507 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
508 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
509 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
510 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
512 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
513 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
514 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
515 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
516 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
517 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
518 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
519 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
520 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
521 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
522 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
523 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
524 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
525 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
526 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
527 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
529 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
530 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
531 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
532 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
533 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
534 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
535 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
536 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
537 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
538 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
539 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
540 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
541 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
542 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
543 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
544 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
546 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
547 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
548 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
549 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
550 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
551 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
552 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
553 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
554 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
555 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
556 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
557 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
558 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
560 if (MATCHES_NONE_VS (a, search[0])) continue;
562 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
563 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
564 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
566 COMPARE_S_SIMD (a, d, c, b);
570 __kernel void m00030_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)
574 __kernel void m00030_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)