2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
24 #include "include/kernel_functions.c"
26 #include "common_nv.c"
29 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
30 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
34 #define VECT_COMPARE_S "check_single_vect2_comp4.c"
35 #define VECT_COMPARE_M "check_multi_vect2_comp4.c"
39 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
40 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
43 __device__ __constant__ comb_t c_combs[1024];
46 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
50 #define uint_to_hex_lower8(i) u32x (l_bin2asc[(i).x], l_bin2asc[(i).y])
54 #define uint_to_hex_lower8(i) u32x (l_bin2asc[(i).x], l_bin2asc[(i).y], l_bin2asc[(i).z], l_bin2asc[(i).w])
57 __device__ __constant__ char c_bin2asc[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
59 __device__ __shared__ short l_bin2asc[256];
61 extern "C" __global__ void __launch_bounds__ (256, 1) m02810_m04 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, 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)
67 const u32 lid = threadIdx.x;
73 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
77 wordl0[0] = pws[gid].i[ 0];
78 wordl0[1] = pws[gid].i[ 1];
79 wordl0[2] = pws[gid].i[ 2];
80 wordl0[3] = pws[gid].i[ 3];
84 wordl1[0] = pws[gid].i[ 4];
85 wordl1[1] = pws[gid].i[ 5];
86 wordl1[2] = pws[gid].i[ 6];
87 wordl1[3] = pws[gid].i[ 7];
103 const u32 pw_l_len = pws[gid].pw_len;
105 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
107 append_0x80_2 (wordl0, wordl1, pw_l_len);
109 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
118 s[0] = salt_bufs[salt_pos].salt_buf_pc[0];
119 s[1] = salt_bufs[salt_pos].salt_buf_pc[1];
120 s[2] = salt_bufs[salt_pos].salt_buf_pc[2];
121 s[3] = salt_bufs[salt_pos].salt_buf_pc[3];
122 s[4] = salt_bufs[salt_pos].salt_buf_pc[4];
123 s[5] = salt_bufs[salt_pos].salt_buf_pc[5];
124 s[6] = salt_bufs[salt_pos].salt_buf_pc[6];
125 s[7] = salt_bufs[salt_pos].salt_buf_pc[7];
127 const u32 r_00 = 0x80;
128 const u32 r_14 = 64 * 8;
134 l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
135 | c_bin2asc[(lid >> 4) & 15] << 0;
139 if (gid >= gid_max) return;
145 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
147 const u32 pw_r_len = c_combs[il_pos].pw_len;
149 const u32 pw_len = pw_l_len + pw_r_len;
153 wordr0[0] = c_combs[il_pos].i[0];
154 wordr0[1] = c_combs[il_pos].i[1];
155 wordr0[2] = c_combs[il_pos].i[2];
156 wordr0[3] = c_combs[il_pos].i[3];
160 wordr1[0] = c_combs[il_pos].i[4];
161 wordr1[1] = c_combs[il_pos].i[5];
162 wordr1[2] = c_combs[il_pos].i[6];
163 wordr1[3] = c_combs[il_pos].i[7];
179 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
181 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
186 w0[0] = wordl0[0] | wordr0[0];
187 w0[1] = wordl0[1] | wordr0[1];
188 w0[2] = wordl0[2] | wordr0[2];
189 w0[3] = wordl0[3] | wordr0[3];
193 w1[0] = wordl1[0] | wordr1[0];
194 w1[1] = wordl1[1] | wordr1[1];
195 w1[2] = wordl1[2] | wordr1[2];
196 w1[3] = wordl1[3] | wordr1[3];
200 w2[0] = wordl2[0] | wordr2[0];
201 w2[1] = wordl2[1] | wordr2[1];
202 w2[2] = wordl2[2] | wordr2[2];
203 w2[3] = wordl2[3] | wordr2[3];
207 w3[0] = wordl3[0] | wordr3[0];
208 w3[1] = wordl3[1] | wordr3[1];
217 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
218 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
219 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
220 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
221 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
222 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
223 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
224 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
225 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
226 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
227 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
228 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
229 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
230 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
231 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
232 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
234 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
235 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
236 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
237 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
238 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
239 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
240 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
241 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
242 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
243 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
244 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
245 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
246 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
247 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
248 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
249 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
251 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
252 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
253 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
254 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
255 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
256 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
257 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
258 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
259 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
260 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
261 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
262 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
263 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
264 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
265 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
266 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
268 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
269 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
270 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
271 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
272 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
273 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
274 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
275 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
276 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
277 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
278 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
279 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
280 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
281 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
282 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
283 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
290 const u32 w0_t = s[0];
291 const u32 w1_t = s[1];
292 const u32 w2_t = s[2];
293 const u32 w3_t = s[3];
294 const u32 w4_t = s[4];
295 const u32 w5_t = s[5];
296 const u32 w6_t = s[6];
297 const u32 w7_t = s[7];
299 const u32x w8_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
300 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
301 const u32x w9_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
302 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
303 const u32x wa_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
304 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
305 const u32x wb_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
306 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
307 const u32x wc_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
308 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
309 const u32x wd_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
310 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
311 const u32x we_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
312 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
313 const u32x wf_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
314 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
321 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
322 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
323 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
324 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
325 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
326 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
327 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
328 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
329 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
330 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
331 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
332 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
333 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
334 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
335 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
336 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
338 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
339 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
340 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
341 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
342 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
343 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
344 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
345 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
346 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
347 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
348 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
349 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
350 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
351 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
352 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
353 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
355 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
356 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
357 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
358 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
359 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
360 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
361 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
362 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
363 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
364 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
365 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
366 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
367 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
368 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
369 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
370 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
372 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
373 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
374 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
375 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
376 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
377 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
378 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
379 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
380 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
381 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
382 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
383 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
384 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
385 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
386 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
387 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
389 const u32x r_a = a + MD5M_A;
390 const u32x r_b = b + MD5M_B;
391 const u32x r_c = c + MD5M_C;
392 const u32x r_d = d + MD5M_D;
399 MD5_STEP (MD5_Fo, a, b, c, d, r_00, MD5C00, MD5S00);
400 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
401 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
402 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
403 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
404 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
405 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
406 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
407 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
408 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
409 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
410 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
411 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
412 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
413 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
414 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
416 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
417 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
418 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
419 MD5_STEP (MD5_Go, b, c, d, a, r_00, MD5C13, MD5S13);
420 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
421 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
422 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
423 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
424 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
425 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
426 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
427 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
428 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
429 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
430 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
431 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
433 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
434 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
435 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
436 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
437 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
438 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
439 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
440 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
441 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
442 MD5_STEP (MD5_H , d, a, b, c, r_00, MD5C29, MD5S21);
443 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
444 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
445 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
446 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
447 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
448 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
450 MD5_STEP (MD5_I , a, b, c, d, r_00, MD5C30, MD5S30);
451 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
452 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
453 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
454 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
455 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
456 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
457 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
458 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
459 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
460 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
461 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
462 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
463 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
464 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
465 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
477 #include VECT_COMPARE_M
481 extern "C" __global__ void __launch_bounds__ (256, 1) m02810_m08 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, 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)
485 extern "C" __global__ void __launch_bounds__ (256, 1) m02810_m16 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, 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)
489 extern "C" __global__ void __launch_bounds__ (256, 1) m02810_s04 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, 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)
495 const u32 lid = threadIdx.x;
501 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
505 wordl0[0] = pws[gid].i[ 0];
506 wordl0[1] = pws[gid].i[ 1];
507 wordl0[2] = pws[gid].i[ 2];
508 wordl0[3] = pws[gid].i[ 3];
512 wordl1[0] = pws[gid].i[ 4];
513 wordl1[1] = pws[gid].i[ 5];
514 wordl1[2] = pws[gid].i[ 6];
515 wordl1[3] = pws[gid].i[ 7];
531 const u32 pw_l_len = pws[gid].pw_len;
533 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
535 append_0x80_2 (wordl0, wordl1, pw_l_len);
537 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
546 s[0] = salt_bufs[salt_pos].salt_buf_pc[0];
547 s[1] = salt_bufs[salt_pos].salt_buf_pc[1];
548 s[2] = salt_bufs[salt_pos].salt_buf_pc[2];
549 s[3] = salt_bufs[salt_pos].salt_buf_pc[3];
550 s[4] = salt_bufs[salt_pos].salt_buf_pc[4];
551 s[5] = salt_bufs[salt_pos].salt_buf_pc[5];
552 s[6] = salt_bufs[salt_pos].salt_buf_pc[6];
553 s[7] = salt_bufs[salt_pos].salt_buf_pc[7];
555 const u32 r_00 = 0x80;
556 const u32 r_14 = 64 * 8;
562 const u32 search[4] =
564 digests_buf[digests_offset].digest_buf[DGST_R0],
565 digests_buf[digests_offset].digest_buf[DGST_R1],
566 digests_buf[digests_offset].digest_buf[DGST_R2],
567 digests_buf[digests_offset].digest_buf[DGST_R3]
574 l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
575 | c_bin2asc[(lid >> 4) & 15] << 0;
579 if (gid >= gid_max) return;
585 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
587 const u32 pw_r_len = c_combs[il_pos].pw_len;
589 const u32 pw_len = pw_l_len + pw_r_len;
593 wordr0[0] = c_combs[il_pos].i[0];
594 wordr0[1] = c_combs[il_pos].i[1];
595 wordr0[2] = c_combs[il_pos].i[2];
596 wordr0[3] = c_combs[il_pos].i[3];
600 wordr1[0] = c_combs[il_pos].i[4];
601 wordr1[1] = c_combs[il_pos].i[5];
602 wordr1[2] = c_combs[il_pos].i[6];
603 wordr1[3] = c_combs[il_pos].i[7];
619 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
621 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
626 w0[0] = wordl0[0] | wordr0[0];
627 w0[1] = wordl0[1] | wordr0[1];
628 w0[2] = wordl0[2] | wordr0[2];
629 w0[3] = wordl0[3] | wordr0[3];
633 w1[0] = wordl1[0] | wordr1[0];
634 w1[1] = wordl1[1] | wordr1[1];
635 w1[2] = wordl1[2] | wordr1[2];
636 w1[3] = wordl1[3] | wordr1[3];
640 w2[0] = wordl2[0] | wordr2[0];
641 w2[1] = wordl2[1] | wordr2[1];
642 w2[2] = wordl2[2] | wordr2[2];
643 w2[3] = wordl2[3] | wordr2[3];
647 w3[0] = wordl3[0] | wordr3[0];
648 w3[1] = wordl3[1] | wordr3[1];
657 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
658 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
659 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
660 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
661 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
662 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
663 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
664 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
665 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
666 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
667 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
668 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
669 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
670 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
671 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
672 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
674 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
675 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
676 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
677 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
678 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
679 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
680 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
681 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
682 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
683 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
684 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
685 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
686 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
687 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
688 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
689 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
691 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
692 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
693 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
694 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
695 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
696 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
697 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
698 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
699 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
700 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
701 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
702 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
703 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
704 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
705 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
706 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
708 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
709 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
710 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
711 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
712 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
713 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
714 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
715 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
716 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
717 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
718 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
719 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
720 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
721 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
722 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
723 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
730 const u32 w0_t = s[0];
731 const u32 w1_t = s[1];
732 const u32 w2_t = s[2];
733 const u32 w3_t = s[3];
734 const u32 w4_t = s[4];
735 const u32 w5_t = s[5];
736 const u32 w6_t = s[6];
737 const u32 w7_t = s[7];
739 const u32x w8_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
740 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
741 const u32x w9_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
742 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
743 const u32x wa_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
744 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
745 const u32x wb_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
746 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
747 const u32x wc_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
748 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
749 const u32x wd_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
750 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
751 const u32x we_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
752 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
753 const u32x wf_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
754 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
761 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
762 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
763 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
764 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
765 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
766 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
767 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
768 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
769 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
770 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
771 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
772 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
773 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
774 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
775 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
776 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
778 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
779 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
780 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
781 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
782 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
783 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
784 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
785 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
786 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
787 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
788 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
789 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
790 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
791 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
792 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
793 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
795 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
796 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
797 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
798 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
799 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
800 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
801 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
802 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
803 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
804 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
805 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
806 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
807 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
808 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
809 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
810 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
812 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
813 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
814 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
815 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
816 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
817 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
818 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
819 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
820 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
821 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
822 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
823 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
824 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
825 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
826 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
827 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
829 const u32x r_a = a + MD5M_A;
830 const u32x r_b = b + MD5M_B;
831 const u32x r_c = c + MD5M_C;
832 const u32x r_d = d + MD5M_D;
839 MD5_STEP (MD5_Fo, a, b, c, d, r_00, MD5C00, MD5S00);
840 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
841 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
842 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
843 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
844 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
845 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
846 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
847 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
848 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
849 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
850 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
851 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
852 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
853 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
854 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
856 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
857 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
858 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
859 MD5_STEP (MD5_Go, b, c, d, a, r_00, MD5C13, MD5S13);
860 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
861 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
862 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
863 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
864 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
865 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
866 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
867 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
868 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
869 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
870 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
871 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
873 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
874 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
875 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
876 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
877 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
878 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
879 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
880 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
881 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
882 MD5_STEP (MD5_H , d, a, b, c, r_00, MD5C29, MD5S21);
883 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
884 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
885 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
886 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
887 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
888 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
890 MD5_STEP (MD5_I , a, b, c, d, r_00, MD5C30, MD5S30);
891 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
892 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
893 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
894 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
895 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
896 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
897 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
898 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
899 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
900 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
901 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
902 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
904 if ((a + r_a) != search[0]) continue;
906 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
907 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
908 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
920 #include VECT_COMPARE_S
924 extern "C" __global__ void __launch_bounds__ (256, 1) m02810_s08 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, 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)
928 extern "C" __global__ void __launch_bounds__ (256, 1) m02810_s16 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, 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)