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"
19 #include "include/rp_gpu.h"
22 #define COMPARE_S "OpenCL/check_single_comp4.c"
23 #define COMPARE_M "OpenCL/check_multi_comp4.c"
25 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01100_m04 (__global pw_t *pws, __global gpu_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++)
118 const u32 out_len = apply_rules (rules_buf[il_pos].cmds, w0, w1, pw_len);
120 append_0x80_2x4 (w0, w1, out_len);
127 make_unicode (w0, w0_t, w1_t);
128 make_unicode (w1, w2_t, w3_t);
130 w3_t[2] = out_len * 8 * 2;
137 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
138 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
139 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
140 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
141 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
142 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
143 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
144 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
145 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
146 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
147 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
148 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
149 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
150 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
151 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
152 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
154 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
155 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
156 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
157 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
158 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
159 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
160 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
161 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
162 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
163 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
164 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
165 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
166 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
167 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
168 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
169 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
171 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
172 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
173 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
174 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
175 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
176 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
177 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
178 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
179 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
180 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
181 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
182 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
183 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
184 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
185 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
186 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
197 w1_t[0] = salt_buf0[0];
198 w1_t[1] = salt_buf0[1];
199 w1_t[2] = salt_buf0[2];
200 w1_t[3] = salt_buf0[3];
201 w2_t[0] = salt_buf1[0];
202 w2_t[1] = salt_buf1[1];
203 w2_t[2] = salt_buf1[2];
204 w2_t[3] = salt_buf1[3];
205 w3_t[0] = salt_buf2[0];
206 w3_t[1] = salt_buf2[1];
207 w3_t[2] = (16 + salt_len) * 8;
215 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
216 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
217 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
218 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
219 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
220 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
221 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
222 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
223 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
224 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
225 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
226 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
227 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
228 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
229 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
230 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
232 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
233 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
234 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
235 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
236 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
237 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
238 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
239 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
240 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
241 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
242 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
243 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
244 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
245 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
246 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
247 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
249 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
250 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
251 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
252 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
253 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
254 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
255 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
256 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
257 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
258 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
259 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
260 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
261 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
262 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
263 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
264 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
275 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01100_m08 (__global pw_t *pws, __global gpu_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)
279 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01100_m16 (__global pw_t *pws, __global gpu_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)
283 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01100_s04 (__global pw_t *pws, __global gpu_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)
289 const u32 lid = get_local_id (0);
295 const u32 gid = get_global_id (0);
297 if (gid >= gid_max) return;
301 pw_buf0[0] = pws[gid].i[ 0];
302 pw_buf0[1] = pws[gid].i[ 1];
303 pw_buf0[2] = pws[gid].i[ 2];
304 pw_buf0[3] = pws[gid].i[ 3];
308 pw_buf1[0] = pws[gid].i[ 4];
309 pw_buf1[1] = pws[gid].i[ 5];
310 pw_buf1[2] = pws[gid].i[ 6];
311 pw_buf1[3] = pws[gid].i[ 7];
313 const u32 pw_len = pws[gid].pw_len;
319 const u32 search[4] =
321 digests_buf[digests_offset].digest_buf[DGST_R0],
322 digests_buf[digests_offset].digest_buf[DGST_R1],
323 digests_buf[digests_offset].digest_buf[DGST_R2],
324 digests_buf[digests_offset].digest_buf[DGST_R3]
333 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
334 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
335 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
336 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
340 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
341 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
342 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
343 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
347 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
348 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
352 const u32 salt_len = salt_bufs[salt_pos].salt_len;
358 for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
388 const u32 out_len = apply_rules (rules_buf[il_pos].cmds, w0, w1, pw_len);
390 append_0x80_2x4 (w0, w1, out_len);
397 make_unicode (w0, w0_t, w1_t);
398 make_unicode (w1, w2_t, w3_t);
400 w3_t[2] = out_len * 8 * 2;
407 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
408 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
409 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
410 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
411 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
412 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
413 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
414 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
415 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
416 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
417 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
418 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
419 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
420 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
421 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
422 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
424 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
425 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
426 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
427 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
428 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
429 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
430 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
431 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
432 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
433 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
434 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
435 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
436 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
437 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
438 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
439 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
441 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
442 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
443 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
444 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
445 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
446 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
447 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
448 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
449 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
450 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
451 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
452 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
453 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
454 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
455 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
456 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
467 w1_t[0] = salt_buf0[0];
468 w1_t[1] = salt_buf0[1];
469 w1_t[2] = salt_buf0[2];
470 w1_t[3] = salt_buf0[3];
471 w2_t[0] = salt_buf1[0];
472 w2_t[1] = salt_buf1[1];
473 w2_t[2] = salt_buf1[2];
474 w2_t[3] = salt_buf1[3];
475 w3_t[0] = salt_buf2[0];
476 w3_t[1] = salt_buf2[1];
477 w3_t[2] = (16 + salt_len) * 8;
485 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
486 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
487 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
488 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
489 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
490 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
491 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
492 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
493 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
494 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
495 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
496 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
497 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
498 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
499 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
500 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
502 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
503 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
504 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
505 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
506 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
507 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
508 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
509 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
510 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
511 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
512 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
513 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
514 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
515 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
516 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
517 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
519 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
520 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
521 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
522 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
523 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
524 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
525 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
526 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
527 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
528 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
529 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
530 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
531 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
533 bool q_cond = allx (search[0] != a);
535 if (q_cond) continue;
537 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
538 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
539 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
550 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01100_s08 (__global pw_t *pws, __global gpu_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)
554 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01100_s16 (__global pw_t *pws, __global gpu_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)