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];
45 extern "C" __global__ void __launch_bounds__ (256, 1) m11000_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)
51 const u32 lid = threadIdx.x;
57 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
59 if (gid >= gid_max) return;
63 wordl0[0] = pws[gid].i[ 0];
64 wordl0[1] = pws[gid].i[ 1];
65 wordl0[2] = pws[gid].i[ 2];
66 wordl0[3] = pws[gid].i[ 3];
70 wordl1[0] = pws[gid].i[ 4];
71 wordl1[1] = pws[gid].i[ 5];
72 wordl1[2] = pws[gid].i[ 6];
73 wordl1[3] = pws[gid].i[ 7];
89 const u32 pw_l_len = pws[gid].pw_len;
91 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
93 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
102 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
103 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
104 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
105 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
109 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
110 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
111 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
112 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
116 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
117 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
118 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
119 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
123 salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
124 salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
126 const u32 salt_len = salt_bufs[salt_pos].salt_len;
132 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
134 const u32 pw_r_len = c_combs[il_pos].pw_len;
136 const u32 pw_len = pw_l_len + pw_r_len;
143 wordr0[0] = c_combs[il_pos].i[0];
144 wordr0[1] = c_combs[il_pos].i[1];
145 wordr0[2] = c_combs[il_pos].i[2];
146 wordr0[3] = c_combs[il_pos].i[3];
147 wordr1[0] = c_combs[il_pos].i[4];
148 wordr1[1] = c_combs[il_pos].i[5];
149 wordr1[2] = c_combs[il_pos].i[6];
150 wordr1[3] = c_combs[il_pos].i[7];
160 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
162 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
170 w0[0] = wordl0[0] | wordr0[0];
171 w0[1] = wordl0[1] | wordr0[1];
172 w0[2] = wordl0[2] | wordr0[2];
173 w0[3] = wordl0[3] | wordr0[3];
174 w1[0] = wordl1[0] | wordr1[0];
175 w1[1] = wordl1[1] | wordr1[1];
176 w1[2] = wordl1[2] | wordr1[2];
177 w1[3] = wordl1[3] | wordr1[3];
178 w2[0] = wordl2[0] | wordr2[0];
179 w2[1] = wordl2[1] | wordr2[1];
180 w2[2] = wordl2[2] | wordr2[2];
181 w2[3] = wordl2[3] | wordr2[3];
182 w3[0] = wordl3[0] | wordr3[0];
183 w3[1] = wordl3[1] | wordr3[1];
184 w3[2] = wordl3[2] | wordr3[2];
185 w3[3] = wordl3[3] | wordr3[3];
187 append_0x80_4 (w0, w1, w2, w3, pw_len);
189 const u32 pw_salt_len = pw_len + salt_len;
195 // first step fixed 56 bytes of salt
202 w0_t[0] = salt_buf0[0];
203 w0_t[1] = salt_buf0[1];
204 w0_t[2] = salt_buf0[2];
205 w0_t[3] = salt_buf0[3];
206 w1_t[0] = salt_buf1[0];
207 w1_t[1] = salt_buf1[1];
208 w1_t[2] = salt_buf1[2];
209 w1_t[3] = salt_buf1[3];
210 w2_t[0] = salt_buf2[0];
211 w2_t[1] = salt_buf2[1];
212 w2_t[2] = salt_buf2[2];
213 w2_t[3] = salt_buf2[3];
214 w3_t[0] = salt_buf3[0];
215 w3_t[1] = salt_buf3[1];
217 // after 56 byte salt, we have beginning of the password
233 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
234 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
235 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
236 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
237 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
238 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
239 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
240 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
241 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
242 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
243 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
244 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
245 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
246 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
247 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
248 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
250 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
251 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
252 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
253 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
254 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
255 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
256 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
257 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
258 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
259 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
260 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
261 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
262 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
263 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
264 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
265 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
267 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
268 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
269 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
270 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
271 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
272 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
273 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
274 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
275 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
276 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
277 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
278 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
279 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
280 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
281 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
282 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
284 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
285 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
286 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
287 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
288 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
289 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
290 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
291 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
292 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
293 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
294 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
295 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
296 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
297 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
298 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
299 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
327 w3_t[2] = pw_salt_len * 8;
330 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
331 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
332 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
333 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
334 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
335 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
336 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
337 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
338 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
339 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
340 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
341 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
342 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
343 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
344 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
345 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
347 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
348 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
349 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
350 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
351 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
352 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
353 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
354 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
355 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
356 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
357 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
358 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
359 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
360 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
361 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
362 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
364 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
365 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
366 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
367 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
368 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
369 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
370 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
371 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
372 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
373 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
374 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
375 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
376 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
377 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
378 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
379 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
381 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
382 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
383 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
384 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
385 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
386 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
387 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
388 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
389 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
390 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
391 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
392 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
393 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
394 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
395 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
396 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
408 #include VECT_COMPARE_M
412 extern "C" __global__ void __launch_bounds__ (256, 1) m11000_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)
416 extern "C" __global__ void __launch_bounds__ (256, 1) m11000_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)
420 extern "C" __global__ void __launch_bounds__ (256, 1) m11000_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)
426 const u32 lid = threadIdx.x;
432 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
434 if (gid >= gid_max) return;
438 wordl0[0] = pws[gid].i[ 0];
439 wordl0[1] = pws[gid].i[ 1];
440 wordl0[2] = pws[gid].i[ 2];
441 wordl0[3] = pws[gid].i[ 3];
445 wordl1[0] = pws[gid].i[ 4];
446 wordl1[1] = pws[gid].i[ 5];
447 wordl1[2] = pws[gid].i[ 6];
448 wordl1[3] = pws[gid].i[ 7];
464 const u32 pw_l_len = pws[gid].pw_len;
466 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
468 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
477 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
478 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
479 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
480 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
484 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
485 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
486 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
487 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
491 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
492 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
493 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
494 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
498 salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
499 salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
501 const u32 salt_len = salt_bufs[salt_pos].salt_len;
507 const u32 search[4] =
509 digests_buf[digests_offset].digest_buf[DGST_R0],
510 digests_buf[digests_offset].digest_buf[DGST_R1],
511 digests_buf[digests_offset].digest_buf[DGST_R2],
512 digests_buf[digests_offset].digest_buf[DGST_R3]
519 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
521 const u32 pw_r_len = c_combs[il_pos].pw_len;
523 const u32 pw_len = pw_l_len + pw_r_len;
530 wordr0[0] = c_combs[il_pos].i[0];
531 wordr0[1] = c_combs[il_pos].i[1];
532 wordr0[2] = c_combs[il_pos].i[2];
533 wordr0[3] = c_combs[il_pos].i[3];
534 wordr1[0] = c_combs[il_pos].i[4];
535 wordr1[1] = c_combs[il_pos].i[5];
536 wordr1[2] = c_combs[il_pos].i[6];
537 wordr1[3] = c_combs[il_pos].i[7];
547 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
549 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
557 w0[0] = wordl0[0] | wordr0[0];
558 w0[1] = wordl0[1] | wordr0[1];
559 w0[2] = wordl0[2] | wordr0[2];
560 w0[3] = wordl0[3] | wordr0[3];
561 w1[0] = wordl1[0] | wordr1[0];
562 w1[1] = wordl1[1] | wordr1[1];
563 w1[2] = wordl1[2] | wordr1[2];
564 w1[3] = wordl1[3] | wordr1[3];
565 w2[0] = wordl2[0] | wordr2[0];
566 w2[1] = wordl2[1] | wordr2[1];
567 w2[2] = wordl2[2] | wordr2[2];
568 w2[3] = wordl2[3] | wordr2[3];
569 w3[0] = wordl3[0] | wordr3[0];
570 w3[1] = wordl3[1] | wordr3[1];
571 w3[2] = wordl3[2] | wordr3[2];
572 w3[3] = wordl3[3] | wordr3[3];
574 append_0x80_4 (w0, w1, w2, w3, pw_len);
576 const u32 pw_salt_len = pw_len + salt_len;
582 // first step fixed 56 bytes of salt
589 w0_t[0] = salt_buf0[0];
590 w0_t[1] = salt_buf0[1];
591 w0_t[2] = salt_buf0[2];
592 w0_t[3] = salt_buf0[3];
593 w1_t[0] = salt_buf1[0];
594 w1_t[1] = salt_buf1[1];
595 w1_t[2] = salt_buf1[2];
596 w1_t[3] = salt_buf1[3];
597 w2_t[0] = salt_buf2[0];
598 w2_t[1] = salt_buf2[1];
599 w2_t[2] = salt_buf2[2];
600 w2_t[3] = salt_buf2[3];
601 w3_t[0] = salt_buf3[0];
602 w3_t[1] = salt_buf3[1];
604 // after 56 byte salt, we have beginning of the password
620 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
621 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
622 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
623 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
624 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
625 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
626 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
627 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
628 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
629 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
630 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
631 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
632 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
633 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
634 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
635 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
637 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
638 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
639 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
640 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
641 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
642 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
643 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
644 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
645 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
646 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
647 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
648 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
649 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
650 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
651 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
652 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
654 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
655 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
656 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
657 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
658 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
659 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
660 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
661 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
662 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
663 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
664 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
665 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
666 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
667 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
668 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
669 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
671 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
672 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
673 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
674 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
675 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
676 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
677 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
678 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
679 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
680 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
681 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
682 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
683 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
684 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
685 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
686 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
714 w3_t[2] = pw_salt_len * 8;
717 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
718 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
719 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
720 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
721 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
722 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
723 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
724 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
725 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
726 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
727 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
728 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
729 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
730 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
731 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
732 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
734 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
735 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
736 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
737 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
738 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
739 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
740 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
741 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
742 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
743 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
744 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
745 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
746 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
747 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
748 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
749 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
751 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
752 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
753 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
754 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
755 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
756 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
757 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
758 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
759 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
760 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
761 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
762 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
763 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
764 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
765 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
766 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
768 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
769 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
770 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
771 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
772 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
773 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
774 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
775 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
776 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
777 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
778 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
779 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
780 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
781 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
782 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
783 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
795 #include VECT_COMPARE_S
799 extern "C" __global__ void __launch_bounds__ (256, 1) m11000_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)
803 extern "C" __global__ void __launch_bounds__ (256, 1) m11000_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)