2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
16 #include "include/kernel_functions.c"
17 #include "OpenCL/types_ocl.c"
18 #include "OpenCL/common.c"
20 #define COMPARE_S "OpenCL/check_single_comp4.c"
21 #define COMPARE_M "OpenCL/check_multi_comp4.c"
23 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
25 __kernel void m02710_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);
33 const u32 lsz = get_local_size (0);
41 wordl0[0] = pws[gid].i[ 0];
42 wordl0[1] = pws[gid].i[ 1];
43 wordl0[2] = pws[gid].i[ 2];
44 wordl0[3] = pws[gid].i[ 3];
48 wordl1[0] = pws[gid].i[ 4];
49 wordl1[1] = pws[gid].i[ 5];
50 wordl1[2] = pws[gid].i[ 6];
51 wordl1[3] = pws[gid].i[ 7];
67 const u32 pw_l_len = pws[gid].pw_len;
69 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
71 append_0x80_2x4 (wordl0, wordl1, pw_l_len);
73 switch_buffer_by_offset_le (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
82 s[0] = salt_bufs[salt_pos].salt_buf[0];
83 s[1] = salt_bufs[salt_pos].salt_buf[1];
84 s[2] = salt_bufs[salt_pos].salt_buf[2];
85 s[3] = salt_bufs[salt_pos].salt_buf[3];
86 s[4] = salt_bufs[salt_pos].salt_buf[4];
87 s[5] = salt_bufs[salt_pos].salt_buf[5];
88 s[6] = salt_bufs[salt_pos].salt_buf[6];
89 s[7] = salt_bufs[salt_pos].salt_buf[7];
91 const u32 salt_len = salt_bufs[salt_pos].salt_len;
93 const u32 r_14 = (32 + salt_len) * 8;
99 __local u32 l_bin2asc[256];
101 for (u32 i = lid; i < 256; i += lsz)
103 const u32 i0 = (i >> 0) & 15;
104 const u32 i1 = (i >> 4) & 15;
106 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
107 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
110 barrier (CLK_LOCAL_MEM_FENCE);
112 if (gid >= gid_max) return;
118 for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
120 const u32 pw_r_len = combs_buf[il_pos].pw_len;
122 const u32 pw_len = pw_l_len + pw_r_len;
126 wordr0[0] = combs_buf[il_pos].i[0];
127 wordr0[1] = combs_buf[il_pos].i[1];
128 wordr0[2] = combs_buf[il_pos].i[2];
129 wordr0[3] = combs_buf[il_pos].i[3];
133 wordr1[0] = combs_buf[il_pos].i[4];
134 wordr1[1] = combs_buf[il_pos].i[5];
135 wordr1[2] = combs_buf[il_pos].i[6];
136 wordr1[3] = combs_buf[il_pos].i[7];
152 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
154 switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
159 w0[0] = wordl0[0] | wordr0[0];
160 w0[1] = wordl0[1] | wordr0[1];
161 w0[2] = wordl0[2] | wordr0[2];
162 w0[3] = wordl0[3] | wordr0[3];
166 w1[0] = wordl1[0] | wordr1[0];
167 w1[1] = wordl1[1] | wordr1[1];
168 w1[2] = wordl1[2] | wordr1[2];
169 w1[3] = wordl1[3] | wordr1[3];
173 w2[0] = wordl2[0] | wordr2[0];
174 w2[1] = wordl2[1] | wordr2[1];
175 w2[2] = wordl2[2] | wordr2[2];
176 w2[3] = wordl2[3] | wordr2[3];
180 w3[0] = wordl3[0] | wordr3[0];
181 w3[1] = wordl3[1] | wordr3[1];
190 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
191 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
192 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
193 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
194 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
195 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
196 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
197 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
198 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
199 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
200 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
201 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
202 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
203 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
204 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
205 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
207 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
208 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
209 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
210 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
211 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
212 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
213 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
214 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
215 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
216 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
217 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
218 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
219 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
220 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
221 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
222 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
224 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
225 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
226 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
227 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
228 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
229 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
230 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
231 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
232 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
233 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
234 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
235 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
236 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
237 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
238 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
239 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
241 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
242 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
243 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
244 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
245 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
246 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
247 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
248 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
249 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
250 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
251 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
252 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
253 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
254 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
255 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
256 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
263 const u32 w0_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
264 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
265 const u32 w1_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
266 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
267 const u32 w2_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
268 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
269 const u32 w3_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
270 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
271 const u32 w4_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
272 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
273 const u32 w5_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
274 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
275 const u32 w6_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
276 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
277 const u32 w7_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
278 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
280 const u32 w8_t = s[0];
281 const u32 w9_t = s[1];
282 const u32 wa_t = s[2];
283 const u32 wb_t = s[3];
284 const u32 wc_t = s[4];
285 const u32 wd_t = s[5];
286 const u32 we_t = s[6];
287 const u32 wf_t = s[7];
294 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
295 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
296 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
297 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
298 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
299 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
300 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
301 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
302 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
303 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
304 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
305 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
306 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
307 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
308 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
309 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
311 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
312 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
313 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
314 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
315 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
316 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
317 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
318 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
319 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
320 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
321 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
322 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
323 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
324 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
325 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
326 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
328 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
329 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
330 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
331 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
332 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
333 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
334 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
335 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
336 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
337 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
338 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
339 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
340 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
341 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
342 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
343 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
345 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
346 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
347 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
348 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
349 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
350 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
351 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
352 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
353 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
354 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
355 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
356 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
357 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
358 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
359 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
360 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
362 const u32 r_a = a + MD5M_A;
363 const u32 r_b = b + MD5M_B;
364 const u32 r_c = c + MD5M_C;
365 const u32 r_d = d + MD5M_D;
372 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C00, MD5S00);
373 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
374 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
375 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
376 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
377 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
378 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
379 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
380 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
381 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
382 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
383 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
384 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
385 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
386 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
387 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
389 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
390 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
391 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
392 MD5_STEP0(MD5_Go, b, c, d, a, MD5C13, MD5S13);
393 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
394 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
395 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
396 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
397 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
398 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
399 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
400 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
401 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
402 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
403 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
404 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
406 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
407 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
408 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
409 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
410 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
411 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
412 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
413 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
414 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
415 MD5_STEP0(MD5_H , d, a, b, c, MD5C29, MD5S21);
416 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
417 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
418 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
419 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
420 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
421 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
423 MD5_STEP0(MD5_I , a, b, c, d, MD5C30, MD5S30);
424 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
425 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
426 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
427 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
428 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
429 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
430 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
431 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
432 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
433 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
434 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
435 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
436 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
437 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
438 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
454 __kernel void m02710_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)
458 __kernel void m02710_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)
462 __kernel void m02710_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)
468 const u32 gid = get_global_id (0);
469 const u32 lid = get_local_id (0);
470 const u32 lsz = get_local_size (0);
478 wordl0[0] = pws[gid].i[ 0];
479 wordl0[1] = pws[gid].i[ 1];
480 wordl0[2] = pws[gid].i[ 2];
481 wordl0[3] = pws[gid].i[ 3];
485 wordl1[0] = pws[gid].i[ 4];
486 wordl1[1] = pws[gid].i[ 5];
487 wordl1[2] = pws[gid].i[ 6];
488 wordl1[3] = pws[gid].i[ 7];
504 const u32 pw_l_len = pws[gid].pw_len;
506 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
508 append_0x80_2x4 (wordl0, wordl1, pw_l_len);
510 switch_buffer_by_offset_le (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
519 s[0] = salt_bufs[salt_pos].salt_buf[0];
520 s[1] = salt_bufs[salt_pos].salt_buf[1];
521 s[2] = salt_bufs[salt_pos].salt_buf[2];
522 s[3] = salt_bufs[salt_pos].salt_buf[3];
523 s[4] = salt_bufs[salt_pos].salt_buf[4];
524 s[5] = salt_bufs[salt_pos].salt_buf[5];
525 s[6] = salt_bufs[salt_pos].salt_buf[6];
526 s[7] = salt_bufs[salt_pos].salt_buf[7];
528 const u32 salt_len = salt_bufs[salt_pos].salt_len;
530 const u32 r_14 = (32 + salt_len) * 8;
536 const u32 search[4] =
538 digests_buf[digests_offset].digest_buf[DGST_R0],
539 digests_buf[digests_offset].digest_buf[DGST_R1],
540 digests_buf[digests_offset].digest_buf[DGST_R2],
541 digests_buf[digests_offset].digest_buf[DGST_R3]
548 __local u32 l_bin2asc[256];
550 for (u32 i = lid; i < 256; i += lsz)
552 const u32 i0 = (i >> 0) & 15;
553 const u32 i1 = (i >> 4) & 15;
555 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
556 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
559 barrier (CLK_LOCAL_MEM_FENCE);
561 if (gid >= gid_max) return;
567 for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
569 const u32 pw_r_len = combs_buf[il_pos].pw_len;
571 const u32 pw_len = pw_l_len + pw_r_len;
575 wordr0[0] = combs_buf[il_pos].i[0];
576 wordr0[1] = combs_buf[il_pos].i[1];
577 wordr0[2] = combs_buf[il_pos].i[2];
578 wordr0[3] = combs_buf[il_pos].i[3];
582 wordr1[0] = combs_buf[il_pos].i[4];
583 wordr1[1] = combs_buf[il_pos].i[5];
584 wordr1[2] = combs_buf[il_pos].i[6];
585 wordr1[3] = combs_buf[il_pos].i[7];
601 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
603 switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
608 w0[0] = wordl0[0] | wordr0[0];
609 w0[1] = wordl0[1] | wordr0[1];
610 w0[2] = wordl0[2] | wordr0[2];
611 w0[3] = wordl0[3] | wordr0[3];
615 w1[0] = wordl1[0] | wordr1[0];
616 w1[1] = wordl1[1] | wordr1[1];
617 w1[2] = wordl1[2] | wordr1[2];
618 w1[3] = wordl1[3] | wordr1[3];
622 w2[0] = wordl2[0] | wordr2[0];
623 w2[1] = wordl2[1] | wordr2[1];
624 w2[2] = wordl2[2] | wordr2[2];
625 w2[3] = wordl2[3] | wordr2[3];
629 w3[0] = wordl3[0] | wordr3[0];
630 w3[1] = wordl3[1] | wordr3[1];
639 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
640 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
641 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
642 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
643 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
644 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
645 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
646 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
647 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
648 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
649 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
650 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
651 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
652 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
653 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
654 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
656 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
657 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
658 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
659 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
660 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
661 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
662 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
663 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
664 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
665 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
666 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
667 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
668 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
669 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
670 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
671 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
673 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
674 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
675 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
676 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
677 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
678 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
679 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
680 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
681 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
682 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
683 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
684 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
685 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
686 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
687 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
688 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
690 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
691 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
692 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
693 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
694 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
695 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
696 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
697 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
698 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
699 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
700 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
701 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
702 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
703 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
704 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
705 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
712 const u32 w0_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
713 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
714 const u32 w1_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
715 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
716 const u32 w2_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
717 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
718 const u32 w3_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
719 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
720 const u32 w4_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
721 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
722 const u32 w5_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
723 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
724 const u32 w6_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
725 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
726 const u32 w7_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
727 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
729 const u32 w8_t = s[0];
730 const u32 w9_t = s[1];
731 const u32 wa_t = s[2];
732 const u32 wb_t = s[3];
733 const u32 wc_t = s[4];
734 const u32 wd_t = s[5];
735 const u32 we_t = s[6];
736 const u32 wf_t = s[7];
743 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
744 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
745 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
746 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
747 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
748 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
749 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
750 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
751 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
752 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
753 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
754 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
755 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
756 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
757 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
758 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
760 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
761 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
762 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
763 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
764 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
765 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
766 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
767 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
768 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
769 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
770 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
771 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
772 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
773 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
774 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
775 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
777 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
778 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
779 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
780 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
781 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
782 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
783 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
784 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
785 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
786 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
787 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
788 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
789 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
790 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
791 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
792 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
794 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
795 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
796 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
797 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
798 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
799 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
800 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
801 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
802 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
803 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
804 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
805 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
806 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
807 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
808 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
809 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
811 const u32 r_a = a + MD5M_A;
812 const u32 r_b = b + MD5M_B;
813 const u32 r_c = c + MD5M_C;
814 const u32 r_d = d + MD5M_D;
821 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C00, MD5S00);
822 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
823 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
824 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
825 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
826 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
827 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
828 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
829 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
830 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
831 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
832 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
833 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
834 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
835 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
836 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
838 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
839 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
840 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
841 MD5_STEP0(MD5_Go, b, c, d, a, MD5C13, MD5S13);
842 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
843 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
844 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
845 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
846 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
847 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
848 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
849 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
850 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
851 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
852 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
853 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
855 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
856 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
857 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
858 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
859 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
860 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
861 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
862 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
863 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
864 MD5_STEP0(MD5_H , d, a, b, c, MD5C29, MD5S21);
865 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
866 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
867 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
868 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
869 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
870 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
872 MD5_STEP0(MD5_I , a, b, c, d, MD5C30, MD5S30);
873 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
874 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
875 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
876 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
877 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
878 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
879 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
880 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
881 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
882 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
883 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
884 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
886 if (allx ((a + r_a) != search[0])) continue;
888 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
889 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
890 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
906 __kernel void m02710_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)
910 __kernel void m02710_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)