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"
27 #include "include/rp_gpu.h"
31 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
32 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
36 #define VECT_COMPARE_S "check_single_vect2_comp4.c"
37 #define VECT_COMPARE_M "check_multi_vect2_comp4.c"
41 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
42 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
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 __device__ __constant__ gpu_rule_t c_rules[1024];
63 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
69 const u32 lid = threadIdx.x;
75 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
79 pw_buf0[0] = pws[gid].i[ 0];
80 pw_buf0[1] = pws[gid].i[ 1];
81 pw_buf0[2] = pws[gid].i[ 2];
82 pw_buf0[3] = pws[gid].i[ 3];
86 pw_buf1[0] = pws[gid].i[ 4];
87 pw_buf1[1] = pws[gid].i[ 5];
88 pw_buf1[2] = pws[gid].i[ 6];
89 pw_buf1[3] = pws[gid].i[ 7];
91 const u32 pw_len = pws[gid].pw_len;
99 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
100 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
101 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
102 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
106 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
107 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
108 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
109 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
125 const u32 salt_len = salt_bufs[salt_pos].salt_len;
127 const u32 pw_salt_len = 32 + salt_len;
133 l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
134 | c_bin2asc[(lid >> 4) & 15] << 0;
139 if (gid >= gid_max) return;
145 for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
175 const u32 out_len = apply_rules (c_rules[il_pos].cmds, w0, w1, pw_len);
177 append_0x80_2 (w0, w1, out_len);
186 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
187 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
188 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
189 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
190 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
191 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
192 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
193 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
194 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
195 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
196 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
197 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
198 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
199 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
200 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
201 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
203 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
204 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
205 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
206 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
207 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
208 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
209 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
210 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
211 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
212 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
213 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
214 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
215 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
216 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
217 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
218 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
220 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
221 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
222 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
223 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
224 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
225 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
226 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
227 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
228 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
229 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
230 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
231 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
232 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
233 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
234 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
235 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
237 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
238 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
239 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
240 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
241 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
242 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
243 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
244 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
245 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
246 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
247 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
248 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
249 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
250 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
251 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
252 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
264 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
265 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
266 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
267 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
268 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
269 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
270 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
271 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
272 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
273 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
274 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
275 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
276 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
277 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
278 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
279 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
281 w2_t[0] = 0x00000080;
295 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
297 w3_t[2] = pw_salt_len * 8;
299 w0_t[0] |= salt_buf0[0];
300 w0_t[1] |= salt_buf0[1];
301 w0_t[2] |= salt_buf0[2];
302 w0_t[3] |= salt_buf0[3];
303 w1_t[0] |= salt_buf1[0];
304 w1_t[1] |= salt_buf1[1];
305 w1_t[2] |= salt_buf1[2];
306 w1_t[3] |= salt_buf1[3];
307 w2_t[0] |= salt_buf2[0];
308 w2_t[1] |= salt_buf2[1];
309 w2_t[2] |= salt_buf2[2];
310 w2_t[3] |= salt_buf2[3];
311 w3_t[0] |= salt_buf3[0];
312 w3_t[1] |= salt_buf3[1];
313 w3_t[2] |= salt_buf3[2];
314 w3_t[3] |= salt_buf3[3];
325 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
326 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
327 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
328 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
329 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
330 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
331 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
332 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
333 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
334 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
335 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
336 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
337 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
338 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
339 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
340 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
342 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
343 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
344 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
345 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
346 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
347 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
348 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
349 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
350 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
351 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
352 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
353 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
354 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
355 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
356 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
357 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
359 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
360 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
361 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
362 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
363 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
364 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
365 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
366 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
367 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
368 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
369 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
370 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
371 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
372 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
373 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
374 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
376 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
377 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
378 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
379 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
380 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
381 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
382 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
383 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
384 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
385 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
386 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
387 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
388 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
389 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
390 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
391 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
398 #include VECT_COMPARE_M
402 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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)
406 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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)
410 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
416 const u32 lid = threadIdx.x;
422 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
426 pw_buf0[0] = pws[gid].i[ 0];
427 pw_buf0[1] = pws[gid].i[ 1];
428 pw_buf0[2] = pws[gid].i[ 2];
429 pw_buf0[3] = pws[gid].i[ 3];
433 pw_buf1[0] = pws[gid].i[ 4];
434 pw_buf1[1] = pws[gid].i[ 5];
435 pw_buf1[2] = pws[gid].i[ 6];
436 pw_buf1[3] = pws[gid].i[ 7];
438 const u32 pw_len = pws[gid].pw_len;
446 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
447 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
448 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
449 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
453 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
454 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
455 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
456 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
472 const u32 salt_len = salt_bufs[salt_pos].salt_len;
474 const u32 pw_salt_len = 32 + salt_len;
480 const u32 search[4] =
482 digests_buf[digests_offset].digest_buf[DGST_R0],
483 digests_buf[digests_offset].digest_buf[DGST_R1],
484 digests_buf[digests_offset].digest_buf[DGST_R2],
485 digests_buf[digests_offset].digest_buf[DGST_R3]
492 l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
493 | c_bin2asc[(lid >> 4) & 15] << 0;
497 if (gid >= gid_max) return;
503 for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
533 const u32 out_len = apply_rules (c_rules[il_pos].cmds, w0, w1, pw_len);
535 append_0x80_2 (w0, w1, out_len);
544 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
545 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
546 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
547 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
548 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
549 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
550 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
551 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
552 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
553 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
554 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
555 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
556 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
557 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
558 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
559 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
561 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
562 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
563 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
564 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
565 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
566 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
567 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
568 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
569 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
570 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
571 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
572 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
573 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
574 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
575 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
576 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
578 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
579 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
580 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
581 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
582 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
583 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
584 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
585 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
586 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
587 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
588 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
589 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
590 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
591 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
592 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
593 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
595 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
596 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
597 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
598 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
599 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
600 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
601 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
602 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
603 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
604 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
605 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
606 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
607 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
608 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
609 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
610 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
622 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
623 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
624 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
625 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
626 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
627 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
628 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
629 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
630 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
631 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
632 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
633 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
634 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
635 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
636 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
637 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
639 w2_t[0] = 0x00000080;
653 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
655 w3_t[2] = pw_salt_len * 8;
657 w0_t[0] |= salt_buf0[0];
658 w0_t[1] |= salt_buf0[1];
659 w0_t[2] |= salt_buf0[2];
660 w0_t[3] |= salt_buf0[3];
661 w1_t[0] |= salt_buf1[0];
662 w1_t[1] |= salt_buf1[1];
663 w1_t[2] |= salt_buf1[2];
664 w1_t[3] |= salt_buf1[3];
665 w2_t[0] |= salt_buf2[0];
666 w2_t[1] |= salt_buf2[1];
667 w2_t[2] |= salt_buf2[2];
668 w2_t[3] |= salt_buf2[3];
669 w3_t[0] |= salt_buf3[0];
670 w3_t[1] |= salt_buf3[1];
671 w3_t[2] |= salt_buf3[2];
672 w3_t[3] |= salt_buf3[3];
683 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
684 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
685 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
686 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
687 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
688 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
689 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
690 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
691 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
692 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
693 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
694 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
695 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
696 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
697 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
698 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
700 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
701 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
702 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
703 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
704 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
705 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
706 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
707 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
708 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
709 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
710 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
711 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
712 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
713 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
714 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
715 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
717 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
718 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
719 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
720 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
721 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
722 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
723 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
724 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
725 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
726 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
727 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
728 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
729 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
730 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
731 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
732 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
734 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
735 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
736 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
737 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
738 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
739 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
740 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
741 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
742 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
743 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
744 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
745 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
746 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
747 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
748 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
749 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
756 #include VECT_COMPARE_S
760 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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)
764 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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)