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 il_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;
44 pw_buf0[0] = pws[gid].i[0];
45 pw_buf0[1] = pws[gid].i[1];
46 pw_buf0[2] = pws[gid].i[2];
47 pw_buf0[3] = pws[gid].i[3];
48 pw_buf1[0] = pws[gid].i[4];
49 pw_buf1[1] = pws[gid].i[5];
50 pw_buf1[2] = pws[gid].i[6];
51 pw_buf1[3] = pws[gid].i[7];
53 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];
67 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
68 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
69 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
70 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
71 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
72 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
73 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
74 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
76 const u32 salt_len = salt_bufs[salt_pos].salt_len;
82 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
89 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
91 append_0x80_2x4_VV (w0, w1, out_len);
93 make_unicode (w1, w2, w3);
94 make_unicode (w0, w0, w1);
96 w3[2] = out_len * 2 * 8;
104 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
105 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
106 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
107 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
108 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
109 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
110 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
111 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
112 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
113 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
114 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
115 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
116 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
117 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
118 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
119 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
121 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
122 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
123 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
124 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
125 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
126 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
127 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
128 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
129 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
130 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
131 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
132 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
133 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
134 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
135 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
136 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
138 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
139 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
140 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
141 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
142 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
143 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
144 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
145 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
146 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
147 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
148 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
149 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
150 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
151 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
152 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
153 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
164 w1[0] = salt_buf0[0];
165 w1[1] = salt_buf0[1];
166 w1[2] = salt_buf0[2];
167 w1[3] = salt_buf0[3];
168 w2[0] = salt_buf1[0];
169 w2[1] = salt_buf1[1];
170 w2[2] = salt_buf1[2];
171 w2[3] = salt_buf1[3];
172 w3[0] = salt_buf2[0];
173 w3[1] = salt_buf2[1];
174 w3[2] = (16 + salt_len) * 8;
182 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
183 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
184 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
185 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
186 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
187 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
188 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
189 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
190 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
191 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
192 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
193 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
194 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
195 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
196 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
197 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
199 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
200 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
201 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
202 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
203 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
204 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
205 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
206 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
207 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
208 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
209 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
210 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
211 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
212 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
213 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
214 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
216 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
217 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
218 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
219 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
220 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
221 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
222 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
223 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
224 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
225 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
226 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
227 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
228 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
229 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
230 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
231 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
233 COMPARE_M_SIMD (a, d, c, b);
237 __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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
241 __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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
245 __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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
251 const u32 lid = get_local_id (0);
257 const u32 gid = get_global_id (0);
259 if (gid >= gid_max) return;
264 pw_buf0[0] = pws[gid].i[0];
265 pw_buf0[1] = pws[gid].i[1];
266 pw_buf0[2] = pws[gid].i[2];
267 pw_buf0[3] = pws[gid].i[3];
268 pw_buf1[0] = pws[gid].i[4];
269 pw_buf1[1] = pws[gid].i[5];
270 pw_buf1[2] = pws[gid].i[6];
271 pw_buf1[3] = pws[gid].i[7];
273 const u32 pw_len = pws[gid].pw_len;
279 const u32 search[4] =
281 digests_buf[digests_offset].digest_buf[DGST_R0],
282 digests_buf[digests_offset].digest_buf[DGST_R1],
283 digests_buf[digests_offset].digest_buf[DGST_R2],
284 digests_buf[digests_offset].digest_buf[DGST_R3]
295 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
296 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
297 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
298 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
299 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
300 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
301 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
302 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
303 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
304 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
305 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
306 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
308 const u32 salt_len = salt_bufs[salt_pos].salt_len;
314 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
321 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
323 append_0x80_2x4_VV (w0, w1, out_len);
325 make_unicode (w1, w2, w3);
326 make_unicode (w0, w0, w1);
328 w3[2] = out_len * 2 * 8;
336 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
337 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
338 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
339 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
340 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
341 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
342 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
343 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
344 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
345 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
346 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
347 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
348 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
349 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
350 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
351 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
353 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
354 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
355 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
356 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
357 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
358 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
359 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
360 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
361 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
362 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
363 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
364 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
365 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
366 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
367 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
368 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
370 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
371 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
372 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
373 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
374 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
375 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
376 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
377 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
378 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
379 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
380 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
381 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
382 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
383 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
384 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
385 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
396 w1[0] = salt_buf0[0];
397 w1[1] = salt_buf0[1];
398 w1[2] = salt_buf0[2];
399 w1[3] = salt_buf0[3];
400 w2[0] = salt_buf1[0];
401 w2[1] = salt_buf1[1];
402 w2[2] = salt_buf1[2];
403 w2[3] = salt_buf1[3];
404 w3[0] = salt_buf2[0];
405 w3[1] = salt_buf2[1];
406 w3[2] = (16 + salt_len) * 8;
414 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
415 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
416 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
417 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
418 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
419 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
420 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
421 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
422 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
423 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
424 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
425 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
426 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
427 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
428 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
429 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
431 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
432 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
433 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
434 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
435 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
436 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
437 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
438 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
439 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
440 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
441 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
442 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
443 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
444 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
445 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
446 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
448 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
449 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
450 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
451 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
452 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
453 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
454 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
455 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
456 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
457 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
458 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
459 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
460 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
462 if (MATCHES_NONE_VS (a, search[0])) continue;
464 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
465 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
466 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
468 COMPARE_S_SIMD (a, d, c, b);
472 __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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
476 __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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)