2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
28 #include "include/kernel_functions.c"
29 #include "types_amd.c"
30 #include "common_amd.c"
31 #include "include/rp_gpu.h"
35 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
36 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
40 #define VECT_COMPARE_S "check_single_vect2_comp4.c"
41 #define VECT_COMPARE_M "check_multi_vect2_comp4.c"
45 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
46 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
50 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
54 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
58 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
61 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02810_m04 (__global pw_t *pws, __global gpu_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
67 const u32 lid = get_local_id (0);
73 const u32 gid = get_global_id (0);
77 pw_buf0[0] = pws[gid].i[ 0];
78 pw_buf0[1] = pws[gid].i[ 1];
79 pw_buf0[2] = pws[gid].i[ 2];
80 pw_buf0[3] = pws[gid].i[ 3];
84 pw_buf1[0] = pws[gid].i[ 4];
85 pw_buf1[1] = pws[gid].i[ 5];
86 pw_buf1[2] = pws[gid].i[ 6];
87 pw_buf1[3] = pws[gid].i[ 7];
89 const u32 pw_len = pws[gid].pw_len;
97 s[0] = salt_bufs[salt_pos].salt_buf_pc[0];
98 s[1] = salt_bufs[salt_pos].salt_buf_pc[1];
99 s[2] = salt_bufs[salt_pos].salt_buf_pc[2];
100 s[3] = salt_bufs[salt_pos].salt_buf_pc[3];
101 s[4] = salt_bufs[salt_pos].salt_buf_pc[4];
102 s[5] = salt_bufs[salt_pos].salt_buf_pc[5];
103 s[6] = salt_bufs[salt_pos].salt_buf_pc[6];
104 s[7] = salt_bufs[salt_pos].salt_buf_pc[7];
106 const u32 r_00 = 0x80;
107 const u32 r_14 = 64 * 8;
113 __local u32 l_bin2asc[256];
115 const u32 lid4 = lid * 4;
117 const u32 lid40 = lid4 + 0;
118 const u32 lid41 = lid4 + 1;
119 const u32 lid42 = lid4 + 2;
120 const u32 lid43 = lid4 + 3;
122 const u32 v400 = (lid40 >> 0) & 15;
123 const u32 v401 = (lid40 >> 4) & 15;
124 const u32 v410 = (lid41 >> 0) & 15;
125 const u32 v411 = (lid41 >> 4) & 15;
126 const u32 v420 = (lid42 >> 0) & 15;
127 const u32 v421 = (lid42 >> 4) & 15;
128 const u32 v430 = (lid43 >> 0) & 15;
129 const u32 v431 = (lid43 >> 4) & 15;
131 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
132 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
133 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
134 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
135 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
136 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
137 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
138 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
140 barrier (CLK_LOCAL_MEM_FENCE);
142 if (gid >= gid_max) return;
152 for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
182 const u32 out_len = apply_rules (rules_buf[il_pos].cmds, w0, w1, pw_len);
184 append_0x80_2 (w0, w1, out_len);
193 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
194 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
195 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
196 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
197 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
198 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
199 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
200 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
201 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
202 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
203 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
204 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
205 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
206 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
207 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
208 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
210 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
211 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
212 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
213 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
214 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
215 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
216 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
217 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
218 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
219 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
220 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
221 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
222 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
223 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
224 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
225 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
227 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
228 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
229 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
230 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
231 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
232 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
233 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
234 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
235 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
236 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
237 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
238 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
239 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
240 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
241 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
242 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
244 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
245 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
246 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
247 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
248 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
249 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
250 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
251 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
252 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
253 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
254 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
255 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
256 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
257 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
258 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
259 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
266 const u32 w0_t = s[0];
267 const u32 w1_t = s[1];
268 const u32 w2_t = s[2];
269 const u32 w3_t = s[3];
270 const u32 w4_t = s[4];
271 const u32 w5_t = s[5];
272 const u32 w6_t = s[6];
273 const u32 w7_t = s[7];
275 const u32x w8_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
276 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
277 const u32x w9_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
278 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
279 const u32x wa_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
280 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
281 const u32x wb_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
282 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
283 const u32x wc_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
284 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
285 const u32x wd_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
286 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
287 const u32x we_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
288 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
289 const u32x wf_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
290 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
297 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
298 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
299 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
300 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
301 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
302 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
303 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
304 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
305 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
306 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
307 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
308 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
309 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
310 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
311 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
312 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
314 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
315 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
316 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
317 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
318 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
319 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
320 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
321 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
322 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
323 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
324 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
325 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
326 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
327 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
328 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
329 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
331 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
332 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
333 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
334 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
335 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
336 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
337 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
338 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
339 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
340 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
341 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
342 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
343 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
344 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
345 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
346 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
348 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
349 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
350 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
351 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
352 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
353 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
354 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
355 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
356 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
357 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
358 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
359 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
360 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
361 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
362 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
363 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
365 const u32x r_a = a + MD5M_A;
366 const u32x r_b = b + MD5M_B;
367 const u32x r_c = c + MD5M_C;
368 const u32x r_d = d + MD5M_D;
375 MD5_STEP (MD5_Fo, a, b, c, d, r_00, MD5C00, MD5S00);
376 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
377 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
378 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
379 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
380 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
381 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
382 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
383 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
384 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
385 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
386 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
387 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
388 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
389 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
390 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
392 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
393 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
394 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
395 MD5_STEP (MD5_Go, b, c, d, a, r_00, MD5C13, MD5S13);
396 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
397 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
398 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
399 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
400 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
401 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
402 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
403 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
404 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
405 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
406 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
407 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
409 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
410 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
411 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
412 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
413 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
414 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
415 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
416 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
417 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
418 MD5_STEP (MD5_H , d, a, b, c, r_00, MD5C29, MD5S21);
419 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
420 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
421 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
422 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
423 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
424 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
426 MD5_STEP (MD5_I , a, b, c, d, r_00, MD5C30, MD5S30);
427 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
428 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
429 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
430 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
431 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
432 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
433 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
434 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
435 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
436 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
437 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
438 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
439 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
440 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
441 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
453 #include VECT_COMPARE_M
457 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02810_m08 (__global pw_t *pws, __global gpu_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
461 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02810_m16 (__global pw_t *pws, __global gpu_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
465 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02810_s04 (__global pw_t *pws, __global gpu_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
471 const u32 lid = get_local_id (0);
477 const u32 gid = get_global_id (0);
481 pw_buf0[0] = pws[gid].i[ 0];
482 pw_buf0[1] = pws[gid].i[ 1];
483 pw_buf0[2] = pws[gid].i[ 2];
484 pw_buf0[3] = pws[gid].i[ 3];
488 pw_buf1[0] = pws[gid].i[ 4];
489 pw_buf1[1] = pws[gid].i[ 5];
490 pw_buf1[2] = pws[gid].i[ 6];
491 pw_buf1[3] = pws[gid].i[ 7];
493 const u32 pw_len = pws[gid].pw_len;
501 s[0] = salt_bufs[salt_pos].salt_buf_pc[0];
502 s[1] = salt_bufs[salt_pos].salt_buf_pc[1];
503 s[2] = salt_bufs[salt_pos].salt_buf_pc[2];
504 s[3] = salt_bufs[salt_pos].salt_buf_pc[3];
505 s[4] = salt_bufs[salt_pos].salt_buf_pc[4];
506 s[5] = salt_bufs[salt_pos].salt_buf_pc[5];
507 s[6] = salt_bufs[salt_pos].salt_buf_pc[6];
508 s[7] = salt_bufs[salt_pos].salt_buf_pc[7];
510 const u32 r_00 = 0x80;
511 const u32 r_14 = 64 * 8;
517 const u32 search[4] =
519 digests_buf[digests_offset].digest_buf[DGST_R0],
520 digests_buf[digests_offset].digest_buf[DGST_R1],
521 digests_buf[digests_offset].digest_buf[DGST_R2],
522 digests_buf[digests_offset].digest_buf[DGST_R3]
529 __local u32 l_bin2asc[256];
531 const u32 lid4 = lid * 4;
533 const u32 lid40 = lid4 + 0;
534 const u32 lid41 = lid4 + 1;
535 const u32 lid42 = lid4 + 2;
536 const u32 lid43 = lid4 + 3;
538 const u32 v400 = (lid40 >> 0) & 15;
539 const u32 v401 = (lid40 >> 4) & 15;
540 const u32 v410 = (lid41 >> 0) & 15;
541 const u32 v411 = (lid41 >> 4) & 15;
542 const u32 v420 = (lid42 >> 0) & 15;
543 const u32 v421 = (lid42 >> 4) & 15;
544 const u32 v430 = (lid43 >> 0) & 15;
545 const u32 v431 = (lid43 >> 4) & 15;
547 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
548 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
549 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
550 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
551 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
552 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
553 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
554 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
556 barrier (CLK_LOCAL_MEM_FENCE);
558 if (gid >= gid_max) return;
564 for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
594 const u32 out_len = apply_rules (rules_buf[il_pos].cmds, w0, w1, pw_len);
596 append_0x80_2 (w0, w1, out_len);
605 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
606 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
607 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
608 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
609 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
610 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
611 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
612 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
613 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
614 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
615 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
616 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
617 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
618 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
619 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
620 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
622 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
623 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
624 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
625 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
626 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
627 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
628 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
629 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
630 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
631 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
632 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
633 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
634 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
635 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
636 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
637 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
639 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
640 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
641 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
642 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
643 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
644 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
645 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
646 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
647 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
648 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
649 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
650 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
651 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
652 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
653 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
654 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
656 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
657 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
658 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
659 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
660 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
661 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
662 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
663 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
664 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
665 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
666 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
667 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
668 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
669 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
670 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
671 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
678 const u32 w0_t = s[0];
679 const u32 w1_t = s[1];
680 const u32 w2_t = s[2];
681 const u32 w3_t = s[3];
682 const u32 w4_t = s[4];
683 const u32 w5_t = s[5];
684 const u32 w6_t = s[6];
685 const u32 w7_t = s[7];
687 const u32x w8_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
688 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
689 const u32x w9_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
690 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
691 const u32x wa_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
692 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
693 const u32x wb_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
694 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
695 const u32x wc_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
696 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
697 const u32x wd_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
698 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
699 const u32x we_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
700 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
701 const u32x wf_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
702 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
709 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
710 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
711 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
712 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
713 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
714 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
715 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
716 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
717 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
718 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
719 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
720 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
721 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
722 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
723 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
724 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
726 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
727 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
728 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
729 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
730 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
731 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
732 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
733 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
734 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
735 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
736 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
737 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
738 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
739 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
740 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
741 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
743 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
744 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
745 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
746 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
747 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
748 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
749 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
750 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
751 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
752 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
753 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
754 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
755 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
756 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
757 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
758 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
760 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
761 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
762 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
763 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
764 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
765 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
766 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
767 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
768 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
769 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
770 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
771 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
772 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
773 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
774 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
775 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
777 const u32x r_a = a + MD5M_A;
778 const u32x r_b = b + MD5M_B;
779 const u32x r_c = c + MD5M_C;
780 const u32x r_d = d + MD5M_D;
787 MD5_STEP (MD5_Fo, a, b, c, d, r_00, MD5C00, MD5S00);
788 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
789 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
790 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
791 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
792 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
793 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
794 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
795 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
796 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
797 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
798 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
799 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
800 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
801 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
802 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
804 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
805 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
806 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
807 MD5_STEP (MD5_Go, b, c, d, a, r_00, MD5C13, MD5S13);
808 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
809 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
810 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
811 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
812 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
813 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
814 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
815 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
816 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
817 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
818 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
819 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
821 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
822 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
823 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
824 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
825 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
826 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
827 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
828 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
829 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
830 MD5_STEP (MD5_H , d, a, b, c, r_00, MD5C29, MD5S21);
831 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
832 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
833 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
834 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
835 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
836 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
838 MD5_STEP (MD5_I , a, b, c, d, r_00, MD5C30, MD5S30);
839 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
840 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
841 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
842 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
843 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
844 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
845 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
846 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
847 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
848 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
849 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
850 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
852 if (allx ((a + r_a) != search[0])) continue;
854 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
855 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
856 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
868 #include VECT_COMPARE_S
872 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02810_s08 (__global pw_t *pws, __global gpu_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
876 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02810_s16 (__global pw_t *pws, __global gpu_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)