2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
16 #include "include/kernel_functions.c"
17 #include "OpenCL/types_ocl.c"
18 #include "OpenCL/common.c"
20 #define COMPARE_S "OpenCL/check_single_comp4.c"
21 #define COMPARE_M "OpenCL/check_multi_comp4.c"
23 __kernel void m01100_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
29 const u32 lid = get_local_id (0);
35 const u32 gid = get_global_id (0);
37 if (gid >= gid_max) return;
41 wordl0[0] = pws[gid].i[ 0];
42 wordl0[1] = pws[gid].i[ 1];
43 wordl0[2] = pws[gid].i[ 2];
44 wordl0[3] = pws[gid].i[ 3];
48 wordl1[0] = pws[gid].i[ 4];
49 wordl1[1] = pws[gid].i[ 5];
50 wordl1[2] = pws[gid].i[ 6];
51 wordl1[3] = pws[gid].i[ 7];
67 const u32 pw_l_len = pws[gid].pw_len;
69 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
71 append_0x80_2x4 (wordl0, wordl1, pw_l_len);
73 switch_buffer_by_offset_le (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
82 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
83 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
84 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
85 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
89 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
90 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
91 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
92 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
96 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
97 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
101 const u32 salt_len = salt_bufs[salt_pos].salt_len;
107 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
109 const u32 pw_r_len = combs_buf[il_pos].pw_len;
111 const u32 pw_len = pw_l_len + pw_r_len;
115 wordr0[0] = combs_buf[il_pos].i[0];
116 wordr0[1] = combs_buf[il_pos].i[1];
117 wordr0[2] = combs_buf[il_pos].i[2];
118 wordr0[3] = combs_buf[il_pos].i[3];
122 wordr1[0] = combs_buf[il_pos].i[4];
123 wordr1[1] = combs_buf[il_pos].i[5];
124 wordr1[2] = combs_buf[il_pos].i[6];
125 wordr1[3] = combs_buf[il_pos].i[7];
141 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
143 switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
148 w0[0] = wordl0[0] | wordr0[0];
149 w0[1] = wordl0[1] | wordr0[1];
150 w0[2] = wordl0[2] | wordr0[2];
151 w0[3] = wordl0[3] | wordr0[3];
155 w1[0] = wordl1[0] | wordr1[0];
156 w1[1] = wordl1[1] | wordr1[1];
157 w1[2] = wordl1[2] | wordr1[2];
158 w1[3] = wordl1[3] | wordr1[3];
179 make_unicode (w0, w0_t, w1_t);
180 make_unicode (w1, w2_t, w3_t);
182 w3_t[2] = pw_len * 8 * 2;
189 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
190 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
191 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
192 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
193 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
194 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
195 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
196 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
197 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
198 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
199 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
200 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
201 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
202 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
203 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
204 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
206 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
207 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
208 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
209 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
210 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
211 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
212 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
213 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
214 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
215 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
216 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
217 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
218 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
219 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
220 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
221 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
223 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
224 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
225 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
226 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
227 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
228 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
229 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
230 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
231 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
232 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
233 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
234 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
235 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
236 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
237 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
238 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
249 w1_t[0] = salt_buf0[0];
250 w1_t[1] = salt_buf0[1];
251 w1_t[2] = salt_buf0[2];
252 w1_t[3] = salt_buf0[3];
253 w2_t[0] = salt_buf1[0];
254 w2_t[1] = salt_buf1[1];
255 w2_t[2] = salt_buf1[2];
256 w2_t[3] = salt_buf1[3];
257 w3_t[0] = salt_buf2[0];
258 w3_t[1] = salt_buf2[1];
259 w3_t[2] = (16 + salt_len) * 8;
267 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
268 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
269 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
270 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
271 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
272 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
273 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
274 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
275 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
276 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
277 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
278 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
279 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
280 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
281 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
282 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
284 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
285 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
286 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
287 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
288 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
289 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
290 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
291 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
292 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
293 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
294 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
295 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
296 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
297 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
298 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
299 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
301 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
302 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
303 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
304 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
305 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
306 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
307 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
308 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
309 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
310 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
311 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
312 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
313 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
314 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
315 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
316 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
327 __kernel void m01100_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
331 __kernel void m01100_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
335 __kernel void m01100_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
341 const u32 lid = get_local_id (0);
347 const u32 gid = get_global_id (0);
349 if (gid >= gid_max) return;
353 wordl0[0] = pws[gid].i[ 0];
354 wordl0[1] = pws[gid].i[ 1];
355 wordl0[2] = pws[gid].i[ 2];
356 wordl0[3] = pws[gid].i[ 3];
360 wordl1[0] = pws[gid].i[ 4];
361 wordl1[1] = pws[gid].i[ 5];
362 wordl1[2] = pws[gid].i[ 6];
363 wordl1[3] = pws[gid].i[ 7];
379 const u32 pw_l_len = pws[gid].pw_len;
381 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
383 append_0x80_2x4 (wordl0, wordl1, pw_l_len);
385 switch_buffer_by_offset_le (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
392 const u32 search[4] =
394 digests_buf[digests_offset].digest_buf[DGST_R0],
395 digests_buf[digests_offset].digest_buf[DGST_R1],
396 digests_buf[digests_offset].digest_buf[DGST_R2],
397 digests_buf[digests_offset].digest_buf[DGST_R3]
406 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
407 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
408 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
409 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
413 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
414 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
415 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
416 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
420 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
421 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
425 const u32 salt_len = salt_bufs[salt_pos].salt_len;
431 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
433 const u32 pw_r_len = combs_buf[il_pos].pw_len;
435 const u32 pw_len = pw_l_len + pw_r_len;
439 wordr0[0] = combs_buf[il_pos].i[0];
440 wordr0[1] = combs_buf[il_pos].i[1];
441 wordr0[2] = combs_buf[il_pos].i[2];
442 wordr0[3] = combs_buf[il_pos].i[3];
446 wordr1[0] = combs_buf[il_pos].i[4];
447 wordr1[1] = combs_buf[il_pos].i[5];
448 wordr1[2] = combs_buf[il_pos].i[6];
449 wordr1[3] = combs_buf[il_pos].i[7];
465 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
467 switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
472 w0[0] = wordl0[0] | wordr0[0];
473 w0[1] = wordl0[1] | wordr0[1];
474 w0[2] = wordl0[2] | wordr0[2];
475 w0[3] = wordl0[3] | wordr0[3];
479 w1[0] = wordl1[0] | wordr1[0];
480 w1[1] = wordl1[1] | wordr1[1];
481 w1[2] = wordl1[2] | wordr1[2];
482 w1[3] = wordl1[3] | wordr1[3];
503 make_unicode (w0, w0_t, w1_t);
504 make_unicode (w1, w2_t, w3_t);
506 w3_t[2] = pw_len * 8 * 2;
513 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
514 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
515 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
516 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
517 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
518 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
519 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
520 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
521 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
522 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
523 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
524 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
525 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
526 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
527 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
528 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
530 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
531 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
532 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
533 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
534 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
535 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
536 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
537 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
538 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
539 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
540 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
541 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
542 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
543 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
544 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
545 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
547 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
548 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
549 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
550 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
551 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
552 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
553 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
554 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
555 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
556 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
557 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
558 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
559 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
560 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
561 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
562 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
573 w1_t[0] = salt_buf0[0];
574 w1_t[1] = salt_buf0[1];
575 w1_t[2] = salt_buf0[2];
576 w1_t[3] = salt_buf0[3];
577 w2_t[0] = salt_buf1[0];
578 w2_t[1] = salt_buf1[1];
579 w2_t[2] = salt_buf1[2];
580 w2_t[3] = salt_buf1[3];
581 w3_t[0] = salt_buf2[0];
582 w3_t[1] = salt_buf2[1];
583 w3_t[2] = (16 + salt_len) * 8;
591 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
592 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
593 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
594 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
595 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
596 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
597 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
598 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
599 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
600 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
601 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
602 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
603 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
604 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
605 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
606 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
608 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
609 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
610 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
611 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
612 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
613 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
614 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
615 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
616 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
617 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
618 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
619 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
620 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
621 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
622 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
623 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
625 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
626 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
627 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
628 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
629 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
630 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
631 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
632 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
633 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
634 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
635 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
636 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
637 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
639 bool q_cond = allx (search[0] != a);
641 if (q_cond) continue;
643 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
644 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
645 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
656 __kernel void m01100_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
660 __kernel void m01100_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)