2 * Author......: Jens Steube <jens.steube@gmail.com>
10 #include "include/constants.h"
11 #include "include/kernel_vendor.h"
18 #include "include/kernel_functions.c"
19 #include "OpenCL/types_ocl.c"
20 #include "OpenCL/common.c"
21 #include "OpenCL/simd.c"
23 void m03800m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __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_scryptV_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)
29 const u32 gid = get_global_id (0);
30 const u32 lid = get_local_id (0);
41 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
42 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
43 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
44 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
45 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
46 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
47 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
48 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
49 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
50 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
51 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
52 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
53 salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
54 salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
55 salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14];
56 salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15];
63 salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0];
64 salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1];
65 salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2];
66 salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3];
67 salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4];
68 salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5];
69 salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6];
70 salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7];
71 salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8];
72 salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9];
73 salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10];
74 salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11];
75 salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12];
76 salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13];
77 salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14];
78 salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15];
80 const u32 salt_len = salt_bufs[salt_pos].salt_len;
82 const u32 pw_salt_len = pw_len + salt_len;
84 const u32 salt_pw_salt_len = salt_len + pw_len + salt_len;
86 switch_buffer_by_offset_le_S (salt_buf0_t, salt_buf1_t, salt_buf2_t, salt_buf3_t, pw_salt_len);
88 salt_buf0[0] |= salt_buf0_t[0];
89 salt_buf0[1] |= salt_buf0_t[1];
90 salt_buf0[2] |= salt_buf0_t[2];
91 salt_buf0[3] |= salt_buf0_t[3];
92 salt_buf1[0] |= salt_buf1_t[0];
93 salt_buf1[1] |= salt_buf1_t[1];
94 salt_buf1[2] |= salt_buf1_t[2];
95 salt_buf1[3] |= salt_buf1_t[3];
96 salt_buf2[0] |= salt_buf2_t[0];
97 salt_buf2[1] |= salt_buf2_t[1];
98 salt_buf2[2] |= salt_buf2_t[2];
99 salt_buf2[3] |= salt_buf2_t[3];
100 salt_buf3[0] |= salt_buf3_t[0];
101 salt_buf3[1] |= salt_buf3_t[1];
102 salt_buf3[2] |= salt_buf3_t[2];
103 salt_buf3[3] |= salt_buf3_t[3];
105 append_0x80_4x4_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, salt_pw_salt_len);
113 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
115 const u32x w0r = ix_create_bft (bfs_buf, il_pos);
117 const u32x w0lr = w0l | w0r;
142 * put the password after the first salt but before the second salt
145 switch_buffer_by_offset_le (t0, t1, t2, t3, salt_len);
147 t0[0] |= salt_buf0[0];
148 t0[1] |= salt_buf0[1];
149 t0[2] |= salt_buf0[2];
150 t0[3] |= salt_buf0[3];
151 t1[0] |= salt_buf1[0];
152 t1[1] |= salt_buf1[1];
153 t1[2] |= salt_buf1[2];
154 t1[3] |= salt_buf1[3];
155 t2[0] |= salt_buf2[0];
156 t2[1] |= salt_buf2[1];
157 t2[2] |= salt_buf2[2];
158 t2[3] |= salt_buf2[3];
159 t3[0] |= salt_buf3[0];
160 t3[1] |= salt_buf3[1];
161 t3[2] = salt_pw_salt_len * 8;
173 MD5_STEP (MD5_Fo, a, b, c, d, t0[0], MD5C00, MD5S00);
174 MD5_STEP (MD5_Fo, d, a, b, c, t0[1], MD5C01, MD5S01);
175 MD5_STEP (MD5_Fo, c, d, a, b, t0[2], MD5C02, MD5S02);
176 MD5_STEP (MD5_Fo, b, c, d, a, t0[3], MD5C03, MD5S03);
177 MD5_STEP (MD5_Fo, a, b, c, d, t1[0], MD5C04, MD5S00);
178 MD5_STEP (MD5_Fo, d, a, b, c, t1[1], MD5C05, MD5S01);
179 MD5_STEP (MD5_Fo, c, d, a, b, t1[2], MD5C06, MD5S02);
180 MD5_STEP (MD5_Fo, b, c, d, a, t1[3], MD5C07, MD5S03);
181 MD5_STEP (MD5_Fo, a, b, c, d, t2[0], MD5C08, MD5S00);
182 MD5_STEP (MD5_Fo, d, a, b, c, t2[1], MD5C09, MD5S01);
183 MD5_STEP (MD5_Fo, c, d, a, b, t2[2], MD5C0a, MD5S02);
184 MD5_STEP (MD5_Fo, b, c, d, a, t2[3], MD5C0b, MD5S03);
185 MD5_STEP (MD5_Fo, a, b, c, d, t3[0], MD5C0c, MD5S00);
186 MD5_STEP (MD5_Fo, d, a, b, c, t3[1], MD5C0d, MD5S01);
187 MD5_STEP (MD5_Fo, c, d, a, b, t3[2], MD5C0e, MD5S02);
188 MD5_STEP (MD5_Fo, b, c, d, a, t3[3], MD5C0f, MD5S03);
190 MD5_STEP (MD5_Go, a, b, c, d, t0[1], MD5C10, MD5S10);
191 MD5_STEP (MD5_Go, d, a, b, c, t1[2], MD5C11, MD5S11);
192 MD5_STEP (MD5_Go, c, d, a, b, t2[3], MD5C12, MD5S12);
193 MD5_STEP (MD5_Go, b, c, d, a, t0[0], MD5C13, MD5S13);
194 MD5_STEP (MD5_Go, a, b, c, d, t1[1], MD5C14, MD5S10);
195 MD5_STEP (MD5_Go, d, a, b, c, t2[2], MD5C15, MD5S11);
196 MD5_STEP (MD5_Go, c, d, a, b, t3[3], MD5C16, MD5S12);
197 MD5_STEP (MD5_Go, b, c, d, a, t1[0], MD5C17, MD5S13);
198 MD5_STEP (MD5_Go, a, b, c, d, t2[1], MD5C18, MD5S10);
199 MD5_STEP (MD5_Go, d, a, b, c, t3[2], MD5C19, MD5S11);
200 MD5_STEP (MD5_Go, c, d, a, b, t0[3], MD5C1a, MD5S12);
201 MD5_STEP (MD5_Go, b, c, d, a, t2[0], MD5C1b, MD5S13);
202 MD5_STEP (MD5_Go, a, b, c, d, t3[1], MD5C1c, MD5S10);
203 MD5_STEP (MD5_Go, d, a, b, c, t0[2], MD5C1d, MD5S11);
204 MD5_STEP (MD5_Go, c, d, a, b, t1[3], MD5C1e, MD5S12);
205 MD5_STEP (MD5_Go, b, c, d, a, t3[0], MD5C1f, MD5S13);
207 MD5_STEP (MD5_H , a, b, c, d, t1[1], MD5C20, MD5S20);
208 MD5_STEP (MD5_H , d, a, b, c, t2[0], MD5C21, MD5S21);
209 MD5_STEP (MD5_H , c, d, a, b, t2[3], MD5C22, MD5S22);
210 MD5_STEP (MD5_H , b, c, d, a, t3[2], MD5C23, MD5S23);
211 MD5_STEP (MD5_H , a, b, c, d, t0[1], MD5C24, MD5S20);
212 MD5_STEP (MD5_H , d, a, b, c, t1[0], MD5C25, MD5S21);
213 MD5_STEP (MD5_H , c, d, a, b, t1[3], MD5C26, MD5S22);
214 MD5_STEP (MD5_H , b, c, d, a, t2[2], MD5C27, MD5S23);
215 MD5_STEP (MD5_H , a, b, c, d, t3[1], MD5C28, MD5S20);
216 MD5_STEP (MD5_H , d, a, b, c, t0[0], MD5C29, MD5S21);
217 MD5_STEP (MD5_H , c, d, a, b, t0[3], MD5C2a, MD5S22);
218 MD5_STEP (MD5_H , b, c, d, a, t1[2], MD5C2b, MD5S23);
219 MD5_STEP (MD5_H , a, b, c, d, t2[1], MD5C2c, MD5S20);
220 MD5_STEP (MD5_H , d, a, b, c, t3[0], MD5C2d, MD5S21);
221 MD5_STEP (MD5_H , c, d, a, b, t3[3], MD5C2e, MD5S22);
222 MD5_STEP (MD5_H , b, c, d, a, t0[2], MD5C2f, MD5S23);
224 MD5_STEP (MD5_I , a, b, c, d, t0[0], MD5C30, MD5S30);
225 MD5_STEP (MD5_I , d, a, b, c, t1[3], MD5C31, MD5S31);
226 MD5_STEP (MD5_I , c, d, a, b, t3[2], MD5C32, MD5S32);
227 MD5_STEP (MD5_I , b, c, d, a, t1[1], MD5C33, MD5S33);
228 MD5_STEP (MD5_I , a, b, c, d, t3[0], MD5C34, MD5S30);
229 MD5_STEP (MD5_I , d, a, b, c, t0[3], MD5C35, MD5S31);
230 MD5_STEP (MD5_I , c, d, a, b, t2[2], MD5C36, MD5S32);
231 MD5_STEP (MD5_I , b, c, d, a, t0[1], MD5C37, MD5S33);
232 MD5_STEP (MD5_I , a, b, c, d, t2[0], MD5C38, MD5S30);
233 MD5_STEP (MD5_I , d, a, b, c, t3[3], MD5C39, MD5S31);
234 MD5_STEP (MD5_I , c, d, a, b, t1[2], MD5C3a, MD5S32);
235 MD5_STEP (MD5_I , b, c, d, a, t3[1], MD5C3b, MD5S33);
236 MD5_STEP (MD5_I , a, b, c, d, t1[0], MD5C3c, MD5S30);
237 MD5_STEP (MD5_I , d, a, b, c, t2[3], MD5C3d, MD5S31);
238 MD5_STEP (MD5_I , c, d, a, b, t0[2], MD5C3e, MD5S32);
239 MD5_STEP (MD5_I , b, c, d, a, t2[1], MD5C3f, MD5S33);
241 COMPARE_M_SIMD (a, d, c, b);
245 void m03800s (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __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_scryptV_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)
251 const u32 gid = get_global_id (0);
252 const u32 lid = get_local_id (0);
263 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
264 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
265 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
266 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
267 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
268 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
269 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
270 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
271 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
272 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
273 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
274 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
275 salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
276 salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
277 salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14];
278 salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15];
285 salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0];
286 salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1];
287 salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2];
288 salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3];
289 salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4];
290 salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5];
291 salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6];
292 salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7];
293 salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8];
294 salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9];
295 salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10];
296 salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11];
297 salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12];
298 salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13];
299 salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14];
300 salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15];
302 const u32 salt_len = salt_bufs[salt_pos].salt_len;
304 const u32 pw_salt_len = pw_len + salt_len;
306 const u32 salt_pw_salt_len = salt_len + pw_len + salt_len;
308 switch_buffer_by_offset_le_S (salt_buf0_t, salt_buf1_t, salt_buf2_t, salt_buf3_t, pw_salt_len);
310 salt_buf0[0] |= salt_buf0_t[0];
311 salt_buf0[1] |= salt_buf0_t[1];
312 salt_buf0[2] |= salt_buf0_t[2];
313 salt_buf0[3] |= salt_buf0_t[3];
314 salt_buf1[0] |= salt_buf1_t[0];
315 salt_buf1[1] |= salt_buf1_t[1];
316 salt_buf1[2] |= salt_buf1_t[2];
317 salt_buf1[3] |= salt_buf1_t[3];
318 salt_buf2[0] |= salt_buf2_t[0];
319 salt_buf2[1] |= salt_buf2_t[1];
320 salt_buf2[2] |= salt_buf2_t[2];
321 salt_buf2[3] |= salt_buf2_t[3];
322 salt_buf3[0] |= salt_buf3_t[0];
323 salt_buf3[1] |= salt_buf3_t[1];
324 salt_buf3[2] |= salt_buf3_t[2];
325 salt_buf3[3] |= salt_buf3_t[3];
327 append_0x80_4x4_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, salt_pw_salt_len);
333 const u32 search[4] =
335 digests_buf[digests_offset].digest_buf[DGST_R0],
336 digests_buf[digests_offset].digest_buf[DGST_R1],
337 digests_buf[digests_offset].digest_buf[DGST_R2],
338 digests_buf[digests_offset].digest_buf[DGST_R3]
347 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
349 const u32x w0r = ix_create_bft (bfs_buf, il_pos);
351 const u32x w0lr = w0l | w0r;
376 * put the password after the first salt but before the second salt
379 switch_buffer_by_offset_le (t0, t1, t2, t3, salt_len);
381 t0[0] |= salt_buf0[0];
382 t0[1] |= salt_buf0[1];
383 t0[2] |= salt_buf0[2];
384 t0[3] |= salt_buf0[3];
385 t1[0] |= salt_buf1[0];
386 t1[1] |= salt_buf1[1];
387 t1[2] |= salt_buf1[2];
388 t1[3] |= salt_buf1[3];
389 t2[0] |= salt_buf2[0];
390 t2[1] |= salt_buf2[1];
391 t2[2] |= salt_buf2[2];
392 t2[3] |= salt_buf2[3];
393 t3[0] |= salt_buf3[0];
394 t3[1] |= salt_buf3[1];
395 t3[2] = salt_pw_salt_len * 8;
407 MD5_STEP (MD5_Fo, a, b, c, d, t0[0], MD5C00, MD5S00);
408 MD5_STEP (MD5_Fo, d, a, b, c, t0[1], MD5C01, MD5S01);
409 MD5_STEP (MD5_Fo, c, d, a, b, t0[2], MD5C02, MD5S02);
410 MD5_STEP (MD5_Fo, b, c, d, a, t0[3], MD5C03, MD5S03);
411 MD5_STEP (MD5_Fo, a, b, c, d, t1[0], MD5C04, MD5S00);
412 MD5_STEP (MD5_Fo, d, a, b, c, t1[1], MD5C05, MD5S01);
413 MD5_STEP (MD5_Fo, c, d, a, b, t1[2], MD5C06, MD5S02);
414 MD5_STEP (MD5_Fo, b, c, d, a, t1[3], MD5C07, MD5S03);
415 MD5_STEP (MD5_Fo, a, b, c, d, t2[0], MD5C08, MD5S00);
416 MD5_STEP (MD5_Fo, d, a, b, c, t2[1], MD5C09, MD5S01);
417 MD5_STEP (MD5_Fo, c, d, a, b, t2[2], MD5C0a, MD5S02);
418 MD5_STEP (MD5_Fo, b, c, d, a, t2[3], MD5C0b, MD5S03);
419 MD5_STEP (MD5_Fo, a, b, c, d, t3[0], MD5C0c, MD5S00);
420 MD5_STEP (MD5_Fo, d, a, b, c, t3[1], MD5C0d, MD5S01);
421 MD5_STEP (MD5_Fo, c, d, a, b, t3[2], MD5C0e, MD5S02);
422 MD5_STEP (MD5_Fo, b, c, d, a, t3[3], MD5C0f, MD5S03);
424 MD5_STEP (MD5_Go, a, b, c, d, t0[1], MD5C10, MD5S10);
425 MD5_STEP (MD5_Go, d, a, b, c, t1[2], MD5C11, MD5S11);
426 MD5_STEP (MD5_Go, c, d, a, b, t2[3], MD5C12, MD5S12);
427 MD5_STEP (MD5_Go, b, c, d, a, t0[0], MD5C13, MD5S13);
428 MD5_STEP (MD5_Go, a, b, c, d, t1[1], MD5C14, MD5S10);
429 MD5_STEP (MD5_Go, d, a, b, c, t2[2], MD5C15, MD5S11);
430 MD5_STEP (MD5_Go, c, d, a, b, t3[3], MD5C16, MD5S12);
431 MD5_STEP (MD5_Go, b, c, d, a, t1[0], MD5C17, MD5S13);
432 MD5_STEP (MD5_Go, a, b, c, d, t2[1], MD5C18, MD5S10);
433 MD5_STEP (MD5_Go, d, a, b, c, t3[2], MD5C19, MD5S11);
434 MD5_STEP (MD5_Go, c, d, a, b, t0[3], MD5C1a, MD5S12);
435 MD5_STEP (MD5_Go, b, c, d, a, t2[0], MD5C1b, MD5S13);
436 MD5_STEP (MD5_Go, a, b, c, d, t3[1], MD5C1c, MD5S10);
437 MD5_STEP (MD5_Go, d, a, b, c, t0[2], MD5C1d, MD5S11);
438 MD5_STEP (MD5_Go, c, d, a, b, t1[3], MD5C1e, MD5S12);
439 MD5_STEP (MD5_Go, b, c, d, a, t3[0], MD5C1f, MD5S13);
441 MD5_STEP (MD5_H , a, b, c, d, t1[1], MD5C20, MD5S20);
442 MD5_STEP (MD5_H , d, a, b, c, t2[0], MD5C21, MD5S21);
443 MD5_STEP (MD5_H , c, d, a, b, t2[3], MD5C22, MD5S22);
444 MD5_STEP (MD5_H , b, c, d, a, t3[2], MD5C23, MD5S23);
445 MD5_STEP (MD5_H , a, b, c, d, t0[1], MD5C24, MD5S20);
446 MD5_STEP (MD5_H , d, a, b, c, t1[0], MD5C25, MD5S21);
447 MD5_STEP (MD5_H , c, d, a, b, t1[3], MD5C26, MD5S22);
448 MD5_STEP (MD5_H , b, c, d, a, t2[2], MD5C27, MD5S23);
449 MD5_STEP (MD5_H , a, b, c, d, t3[1], MD5C28, MD5S20);
450 MD5_STEP (MD5_H , d, a, b, c, t0[0], MD5C29, MD5S21);
451 MD5_STEP (MD5_H , c, d, a, b, t0[3], MD5C2a, MD5S22);
452 MD5_STEP (MD5_H , b, c, d, a, t1[2], MD5C2b, MD5S23);
453 MD5_STEP (MD5_H , a, b, c, d, t2[1], MD5C2c, MD5S20);
454 MD5_STEP (MD5_H , d, a, b, c, t3[0], MD5C2d, MD5S21);
455 MD5_STEP (MD5_H , c, d, a, b, t3[3], MD5C2e, MD5S22);
456 MD5_STEP (MD5_H , b, c, d, a, t0[2], MD5C2f, MD5S23);
458 MD5_STEP (MD5_I , a, b, c, d, t0[0], MD5C30, MD5S30);
459 MD5_STEP (MD5_I , d, a, b, c, t1[3], MD5C31, MD5S31);
460 MD5_STEP (MD5_I , c, d, a, b, t3[2], MD5C32, MD5S32);
461 MD5_STEP (MD5_I , b, c, d, a, t1[1], MD5C33, MD5S33);
462 MD5_STEP (MD5_I , a, b, c, d, t3[0], MD5C34, MD5S30);
463 MD5_STEP (MD5_I , d, a, b, c, t0[3], MD5C35, MD5S31);
464 MD5_STEP (MD5_I , c, d, a, b, t2[2], MD5C36, MD5S32);
465 MD5_STEP (MD5_I , b, c, d, a, t0[1], MD5C37, MD5S33);
466 MD5_STEP (MD5_I , a, b, c, d, t2[0], MD5C38, MD5S30);
467 MD5_STEP (MD5_I , d, a, b, c, t3[3], MD5C39, MD5S31);
468 MD5_STEP (MD5_I , c, d, a, b, t1[2], MD5C3a, MD5S32);
469 MD5_STEP (MD5_I , b, c, d, a, t3[1], MD5C3b, MD5S33);
470 MD5_STEP (MD5_I , a, b, c, d, t1[0], MD5C3c, MD5S30);
472 if (MATCHES_NONE_VS (a, search[0])) continue;
474 MD5_STEP (MD5_I , d, a, b, c, t2[3], MD5C3d, MD5S31);
475 MD5_STEP (MD5_I , c, d, a, b, t0[2], MD5C3e, MD5S32);
476 MD5_STEP (MD5_I , b, c, d, a, t2[1], MD5C3f, MD5S33);
478 COMPARE_S_SIMD (a, d, c, b);
482 __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_scryptV_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)
488 const u32 gid = get_global_id (0);
490 if (gid >= gid_max) return;
496 const u32 lid = get_local_id (0);
500 w0[0] = pws[gid].i[ 0];
501 w0[1] = pws[gid].i[ 1];
502 w0[2] = pws[gid].i[ 2];
503 w0[3] = pws[gid].i[ 3];
523 w3[2] = pws[gid].i[14];
526 const u32 pw_len = pws[gid].pw_len;
532 m03800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
535 __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_scryptV_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)
541 const u32 gid = get_global_id (0);
543 if (gid >= gid_max) return;
549 const u32 lid = get_local_id (0);
553 w0[0] = pws[gid].i[ 0];
554 w0[1] = pws[gid].i[ 1];
555 w0[2] = pws[gid].i[ 2];
556 w0[3] = pws[gid].i[ 3];
560 w1[0] = pws[gid].i[ 4];
561 w1[1] = pws[gid].i[ 5];
562 w1[2] = pws[gid].i[ 6];
563 w1[3] = pws[gid].i[ 7];
576 w3[2] = pws[gid].i[14];
579 const u32 pw_len = pws[gid].pw_len;
585 m03800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
588 __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_scryptV_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)
594 const u32 gid = get_global_id (0);
596 if (gid >= gid_max) return;
602 const u32 lid = get_local_id (0);
606 w0[0] = pws[gid].i[ 0];
607 w0[1] = pws[gid].i[ 1];
608 w0[2] = pws[gid].i[ 2];
609 w0[3] = pws[gid].i[ 3];
613 w1[0] = pws[gid].i[ 4];
614 w1[1] = pws[gid].i[ 5];
615 w1[2] = pws[gid].i[ 6];
616 w1[3] = pws[gid].i[ 7];
620 w2[0] = pws[gid].i[ 8];
621 w2[1] = pws[gid].i[ 9];
622 w2[2] = pws[gid].i[10];
623 w2[3] = pws[gid].i[11];
627 w3[0] = pws[gid].i[12];
628 w3[1] = pws[gid].i[13];
629 w3[2] = pws[gid].i[14];
630 w3[3] = pws[gid].i[15];
632 const u32 pw_len = pws[gid].pw_len;
638 m03800m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
641 __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_scryptV_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)
647 const u32 gid = get_global_id (0);
649 if (gid >= gid_max) return;
655 const u32 lid = get_local_id (0);
659 w0[0] = pws[gid].i[ 0];
660 w0[1] = pws[gid].i[ 1];
661 w0[2] = pws[gid].i[ 2];
662 w0[3] = pws[gid].i[ 3];
682 w3[2] = pws[gid].i[14];
685 const u32 pw_len = pws[gid].pw_len;
691 m03800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
694 __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_scryptV_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)
700 const u32 gid = get_global_id (0);
702 if (gid >= gid_max) return;
708 const u32 lid = get_local_id (0);
712 w0[0] = pws[gid].i[ 0];
713 w0[1] = pws[gid].i[ 1];
714 w0[2] = pws[gid].i[ 2];
715 w0[3] = pws[gid].i[ 3];
719 w1[0] = pws[gid].i[ 4];
720 w1[1] = pws[gid].i[ 5];
721 w1[2] = pws[gid].i[ 6];
722 w1[3] = pws[gid].i[ 7];
735 w3[2] = pws[gid].i[14];
738 const u32 pw_len = pws[gid].pw_len;
744 m03800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
747 __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_scryptV_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)
753 const u32 gid = get_global_id (0);
755 if (gid >= gid_max) return;
761 const u32 lid = get_local_id (0);
765 w0[0] = pws[gid].i[ 0];
766 w0[1] = pws[gid].i[ 1];
767 w0[2] = pws[gid].i[ 2];
768 w0[3] = pws[gid].i[ 3];
772 w1[0] = pws[gid].i[ 4];
773 w1[1] = pws[gid].i[ 5];
774 w1[2] = pws[gid].i[ 6];
775 w1[3] = pws[gid].i[ 7];
779 w2[0] = pws[gid].i[ 8];
780 w2[1] = pws[gid].i[ 9];
781 w2[2] = pws[gid].i[10];
782 w2[3] = pws[gid].i[11];
786 w3[0] = pws[gid].i[12];
787 w3[1] = pws[gid].i[13];
788 w3[2] = pws[gid].i[14];
789 w3[3] = pws[gid].i[15];
791 const u32 pw_len = pws[gid].pw_len;
797 m03800s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);