2 * Author......: Jens Steube <jens.steube@gmail.com>
10 #include "inc_vendor.cl"
11 #include "inc_hash_constants.h"
12 #include "inc_hash_functions.cl"
13 #include "inc_types.cl"
14 #include "inc_common.cl"
17 #include "inc_simd.cl"
19 __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)
25 const u32 gid = get_global_id (0);
26 const u32 lid = get_local_id (0);
31 pw_buf0[0] = pws[gid].i[0];
32 pw_buf0[1] = pws[gid].i[1];
33 pw_buf0[2] = pws[gid].i[2];
34 pw_buf0[3] = pws[gid].i[3];
35 pw_buf1[0] = pws[gid].i[4];
36 pw_buf1[1] = pws[gid].i[5];
37 pw_buf1[2] = pws[gid].i[6];
38 pw_buf1[3] = pws[gid].i[7];
40 const u32 pw_len = pws[gid].pw_len;
46 __local salt_t s_salt_buf[1];
50 s_salt_buf[0] = salt_bufs[salt_pos];
52 s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8;
55 barrier (CLK_LOCAL_MEM_FENCE);
57 if (gid >= gid_max) return;
59 #define salt_buf00 s_salt_buf[0].salt_buf[ 0]
60 #define salt_buf01 s_salt_buf[0].salt_buf[ 1]
61 #define salt_buf02 s_salt_buf[0].salt_buf[ 2]
62 #define salt_buf03 s_salt_buf[0].salt_buf[ 3]
63 #define salt_buf04 s_salt_buf[0].salt_buf[ 4]
64 #define salt_buf05 s_salt_buf[0].salt_buf[ 5]
65 #define salt_buf06 s_salt_buf[0].salt_buf[ 6]
66 #define salt_buf07 s_salt_buf[0].salt_buf[ 7]
67 #define salt_buf08 s_salt_buf[0].salt_buf[ 8]
68 #define salt_buf09 s_salt_buf[0].salt_buf[ 9]
69 #define salt_buf10 s_salt_buf[0].salt_buf[10]
75 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
82 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
84 append_0x80_2x4_VV (w0, w1, out_len);
86 make_unicode (w1, w2, w3);
87 make_unicode (w0, w0, w1);
89 w3[2] = out_len * 2 * 8;
97 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
98 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
99 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
100 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
101 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
102 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
103 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
104 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
105 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
106 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
107 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
108 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
109 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
110 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
111 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
112 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
114 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
115 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
116 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
117 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
118 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
119 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
120 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
121 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
122 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
123 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
124 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
125 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
126 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
127 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
128 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
129 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
131 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
132 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
133 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
134 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
135 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
136 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
137 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
138 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
139 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
140 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
141 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
142 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
143 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
144 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
145 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
146 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
175 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
176 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
177 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
178 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
179 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
180 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
181 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
182 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
183 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
184 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
185 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
186 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
187 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
188 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
189 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
190 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
192 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
193 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
194 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
195 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
196 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
197 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
198 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
199 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
200 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
201 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
202 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
203 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
204 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
205 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
206 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
207 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
209 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
210 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
211 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
212 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
213 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
214 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
215 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
216 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
217 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
218 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
219 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
220 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
221 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
222 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
223 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
224 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
226 COMPARE_M_SIMD (a, d, c, b);
230 __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)
234 __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)
238 __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)
244 const u32 gid = get_global_id (0);
245 const u32 lid = get_local_id (0);
250 pw_buf0[0] = pws[gid].i[0];
251 pw_buf0[1] = pws[gid].i[1];
252 pw_buf0[2] = pws[gid].i[2];
253 pw_buf0[3] = pws[gid].i[3];
254 pw_buf1[0] = pws[gid].i[4];
255 pw_buf1[1] = pws[gid].i[5];
256 pw_buf1[2] = pws[gid].i[6];
257 pw_buf1[3] = pws[gid].i[7];
259 const u32 pw_len = pws[gid].pw_len;
265 __local salt_t s_salt_buf[1];
269 s_salt_buf[0] = salt_bufs[salt_pos];
271 s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8;
274 barrier (CLK_LOCAL_MEM_FENCE);
276 if (gid >= gid_max) return;
278 #define salt_buf00 s_salt_buf[0].salt_buf[ 0]
279 #define salt_buf01 s_salt_buf[0].salt_buf[ 1]
280 #define salt_buf02 s_salt_buf[0].salt_buf[ 2]
281 #define salt_buf03 s_salt_buf[0].salt_buf[ 3]
282 #define salt_buf04 s_salt_buf[0].salt_buf[ 4]
283 #define salt_buf05 s_salt_buf[0].salt_buf[ 5]
284 #define salt_buf06 s_salt_buf[0].salt_buf[ 6]
285 #define salt_buf07 s_salt_buf[0].salt_buf[ 7]
286 #define salt_buf08 s_salt_buf[0].salt_buf[ 8]
287 #define salt_buf09 s_salt_buf[0].salt_buf[ 9]
288 #define salt_buf10 s_salt_buf[0].salt_buf[10]
294 const u32 search[4] =
296 digests_buf[digests_offset].digest_buf[DGST_R0],
297 digests_buf[digests_offset].digest_buf[DGST_R1],
298 digests_buf[digests_offset].digest_buf[DGST_R2],
299 digests_buf[digests_offset].digest_buf[DGST_R3]
306 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
313 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
315 append_0x80_2x4_VV (w0, w1, out_len);
317 make_unicode (w1, w2, w3);
318 make_unicode (w0, w0, w1);
320 w3[2] = out_len * 2 * 8;
328 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
329 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
330 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
331 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
332 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
333 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
334 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
335 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
336 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
337 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
338 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
339 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
340 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
341 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
342 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
343 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
345 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
346 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
347 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
348 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
349 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
350 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
351 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
352 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
353 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
354 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
355 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
356 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
357 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
358 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
359 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
360 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
362 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
363 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
364 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
365 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
366 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
367 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
368 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
369 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
370 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
371 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
372 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
373 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
374 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
375 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
376 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
377 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
406 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
407 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
408 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
409 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
410 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
411 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
412 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
413 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
414 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
415 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
416 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
417 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
418 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
419 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
420 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
421 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
423 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
424 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
425 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
426 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
427 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
428 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
429 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
430 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
431 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
432 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
433 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
434 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
435 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
436 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
437 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
438 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
440 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
441 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
442 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
443 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
444 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
445 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
446 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
447 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
448 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
449 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
450 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
451 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
452 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
454 if (MATCHES_NONE_VS (a, search[0])) continue;
456 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
457 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
458 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
460 COMPARE_S_SIMD (a, d, c, b);
464 __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)
468 __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)