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 "include/rp_kernel.h"
22 #include "OpenCL/rp.c"
23 #include "OpenCL/simd.c"
25 __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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
31 const u32 lid = get_local_id (0);
37 const u32 gid = get_global_id (0);
39 if (gid >= gid_max) return;
43 pw_buf0[0] = pws[gid].i[ 0];
44 pw_buf0[1] = pws[gid].i[ 1];
45 pw_buf0[2] = pws[gid].i[ 2];
46 pw_buf0[3] = pws[gid].i[ 3];
50 pw_buf1[0] = pws[gid].i[ 4];
51 pw_buf1[1] = pws[gid].i[ 5];
52 pw_buf1[2] = pws[gid].i[ 6];
53 pw_buf1[3] = pws[gid].i[ 7];
55 const u32 pw_len = pws[gid].pw_len;
63 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
64 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
65 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
66 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
70 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
71 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
72 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
73 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
77 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
78 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
82 const u32 salt_len = salt_bufs[salt_pos].salt_len;
88 for (u32 il_pos = 0; il_pos < rules_cnt; il_pos += VECT_SIZE)
95 const u32 out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
97 append_0x80_2x4 (w0, w1, out_len);
104 make_unicode (w0, w0_t, w1_t);
105 make_unicode (w1, w2_t, w3_t);
107 w3_t[2] = out_len * 8 * 2;
114 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
115 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
116 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
117 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
118 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
119 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
120 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
121 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
122 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
123 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
124 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
125 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
126 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
127 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
128 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
129 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
131 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
132 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
133 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
134 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
135 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
136 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
137 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
138 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
139 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
140 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
141 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
142 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
143 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
144 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
145 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
146 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
148 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
149 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
150 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
151 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
152 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
153 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
154 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
155 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
156 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
157 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
158 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
159 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
160 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
161 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
162 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
163 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
174 w1_t[0] = salt_buf0[0];
175 w1_t[1] = salt_buf0[1];
176 w1_t[2] = salt_buf0[2];
177 w1_t[3] = salt_buf0[3];
178 w2_t[0] = salt_buf1[0];
179 w2_t[1] = salt_buf1[1];
180 w2_t[2] = salt_buf1[2];
181 w2_t[3] = salt_buf1[3];
182 w3_t[0] = salt_buf2[0];
183 w3_t[1] = salt_buf2[1];
184 w3_t[2] = (16 + salt_len) * 8;
192 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
193 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
194 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
195 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
196 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
197 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
198 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
199 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
200 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
201 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
202 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
203 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
204 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
205 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
206 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
207 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
209 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
210 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
211 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
212 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
213 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
214 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
215 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
216 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
217 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
218 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
219 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
220 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
221 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
222 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
223 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
224 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
226 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
227 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
228 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
229 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
230 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
231 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
232 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
233 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
234 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
235 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
236 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
237 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
238 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
239 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
240 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
241 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
243 COMPARE_M_SIMD (a, d, c, b);
247 __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)
251 __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)
255 __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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
261 const u32 lid = get_local_id (0);
267 const u32 gid = get_global_id (0);
269 if (gid >= gid_max) return;
273 pw_buf0[0] = pws[gid].i[ 0];
274 pw_buf0[1] = pws[gid].i[ 1];
275 pw_buf0[2] = pws[gid].i[ 2];
276 pw_buf0[3] = pws[gid].i[ 3];
280 pw_buf1[0] = pws[gid].i[ 4];
281 pw_buf1[1] = pws[gid].i[ 5];
282 pw_buf1[2] = pws[gid].i[ 6];
283 pw_buf1[3] = pws[gid].i[ 7];
285 const u32 pw_len = pws[gid].pw_len;
291 const u32 search[4] =
293 digests_buf[digests_offset].digest_buf[DGST_R0],
294 digests_buf[digests_offset].digest_buf[DGST_R1],
295 digests_buf[digests_offset].digest_buf[DGST_R2],
296 digests_buf[digests_offset].digest_buf[DGST_R3]
305 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
306 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
307 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
308 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
312 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
313 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
314 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
315 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
319 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
320 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
324 const u32 salt_len = salt_bufs[salt_pos].salt_len;
330 for (u32 il_pos = 0; il_pos < rules_cnt; il_pos += VECT_SIZE)
337 const u32 out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
339 append_0x80_2x4 (w0, w1, out_len);
346 make_unicode (w0, w0_t, w1_t);
347 make_unicode (w1, w2_t, w3_t);
349 w3_t[2] = out_len * 8 * 2;
356 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
357 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
358 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
359 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
360 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
361 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
362 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
363 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
364 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
365 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
366 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
367 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
368 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
369 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
370 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
371 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
373 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
374 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
375 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
376 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
377 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
378 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
379 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
380 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
381 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
382 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
383 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
384 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
385 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
386 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
387 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
388 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
390 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
391 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
392 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
393 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
394 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
395 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
396 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
397 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
398 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
399 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
400 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
401 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
402 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
403 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
404 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
405 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
416 w1_t[0] = salt_buf0[0];
417 w1_t[1] = salt_buf0[1];
418 w1_t[2] = salt_buf0[2];
419 w1_t[3] = salt_buf0[3];
420 w2_t[0] = salt_buf1[0];
421 w2_t[1] = salt_buf1[1];
422 w2_t[2] = salt_buf1[2];
423 w2_t[3] = salt_buf1[3];
424 w3_t[0] = salt_buf2[0];
425 w3_t[1] = salt_buf2[1];
426 w3_t[2] = (16 + salt_len) * 8;
434 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
435 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
436 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
437 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
438 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
439 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
440 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
441 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
442 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
443 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
444 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
445 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
446 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
447 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
448 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
449 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
451 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
452 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
453 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
454 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
455 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
456 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
457 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
458 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
459 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
460 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
461 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
462 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
463 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
464 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
465 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
466 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
468 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
469 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
470 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
471 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
472 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
473 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
474 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
475 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
476 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
477 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
478 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
479 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
480 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
482 if (MATCHES_NONE_VS (a, search[0])) continue;
484 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
485 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
486 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
488 COMPARE_S_SIMD (a, d, c, b);
492 __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)
496 __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)