2 * Author......: Jens Steube <jens.steube@gmail.com>
10 #include "inc_hash_constants.h"
11 #include "inc_vendor.cl"
18 #include "inc_hash_functions.cl"
19 #include "inc_types.cl"
20 #include "inc_common.cl"
23 #include "inc_simd.cl"
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 gid = get_global_id (0);
32 const u32 lid = get_local_id (0);
37 pw_buf0[0] = pws[gid].i[0];
38 pw_buf0[1] = pws[gid].i[1];
39 pw_buf0[2] = pws[gid].i[2];
40 pw_buf0[3] = pws[gid].i[3];
41 pw_buf1[0] = pws[gid].i[4];
42 pw_buf1[1] = pws[gid].i[5];
43 pw_buf1[2] = pws[gid].i[6];
44 pw_buf1[3] = pws[gid].i[7];
46 const u32 pw_len = pws[gid].pw_len;
52 __local salt_t s_salt_buf[1];
56 s_salt_buf[0] = salt_bufs[salt_pos];
58 s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8;
61 barrier (CLK_LOCAL_MEM_FENCE);
63 if (gid >= gid_max) return;
65 #define salt_buf00 s_salt_buf[0].salt_buf[ 0]
66 #define salt_buf01 s_salt_buf[0].salt_buf[ 1]
67 #define salt_buf02 s_salt_buf[0].salt_buf[ 2]
68 #define salt_buf03 s_salt_buf[0].salt_buf[ 3]
69 #define salt_buf04 s_salt_buf[0].salt_buf[ 4]
70 #define salt_buf05 s_salt_buf[0].salt_buf[ 5]
71 #define salt_buf06 s_salt_buf[0].salt_buf[ 6]
72 #define salt_buf07 s_salt_buf[0].salt_buf[ 7]
73 #define salt_buf08 s_salt_buf[0].salt_buf[ 8]
74 #define salt_buf09 s_salt_buf[0].salt_buf[ 9]
75 #define salt_buf10 s_salt_buf[0].salt_buf[10]
81 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
88 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
90 append_0x80_2x4_VV (w0, w1, out_len);
92 make_unicode (w1, w2, w3);
93 make_unicode (w0, w0, w1);
95 w3[2] = out_len * 2 * 8;
103 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
104 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
105 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
106 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
107 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
108 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
109 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
110 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
111 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
112 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
113 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
114 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
115 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
116 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
117 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
118 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
120 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
121 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
122 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
123 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
124 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
125 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
126 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
127 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
128 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
129 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
130 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
131 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
132 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
133 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
134 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
135 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
137 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
138 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
139 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
140 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
141 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
142 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
143 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
144 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
145 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
146 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
147 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
148 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
149 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
150 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
151 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
152 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
181 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
182 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
183 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
184 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
185 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
186 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
187 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
188 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
189 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
190 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
191 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
192 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
193 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
194 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
195 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
196 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
198 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
199 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
200 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
201 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
202 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
203 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
204 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
205 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
206 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
207 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
208 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
209 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
210 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
211 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
212 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
213 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
215 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
216 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
217 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
218 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
219 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
220 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
221 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
222 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
223 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
224 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
225 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
226 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
227 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
228 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
229 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
230 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
232 COMPARE_M_SIMD (a, d, c, b);
236 __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)
240 __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)
244 __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)
250 const u32 gid = get_global_id (0);
251 const u32 lid = get_local_id (0);
256 pw_buf0[0] = pws[gid].i[0];
257 pw_buf0[1] = pws[gid].i[1];
258 pw_buf0[2] = pws[gid].i[2];
259 pw_buf0[3] = pws[gid].i[3];
260 pw_buf1[0] = pws[gid].i[4];
261 pw_buf1[1] = pws[gid].i[5];
262 pw_buf1[2] = pws[gid].i[6];
263 pw_buf1[3] = pws[gid].i[7];
265 const u32 pw_len = pws[gid].pw_len;
271 __local salt_t s_salt_buf[1];
275 s_salt_buf[0] = salt_bufs[salt_pos];
277 s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8;
280 barrier (CLK_LOCAL_MEM_FENCE);
282 if (gid >= gid_max) return;
284 #define salt_buf00 s_salt_buf[0].salt_buf[ 0]
285 #define salt_buf01 s_salt_buf[0].salt_buf[ 1]
286 #define salt_buf02 s_salt_buf[0].salt_buf[ 2]
287 #define salt_buf03 s_salt_buf[0].salt_buf[ 3]
288 #define salt_buf04 s_salt_buf[0].salt_buf[ 4]
289 #define salt_buf05 s_salt_buf[0].salt_buf[ 5]
290 #define salt_buf06 s_salt_buf[0].salt_buf[ 6]
291 #define salt_buf07 s_salt_buf[0].salt_buf[ 7]
292 #define salt_buf08 s_salt_buf[0].salt_buf[ 8]
293 #define salt_buf09 s_salt_buf[0].salt_buf[ 9]
294 #define salt_buf10 s_salt_buf[0].salt_buf[10]
300 const u32 search[4] =
302 digests_buf[digests_offset].digest_buf[DGST_R0],
303 digests_buf[digests_offset].digest_buf[DGST_R1],
304 digests_buf[digests_offset].digest_buf[DGST_R2],
305 digests_buf[digests_offset].digest_buf[DGST_R3]
312 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
319 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
321 append_0x80_2x4_VV (w0, w1, out_len);
323 make_unicode (w1, w2, w3);
324 make_unicode (w0, w0, w1);
326 w3[2] = out_len * 2 * 8;
334 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
335 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
336 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
337 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
338 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
339 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
340 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
341 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
342 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
343 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
344 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
345 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
346 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
347 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
348 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
349 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
351 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
352 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
353 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
354 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
355 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
356 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
357 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
358 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
359 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
360 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
361 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
362 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
363 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
364 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
365 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
366 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
368 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
369 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
370 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
371 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
372 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
373 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
374 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
375 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
376 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
377 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
378 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
379 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
380 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
381 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
382 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
383 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
412 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
413 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
414 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
415 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
416 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
417 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
418 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
419 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
420 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
421 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
422 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
423 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
424 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
425 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
426 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
427 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
429 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
430 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
431 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
432 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
433 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
434 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
435 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
436 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
437 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
438 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
439 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
440 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
441 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
442 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
443 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
444 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
446 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
447 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
448 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
449 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
450 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
451 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
452 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
453 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
454 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
455 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
456 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
457 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
458 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
460 if (MATCHES_NONE_VS (a, search[0])) continue;
462 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
463 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
464 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
466 COMPARE_S_SIMD (a, d, c, b);
470 __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)
474 __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)