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 __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;
42 pws0[0] = pws[gid].i[0];
43 pws0[1] = pws[gid].i[1];
44 pws0[2] = pws[gid].i[2];
45 pws0[3] = pws[gid].i[3];
46 pws1[0] = pws[gid].i[4];
47 pws1[1] = pws[gid].i[5];
48 pws1[2] = pws[gid].i[6];
49 pws1[3] = pws[gid].i[7];
51 const u32 pw_l_len = pws[gid].pw_len;
59 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
60 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
61 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
62 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
66 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
67 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
68 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
69 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
73 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
74 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
78 const u32 salt_len = salt_bufs[salt_pos].salt_len;
84 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos += VECT_SIZE)
86 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
88 const u32x pw_len = pw_l_len + pw_r_len;
90 u32x wordr0[4] = { 0 };
91 u32x wordr1[4] = { 0 };
92 u32x wordr2[4] = { 0 };
93 u32x wordr3[4] = { 0 };
95 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
96 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
97 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
98 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
99 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
100 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
101 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
102 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
104 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
106 switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
111 w0[0] = wordl0[0] | wordr0[0];
112 w0[1] = wordl0[1] | wordr0[1];
113 w0[2] = wordl0[2] | wordr0[2];
114 w0[3] = wordl0[3] | wordr0[3];
118 w1[0] = wordl1[0] | wordr1[0];
119 w1[1] = wordl1[1] | wordr1[1];
120 w1[2] = wordl1[2] | wordr1[2];
121 w1[3] = wordl1[3] | wordr1[3];
142 make_unicode (w0, w0_t, w1_t);
143 make_unicode (w1, w2_t, w3_t);
145 w3_t[2] = pw_len * 8 * 2;
152 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
153 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
154 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
155 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
156 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
157 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
158 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
159 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
160 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
161 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
162 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
163 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
164 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
165 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
166 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
167 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
169 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
170 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
171 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
172 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
173 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
174 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
175 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
176 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
177 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
178 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
179 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
180 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
181 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
182 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
183 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
184 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
186 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
187 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
188 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
189 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
190 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
191 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
192 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
193 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
194 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
195 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
196 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
197 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
198 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
199 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
200 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
201 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
212 w1_t[0] = salt_buf0[0];
213 w1_t[1] = salt_buf0[1];
214 w1_t[2] = salt_buf0[2];
215 w1_t[3] = salt_buf0[3];
216 w2_t[0] = salt_buf1[0];
217 w2_t[1] = salt_buf1[1];
218 w2_t[2] = salt_buf1[2];
219 w2_t[3] = salt_buf1[3];
220 w3_t[0] = salt_buf2[0];
221 w3_t[1] = salt_buf2[1];
222 w3_t[2] = (16 + salt_len) * 8;
230 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
231 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
232 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
233 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
234 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
235 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
236 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
237 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
238 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
239 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
240 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
241 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
242 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
243 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
244 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
245 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
247 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
248 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
249 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
250 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
251 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
252 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
253 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
254 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
255 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
256 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
257 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
258 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
259 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
260 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
261 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
262 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
264 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
265 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
266 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
267 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
268 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
269 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
270 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
271 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
272 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
273 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
274 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
275 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
276 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
277 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
278 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
279 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
280 COMPARE_M_SIMD (a, d, c, b);
284 __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)
288 __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)
292 __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)
298 const u32 lid = get_local_id (0);
304 const u32 gid = get_global_id (0);
306 if (gid >= gid_max) return;
311 pws0[0] = pws[gid].i[0];
312 pws0[1] = pws[gid].i[1];
313 pws0[2] = pws[gid].i[2];
314 pws0[3] = pws[gid].i[3];
315 pws1[0] = pws[gid].i[4];
316 pws1[1] = pws[gid].i[5];
317 pws1[2] = pws[gid].i[6];
318 pws1[3] = pws[gid].i[7];
320 const u32 pw_l_len = pws[gid].pw_len;
326 const u32 search[4] =
328 digests_buf[digests_offset].digest_buf[DGST_R0],
329 digests_buf[digests_offset].digest_buf[DGST_R1],
330 digests_buf[digests_offset].digest_buf[DGST_R2],
331 digests_buf[digests_offset].digest_buf[DGST_R3]
340 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
341 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
342 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
343 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
347 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
348 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
349 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
350 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
354 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
355 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
359 const u32 salt_len = salt_bufs[salt_pos].salt_len;
365 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos += VECT_SIZE)
367 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
369 const u32x pw_len = pw_l_len + pw_r_len;
371 u32x wordr0[4] = { 0 };
372 u32x wordr1[4] = { 0 };
373 u32x wordr2[4] = { 0 };
374 u32x wordr3[4] = { 0 };
376 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
377 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
378 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
379 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
380 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
381 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
382 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
383 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
385 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
387 switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
392 w0[0] = wordl0[0] | wordr0[0];
393 w0[1] = wordl0[1] | wordr0[1];
394 w0[2] = wordl0[2] | wordr0[2];
395 w0[3] = wordl0[3] | wordr0[3];
399 w1[0] = wordl1[0] | wordr1[0];
400 w1[1] = wordl1[1] | wordr1[1];
401 w1[2] = wordl1[2] | wordr1[2];
402 w1[3] = wordl1[3] | wordr1[3];
423 make_unicode (w0, w0_t, w1_t);
424 make_unicode (w1, w2_t, w3_t);
426 w3_t[2] = pw_len * 8 * 2;
433 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
434 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
435 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
436 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
437 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
438 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
439 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
440 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
441 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
442 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
443 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
444 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
445 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
446 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
447 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
448 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
450 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
451 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
452 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
453 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
454 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
455 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
456 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
457 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
458 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
459 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
460 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
461 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
462 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
463 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
464 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
465 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
467 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
468 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
469 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
470 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
471 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
472 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
473 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
474 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
475 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
476 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
477 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
478 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
479 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
480 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
481 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
482 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
493 w1_t[0] = salt_buf0[0];
494 w1_t[1] = salt_buf0[1];
495 w1_t[2] = salt_buf0[2];
496 w1_t[3] = salt_buf0[3];
497 w2_t[0] = salt_buf1[0];
498 w2_t[1] = salt_buf1[1];
499 w2_t[2] = salt_buf1[2];
500 w2_t[3] = salt_buf1[3];
501 w3_t[0] = salt_buf2[0];
502 w3_t[1] = salt_buf2[1];
503 w3_t[2] = (16 + salt_len) * 8;
511 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
512 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
513 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
514 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
515 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
516 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
517 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
518 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
519 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
520 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
521 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
522 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
523 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
524 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
525 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
526 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
528 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
529 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
530 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
531 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
532 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
533 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
534 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
535 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
536 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
537 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
538 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
539 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
540 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
541 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
542 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
543 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
545 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
546 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
547 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
548 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
549 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
550 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
551 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
552 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
553 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
554 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
555 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
556 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
557 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
559 if (MATCHES_NONE_VS (a, search[0])) continue;
561 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
562 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
563 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
564 COMPARE_S_SIMD (a, d, c, b);
568 __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)
572 __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)