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"
17 #include "inc_simd.cl"
19 __kernel void m03800_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_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)
88 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
94 const u32x out_salt_len = out_len + salt_len;
96 switch_buffer_by_offset_le_VV (w0, w1, w2, w3, salt_len);
98 w0[0] |= salt_buf0[0];
99 w0[1] |= salt_buf0[1];
100 w0[2] |= salt_buf0[2];
101 w0[3] |= salt_buf0[3];
102 w1[0] |= salt_buf1[0];
103 w1[1] |= salt_buf1[1];
104 w1[2] |= salt_buf1[2];
105 w1[3] |= salt_buf1[3];
106 w2[0] |= salt_buf2[0];
107 w2[1] |= salt_buf2[1];
108 w2[2] |= salt_buf2[2];
109 w2[3] |= salt_buf2[3];
110 w3[0] |= salt_buf3[0];
111 w3[1] |= salt_buf3[1];
112 w3[2] |= salt_buf3[2];
113 w3[3] |= salt_buf3[3];
124 s0[0] = salt_buf0[0];
125 s0[1] = salt_buf0[1];
126 s0[2] = salt_buf0[2];
127 s0[3] = salt_buf0[3];
128 s1[0] = salt_buf1[0];
129 s1[1] = salt_buf1[1];
130 s1[2] = salt_buf1[2];
131 s1[3] = salt_buf1[3];
132 s2[0] = salt_buf2[0];
133 s2[1] = salt_buf2[1];
134 s2[2] = salt_buf2[2];
135 s2[3] = salt_buf2[3];
136 s3[0] = salt_buf3[0];
137 s3[1] = salt_buf3[1];
138 s3[2] = salt_buf3[2];
139 s3[3] = salt_buf3[3];
141 switch_buffer_by_offset_le_VV (s0, s1, s2, s3, out_salt_len);
160 const u32x salt_out_salt_len = salt_len + out_len + salt_len;
162 append_0x80_4x4_VV (w0, w1, w2, w3, salt_out_salt_len);
164 w3[2] = salt_out_salt_len * 8;
176 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
177 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
178 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
179 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
180 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
181 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
182 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
183 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
184 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
185 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
186 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
187 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
188 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
189 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
190 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
191 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
193 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
194 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
195 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
196 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
197 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
198 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
199 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
200 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
201 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
202 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
203 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
204 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
205 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
206 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
207 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
208 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
210 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
211 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
212 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
213 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
214 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
215 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
216 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
217 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
218 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
219 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
220 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
221 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
222 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
223 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
224 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
225 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
227 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
228 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
229 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
230 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
231 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
232 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
233 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
234 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
235 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
236 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
237 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
238 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
239 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
240 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
241 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
242 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
244 COMPARE_M_SIMD (a, d, c, b);
248 __kernel void m03800_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)
252 __kernel void m03800_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)
256 __kernel void m03800_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)
262 const u32 lid = get_local_id (0);
268 const u32 gid = get_global_id (0);
270 if (gid >= gid_max) return;
275 pw_buf0[0] = pws[gid].i[0];
276 pw_buf0[1] = pws[gid].i[1];
277 pw_buf0[2] = pws[gid].i[2];
278 pw_buf0[3] = pws[gid].i[3];
279 pw_buf1[0] = pws[gid].i[4];
280 pw_buf1[1] = pws[gid].i[5];
281 pw_buf1[2] = pws[gid].i[6];
282 pw_buf1[3] = pws[gid].i[7];
284 const u32 pw_len = pws[gid].pw_len;
295 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
296 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
297 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
298 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
299 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
300 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
301 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
302 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
303 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
304 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
305 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
306 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
307 salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
308 salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
309 salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14];
310 salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15];
312 const u32 salt_len = salt_bufs[salt_pos].salt_len;
318 const u32 search[4] =
320 digests_buf[digests_offset].digest_buf[DGST_R0],
321 digests_buf[digests_offset].digest_buf[DGST_R1],
322 digests_buf[digests_offset].digest_buf[DGST_R2],
323 digests_buf[digests_offset].digest_buf[DGST_R3]
330 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
337 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
343 const u32x out_salt_len = out_len + salt_len;
345 switch_buffer_by_offset_le_VV (w0, w1, w2, w3, salt_len);
347 w0[0] |= salt_buf0[0];
348 w0[1] |= salt_buf0[1];
349 w0[2] |= salt_buf0[2];
350 w0[3] |= salt_buf0[3];
351 w1[0] |= salt_buf1[0];
352 w1[1] |= salt_buf1[1];
353 w1[2] |= salt_buf1[2];
354 w1[3] |= salt_buf1[3];
355 w2[0] |= salt_buf2[0];
356 w2[1] |= salt_buf2[1];
357 w2[2] |= salt_buf2[2];
358 w2[3] |= salt_buf2[3];
359 w3[0] |= salt_buf3[0];
360 w3[1] |= salt_buf3[1];
361 w3[2] |= salt_buf3[2];
362 w3[3] |= salt_buf3[3];
373 s0[0] = salt_buf0[0];
374 s0[1] = salt_buf0[1];
375 s0[2] = salt_buf0[2];
376 s0[3] = salt_buf0[3];
377 s1[0] = salt_buf1[0];
378 s1[1] = salt_buf1[1];
379 s1[2] = salt_buf1[2];
380 s1[3] = salt_buf1[3];
381 s2[0] = salt_buf2[0];
382 s2[1] = salt_buf2[1];
383 s2[2] = salt_buf2[2];
384 s2[3] = salt_buf2[3];
385 s3[0] = salt_buf3[0];
386 s3[1] = salt_buf3[1];
387 s3[2] = salt_buf3[2];
388 s3[3] = salt_buf3[3];
390 switch_buffer_by_offset_le_VV (s0, s1, s2, s3, out_salt_len);
409 const u32x salt_out_salt_len = salt_len + out_len + salt_len;
411 append_0x80_4x4_VV (w0, w1, w2, w3, salt_out_salt_len);
413 w3[2] = salt_out_salt_len * 8;
425 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
426 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
427 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
428 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
429 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
430 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
431 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
432 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
433 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
434 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
435 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
436 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
437 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
438 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
439 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
440 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
442 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
443 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
444 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
445 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
446 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
447 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
448 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
449 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
450 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
451 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
452 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
453 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
454 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
455 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
456 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
457 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
459 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
460 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
461 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
462 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
463 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
464 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
465 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
466 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
467 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
468 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
469 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
470 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
471 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
472 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
473 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
474 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
476 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
477 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
478 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
479 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
480 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
481 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
482 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
483 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
484 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
485 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
486 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
487 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
488 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
490 if (MATCHES_NONE_VS (a, search[0])) continue;
492 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
493 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
494 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
496 COMPARE_S_SIMD (a, d, c, b);
500 __kernel void m03800_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)
504 __kernel void m03800_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)