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"
21 #include "inc_simd.cl"
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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
29 const u32 gid = get_global_id (0);
30 const u32 lid = get_local_id (0);
35 pw_buf0[0] = pws[gid].i[0];
36 pw_buf0[1] = pws[gid].i[1];
37 pw_buf0[2] = pws[gid].i[2];
38 pw_buf0[3] = pws[gid].i[3];
39 pw_buf1[0] = pws[gid].i[4];
40 pw_buf1[1] = pws[gid].i[5];
41 pw_buf1[2] = pws[gid].i[6];
42 pw_buf1[3] = pws[gid].i[7];
44 const u32 pw_l_len = pws[gid].pw_len;
50 __local salt_t s_salt_buf[1];
54 s_salt_buf[0] = salt_bufs[salt_pos];
56 s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8;
59 barrier (CLK_LOCAL_MEM_FENCE);
61 if (gid >= gid_max) return;
63 #define salt_buf00 s_salt_buf[0].salt_buf[ 0]
64 #define salt_buf01 s_salt_buf[0].salt_buf[ 1]
65 #define salt_buf02 s_salt_buf[0].salt_buf[ 2]
66 #define salt_buf03 s_salt_buf[0].salt_buf[ 3]
67 #define salt_buf04 s_salt_buf[0].salt_buf[ 4]
68 #define salt_buf05 s_salt_buf[0].salt_buf[ 5]
69 #define salt_buf06 s_salt_buf[0].salt_buf[ 6]
70 #define salt_buf07 s_salt_buf[0].salt_buf[ 7]
71 #define salt_buf08 s_salt_buf[0].salt_buf[ 8]
72 #define salt_buf09 s_salt_buf[0].salt_buf[ 9]
73 #define salt_buf10 s_salt_buf[0].salt_buf[10]
79 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
81 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
83 const u32x pw_len = pw_l_len + pw_r_len;
86 * concat password candidate
89 u32x wordl0[4] = { 0 };
90 u32x wordl1[4] = { 0 };
91 u32x wordl2[4] = { 0 };
92 u32x wordl3[4] = { 0 };
94 wordl0[0] = pw_buf0[0];
95 wordl0[1] = pw_buf0[1];
96 wordl0[2] = pw_buf0[2];
97 wordl0[3] = pw_buf0[3];
98 wordl1[0] = pw_buf1[0];
99 wordl1[1] = pw_buf1[1];
100 wordl1[2] = pw_buf1[2];
101 wordl1[3] = pw_buf1[3];
103 u32x wordr0[4] = { 0 };
104 u32x wordr1[4] = { 0 };
105 u32x wordr2[4] = { 0 };
106 u32x wordr3[4] = { 0 };
108 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
109 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
110 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
111 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
112 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
113 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
114 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
115 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
117 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
119 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
123 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
131 w0[0] = wordl0[0] | wordr0[0];
132 w0[1] = wordl0[1] | wordr0[1];
133 w0[2] = wordl0[2] | wordr0[2];
134 w0[3] = wordl0[3] | wordr0[3];
135 w1[0] = wordl1[0] | wordr1[0];
136 w1[1] = wordl1[1] | wordr1[1];
137 w1[2] = wordl1[2] | wordr1[2];
138 w1[3] = wordl1[3] | wordr1[3];
139 w2[0] = wordl2[0] | wordr2[0];
140 w2[1] = wordl2[1] | wordr2[1];
141 w2[2] = wordl2[2] | wordr2[2];
142 w2[3] = wordl2[3] | wordr2[3];
143 w3[0] = wordl3[0] | wordr3[0];
144 w3[1] = wordl3[1] | wordr3[1];
145 w3[2] = wordl3[2] | wordr3[2];
146 w3[3] = wordl3[3] | wordr3[3];
148 make_unicode (w1, w2, w3);
149 make_unicode (w0, w0, w1);
151 w3[2] = pw_len * 2 * 8;
163 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
164 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
165 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
166 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
167 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
168 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
169 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
170 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
171 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
172 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
173 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
174 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
175 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
176 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
177 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
178 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
180 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
181 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
182 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
183 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
184 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
185 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
186 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
187 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
188 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
189 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
190 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
191 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
192 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
193 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
194 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
195 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
197 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
198 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
199 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
200 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
201 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
202 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
203 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
204 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
205 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
206 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
207 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
208 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
209 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
210 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
211 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
212 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
241 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
242 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
243 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
244 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
245 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
246 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
247 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
248 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
249 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
250 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
251 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
252 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
253 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
254 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
255 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
256 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
258 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
259 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
260 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
261 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
262 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
263 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
264 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
265 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
266 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
267 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
268 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
269 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
270 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
271 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
272 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
273 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
275 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
276 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
277 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
278 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
279 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
280 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
281 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
282 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
283 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
284 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
285 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
286 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
287 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
288 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
289 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
290 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
292 COMPARE_M_SIMD (a, d, c, b);
296 __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)
300 __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)
304 __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)
310 const u32 gid = get_global_id (0);
311 const u32 lid = get_local_id (0);
316 pw_buf0[0] = pws[gid].i[0];
317 pw_buf0[1] = pws[gid].i[1];
318 pw_buf0[2] = pws[gid].i[2];
319 pw_buf0[3] = pws[gid].i[3];
320 pw_buf1[0] = pws[gid].i[4];
321 pw_buf1[1] = pws[gid].i[5];
322 pw_buf1[2] = pws[gid].i[6];
323 pw_buf1[3] = pws[gid].i[7];
325 const u32 pw_l_len = pws[gid].pw_len;
331 __local salt_t s_salt_buf[1];
335 s_salt_buf[0] = salt_bufs[salt_pos];
337 s_salt_buf[0].salt_buf[10] = (16 + s_salt_buf[0].salt_len) * 8;
340 barrier (CLK_LOCAL_MEM_FENCE);
342 if (gid >= gid_max) return;
344 #define salt_buf00 s_salt_buf[0].salt_buf[ 0]
345 #define salt_buf01 s_salt_buf[0].salt_buf[ 1]
346 #define salt_buf02 s_salt_buf[0].salt_buf[ 2]
347 #define salt_buf03 s_salt_buf[0].salt_buf[ 3]
348 #define salt_buf04 s_salt_buf[0].salt_buf[ 4]
349 #define salt_buf05 s_salt_buf[0].salt_buf[ 5]
350 #define salt_buf06 s_salt_buf[0].salt_buf[ 6]
351 #define salt_buf07 s_salt_buf[0].salt_buf[ 7]
352 #define salt_buf08 s_salt_buf[0].salt_buf[ 8]
353 #define salt_buf09 s_salt_buf[0].salt_buf[ 9]
354 #define salt_buf10 s_salt_buf[0].salt_buf[10]
360 const u32 search[4] =
362 digests_buf[digests_offset].digest_buf[DGST_R0],
363 digests_buf[digests_offset].digest_buf[DGST_R1],
364 digests_buf[digests_offset].digest_buf[DGST_R2],
365 digests_buf[digests_offset].digest_buf[DGST_R3]
372 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
374 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
376 const u32x pw_len = pw_l_len + pw_r_len;
379 * concat password candidate
382 u32x wordl0[4] = { 0 };
383 u32x wordl1[4] = { 0 };
384 u32x wordl2[4] = { 0 };
385 u32x wordl3[4] = { 0 };
387 wordl0[0] = pw_buf0[0];
388 wordl0[1] = pw_buf0[1];
389 wordl0[2] = pw_buf0[2];
390 wordl0[3] = pw_buf0[3];
391 wordl1[0] = pw_buf1[0];
392 wordl1[1] = pw_buf1[1];
393 wordl1[2] = pw_buf1[2];
394 wordl1[3] = pw_buf1[3];
396 u32x wordr0[4] = { 0 };
397 u32x wordr1[4] = { 0 };
398 u32x wordr2[4] = { 0 };
399 u32x wordr3[4] = { 0 };
401 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
402 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
403 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
404 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
405 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
406 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
407 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
408 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
410 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
412 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
416 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
424 w0[0] = wordl0[0] | wordr0[0];
425 w0[1] = wordl0[1] | wordr0[1];
426 w0[2] = wordl0[2] | wordr0[2];
427 w0[3] = wordl0[3] | wordr0[3];
428 w1[0] = wordl1[0] | wordr1[0];
429 w1[1] = wordl1[1] | wordr1[1];
430 w1[2] = wordl1[2] | wordr1[2];
431 w1[3] = wordl1[3] | wordr1[3];
432 w2[0] = wordl2[0] | wordr2[0];
433 w2[1] = wordl2[1] | wordr2[1];
434 w2[2] = wordl2[2] | wordr2[2];
435 w2[3] = wordl2[3] | wordr2[3];
436 w3[0] = wordl3[0] | wordr3[0];
437 w3[1] = wordl3[1] | wordr3[1];
438 w3[2] = wordl3[2] | wordr3[2];
439 w3[3] = wordl3[3] | wordr3[3];
441 make_unicode (w1, w2, w3);
442 make_unicode (w0, w0, w1);
444 w3[2] = pw_len * 2 * 8;
456 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
457 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
458 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
459 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
460 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
461 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
462 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
463 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
464 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
465 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
466 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
467 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
468 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
469 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
470 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
471 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
473 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
474 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
475 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
476 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
477 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
478 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
479 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
480 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
481 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
482 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
483 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
484 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
485 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
486 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
487 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
488 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
490 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
491 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
492 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
493 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
494 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
495 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
496 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
497 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
498 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
499 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
500 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
501 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
502 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
503 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
504 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
505 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
534 MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
535 MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
536 MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
537 MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
538 MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
539 MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
540 MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
541 MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
542 MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
543 MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
544 MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
545 MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
546 MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
547 MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
548 MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
549 MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
551 MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
552 MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
553 MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
554 MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
555 MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
556 MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
557 MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
558 MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
559 MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
560 MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
561 MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
562 MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
563 MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
564 MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
565 MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
566 MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
568 MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
569 MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
570 MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
571 MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
572 MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
573 MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
574 MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
575 MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
576 MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
577 MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
578 MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
579 MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
580 MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
582 if (MATCHES_NONE_VS (a, search[0])) continue;
584 MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
585 MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
586 MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
588 COMPARE_S_SIMD (a, d, c, b);
592 __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)
596 __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)