2 * Author......: Jens Steube <jens.steube@gmail.com>
9 #include "include/constants.h"
10 #include "include/kernel_vendor.h"
25 #include "include/kernel_functions.c"
27 #include "common_nv.c"
30 #define VECT_COMPARE_S "check_single_vect1_comp4_warp.c"
31 #define VECT_COMPARE_M "check_multi_vect1_comp4_warp.c"
35 #define VECT_COMPARE_S "check_single_vect2_comp4_warp.c"
36 #define VECT_COMPARE_M "check_multi_vect2_comp4_warp.c"
40 #define VECT_COMPARE_S "check_single_vect4_comp4_warp.c"
41 #define VECT_COMPARE_M "check_multi_vect4_comp4_warp.c"
44 __device__ __constant__ u32x c_bfs[1024];
46 __device__ static void m01100m (u32 w[16], const u32 pw_len, const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset)
52 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
53 const u32 lid = threadIdx.x;
61 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
62 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
63 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
64 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
68 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
69 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
70 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
71 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
75 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
76 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
80 const u32 salt_len = salt_bufs[salt_pos].salt_len;
86 const u32 F_w0c00 = 0 + MD4C00;
87 const u32 F_w1c00 = w[ 1] + MD4C00;
88 const u32 F_w2c00 = w[ 2] + MD4C00;
89 const u32 F_w3c00 = w[ 3] + MD4C00;
90 const u32 F_w4c00 = w[ 4] + MD4C00;
91 const u32 F_w5c00 = w[ 5] + MD4C00;
92 const u32 F_w6c00 = w[ 6] + MD4C00;
93 const u32 F_w7c00 = w[ 7] + MD4C00;
94 const u32 F_w8c00 = w[ 8] + MD4C00;
95 const u32 F_w9c00 = w[ 9] + MD4C00;
96 const u32 F_wac00 = w[10] + MD4C00;
97 const u32 F_wbc00 = w[11] + MD4C00;
98 const u32 F_wcc00 = w[12] + MD4C00;
99 const u32 F_wdc00 = w[13] + MD4C00;
100 const u32 F_wec00 = w[14] + MD4C00;
101 const u32 F_wfc00 = w[15] + MD4C00;
103 const u32 G_w0c01 = 0 + MD4C01;
104 const u32 G_w4c01 = w[ 4] + MD4C01;
105 const u32 G_w8c01 = w[ 8] + MD4C01;
106 const u32 G_wcc01 = w[12] + MD4C01;
107 const u32 G_w1c01 = w[ 1] + MD4C01;
108 const u32 G_w5c01 = w[ 5] + MD4C01;
109 const u32 G_w9c01 = w[ 9] + MD4C01;
110 const u32 G_wdc01 = w[13] + MD4C01;
111 const u32 G_w2c01 = w[ 2] + MD4C01;
112 const u32 G_w6c01 = w[ 6] + MD4C01;
113 const u32 G_wac01 = w[10] + MD4C01;
114 const u32 G_wec01 = w[14] + MD4C01;
115 const u32 G_w3c01 = w[ 3] + MD4C01;
116 const u32 G_w7c01 = w[ 7] + MD4C01;
117 const u32 G_wbc01 = w[11] + MD4C01;
118 const u32 G_wfc01 = w[15] + MD4C01;
120 const u32 H_w0c02 = 0 + MD4C02;
121 const u32 H_w8c02 = w[ 8] + MD4C02;
122 const u32 H_w4c02 = w[ 4] + MD4C02;
123 const u32 H_wcc02 = w[12] + MD4C02;
124 const u32 H_w2c02 = w[ 2] + MD4C02;
125 const u32 H_wac02 = w[10] + MD4C02;
126 const u32 H_w6c02 = w[ 6] + MD4C02;
127 const u32 H_wec02 = w[14] + MD4C02;
128 const u32 H_w1c02 = w[ 1] + MD4C02;
129 const u32 H_w9c02 = w[ 9] + MD4C02;
130 const u32 H_w5c02 = w[ 5] + MD4C02;
131 const u32 H_wdc02 = w[13] + MD4C02;
132 const u32 H_w3c02 = w[ 3] + MD4C02;
133 const u32 H_wbc02 = w[11] + MD4C02;
134 const u32 H_w7c02 = w[ 7] + MD4C02;
135 const u32 H_wfc02 = w[15] + MD4C02;
141 const u32 bf_loops = ceil ((float) bfs_cnt / VECT_DIV);
145 for (u32 il_pos = 0; il_pos < bf_loops; il_pos++)
147 const u32x w0r = c_bfs[il_pos];
149 const u32x w0 = w0l | w0r;
156 MD4_STEP (MD4_Fo, a, b, c, d, w0, F_w0c00, MD4S00);
157 MD4_STEP0(MD4_Fo, d, a, b, c, F_w1c00, MD4S01);
158 MD4_STEP0(MD4_Fo, c, d, a, b, F_w2c00, MD4S02);
159 MD4_STEP0(MD4_Fo, b, c, d, a, F_w3c00, MD4S03);
160 MD4_STEP0(MD4_Fo, a, b, c, d, F_w4c00, MD4S00);
161 MD4_STEP0(MD4_Fo, d, a, b, c, F_w5c00, MD4S01);
162 MD4_STEP0(MD4_Fo, c, d, a, b, F_w6c00, MD4S02);
163 MD4_STEP0(MD4_Fo, b, c, d, a, F_w7c00, MD4S03);
164 MD4_STEP0(MD4_Fo, a, b, c, d, F_w8c00, MD4S00);
165 MD4_STEP0(MD4_Fo, d, a, b, c, F_w9c00, MD4S01);
166 MD4_STEP0(MD4_Fo, c, d, a, b, F_wac00, MD4S02);
167 MD4_STEP0(MD4_Fo, b, c, d, a, F_wbc00, MD4S03);
168 MD4_STEP0(MD4_Fo, a, b, c, d, F_wcc00, MD4S00);
169 MD4_STEP0(MD4_Fo, d, a, b, c, F_wdc00, MD4S01);
170 MD4_STEP0(MD4_Fo, c, d, a, b, F_wec00, MD4S02);
171 MD4_STEP0(MD4_Fo, b, c, d, a, F_wfc00, MD4S03);
173 MD4_STEP (MD4_Go, a, b, c, d, w0, G_w0c01, MD4S10);
174 MD4_STEP0(MD4_Go, d, a, b, c, G_w4c01, MD4S11);
175 MD4_STEP0(MD4_Go, c, d, a, b, G_w8c01, MD4S12);
176 MD4_STEP0(MD4_Go, b, c, d, a, G_wcc01, MD4S13);
177 MD4_STEP0(MD4_Go, a, b, c, d, G_w1c01, MD4S10);
178 MD4_STEP0(MD4_Go, d, a, b, c, G_w5c01, MD4S11);
179 MD4_STEP0(MD4_Go, c, d, a, b, G_w9c01, MD4S12);
180 MD4_STEP0(MD4_Go, b, c, d, a, G_wdc01, MD4S13);
181 MD4_STEP0(MD4_Go, a, b, c, d, G_w2c01, MD4S10);
182 MD4_STEP0(MD4_Go, d, a, b, c, G_w6c01, MD4S11);
183 MD4_STEP0(MD4_Go, c, d, a, b, G_wac01, MD4S12);
184 MD4_STEP0(MD4_Go, b, c, d, a, G_wec01, MD4S13);
185 MD4_STEP0(MD4_Go, a, b, c, d, G_w3c01, MD4S10);
186 MD4_STEP0(MD4_Go, d, a, b, c, G_w7c01, MD4S11);
187 MD4_STEP0(MD4_Go, c, d, a, b, G_wbc01, MD4S12);
188 MD4_STEP0(MD4_Go, b, c, d, a, G_wfc01, MD4S13);
190 MD4_STEP (MD4_H , a, b, c, d, w0, H_w0c02, MD4S20);
191 MD4_STEP0(MD4_H , d, a, b, c, H_w8c02, MD4S21);
192 MD4_STEP0(MD4_H , c, d, a, b, H_w4c02, MD4S22);
193 MD4_STEP0(MD4_H , b, c, d, a, H_wcc02, MD4S23);
194 MD4_STEP0(MD4_H , a, b, c, d, H_w2c02, MD4S20);
195 MD4_STEP0(MD4_H , d, a, b, c, H_wac02, MD4S21);
196 MD4_STEP0(MD4_H , c, d, a, b, H_w6c02, MD4S22);
197 MD4_STEP0(MD4_H , b, c, d, a, H_wec02, MD4S23);
198 MD4_STEP0(MD4_H , a, b, c, d, H_w1c02, MD4S20);
199 MD4_STEP0(MD4_H , d, a, b, c, H_w9c02, MD4S21);
200 MD4_STEP0(MD4_H , c, d, a, b, H_w5c02, MD4S22);
201 MD4_STEP0(MD4_H , b, c, d, a, H_wdc02, MD4S23);
202 MD4_STEP0(MD4_H , a, b, c, d, H_w3c02, MD4S20);
203 MD4_STEP0(MD4_H , d, a, b, c, H_wbc02, MD4S21);
204 MD4_STEP0(MD4_H , c, d, a, b, H_w7c02, MD4S22);
205 MD4_STEP0(MD4_H , b, c, d, a, H_wfc02, MD4S23);
221 w1_t[0] = salt_buf0[0];
222 w1_t[1] = salt_buf0[1];
223 w1_t[2] = salt_buf0[2];
224 w1_t[3] = salt_buf0[3];
225 w2_t[0] = salt_buf1[0];
226 w2_t[1] = salt_buf1[1];
227 w2_t[2] = salt_buf1[2];
228 w2_t[3] = salt_buf1[3];
229 w3_t[0] = salt_buf2[0];
230 w3_t[1] = salt_buf2[1];
231 w3_t[2] = (16 + salt_len) * 8;
239 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
240 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
241 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
242 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
243 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
244 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
245 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
246 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
247 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
248 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
249 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
250 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
251 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
252 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
253 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
254 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
256 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
257 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
258 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
259 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
260 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
261 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
262 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
263 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
264 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
265 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
266 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
267 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
268 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
269 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
270 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
271 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
273 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
274 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
275 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
276 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
277 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
278 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
279 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
280 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
281 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
282 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
283 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
284 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
285 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
286 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
287 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
288 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
295 #include VECT_COMPARE_M
299 __device__ static void m01100s (u32 w[16], const u32 pw_len, const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset)
305 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
306 const u32 lid = threadIdx.x;
314 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
315 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
316 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
317 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
321 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
322 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
323 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
324 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
328 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
329 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
333 const u32 salt_len = salt_bufs[salt_pos].salt_len;
339 const u32 F_w0c00 = 0 + MD4C00;
340 const u32 F_w1c00 = w[ 1] + MD4C00;
341 const u32 F_w2c00 = w[ 2] + MD4C00;
342 const u32 F_w3c00 = w[ 3] + MD4C00;
343 const u32 F_w4c00 = w[ 4] + MD4C00;
344 const u32 F_w5c00 = w[ 5] + MD4C00;
345 const u32 F_w6c00 = w[ 6] + MD4C00;
346 const u32 F_w7c00 = w[ 7] + MD4C00;
347 const u32 F_w8c00 = w[ 8] + MD4C00;
348 const u32 F_w9c00 = w[ 9] + MD4C00;
349 const u32 F_wac00 = w[10] + MD4C00;
350 const u32 F_wbc00 = w[11] + MD4C00;
351 const u32 F_wcc00 = w[12] + MD4C00;
352 const u32 F_wdc00 = w[13] + MD4C00;
353 const u32 F_wec00 = w[14] + MD4C00;
354 const u32 F_wfc00 = w[15] + MD4C00;
356 const u32 G_w0c01 = 0 + MD4C01;
357 const u32 G_w4c01 = w[ 4] + MD4C01;
358 const u32 G_w8c01 = w[ 8] + MD4C01;
359 const u32 G_wcc01 = w[12] + MD4C01;
360 const u32 G_w1c01 = w[ 1] + MD4C01;
361 const u32 G_w5c01 = w[ 5] + MD4C01;
362 const u32 G_w9c01 = w[ 9] + MD4C01;
363 const u32 G_wdc01 = w[13] + MD4C01;
364 const u32 G_w2c01 = w[ 2] + MD4C01;
365 const u32 G_w6c01 = w[ 6] + MD4C01;
366 const u32 G_wac01 = w[10] + MD4C01;
367 const u32 G_wec01 = w[14] + MD4C01;
368 const u32 G_w3c01 = w[ 3] + MD4C01;
369 const u32 G_w7c01 = w[ 7] + MD4C01;
370 const u32 G_wbc01 = w[11] + MD4C01;
371 const u32 G_wfc01 = w[15] + MD4C01;
373 const u32 H_w0c02 = 0 + MD4C02;
374 const u32 H_w8c02 = w[ 8] + MD4C02;
375 const u32 H_w4c02 = w[ 4] + MD4C02;
376 const u32 H_wcc02 = w[12] + MD4C02;
377 const u32 H_w2c02 = w[ 2] + MD4C02;
378 const u32 H_wac02 = w[10] + MD4C02;
379 const u32 H_w6c02 = w[ 6] + MD4C02;
380 const u32 H_wec02 = w[14] + MD4C02;
381 const u32 H_w1c02 = w[ 1] + MD4C02;
382 const u32 H_w9c02 = w[ 9] + MD4C02;
383 const u32 H_w5c02 = w[ 5] + MD4C02;
384 const u32 H_wdc02 = w[13] + MD4C02;
385 const u32 H_w3c02 = w[ 3] + MD4C02;
386 const u32 H_wbc02 = w[11] + MD4C02;
387 const u32 H_w7c02 = w[ 7] + MD4C02;
388 const u32 H_wfc02 = w[15] + MD4C02;
394 const u32 search[4] =
396 digests_buf[digests_offset].digest_buf[DGST_R0],
397 digests_buf[digests_offset].digest_buf[DGST_R1],
398 digests_buf[digests_offset].digest_buf[DGST_R2],
399 digests_buf[digests_offset].digest_buf[DGST_R3]
406 const u32 bf_loops = ceil ((float) bfs_cnt / VECT_DIV);
410 for (u32 il_pos = 0; il_pos < bf_loops; il_pos++)
412 const u32x w0r = c_bfs[il_pos];
414 const u32x w0 = w0l | w0r;
421 MD4_STEP (MD4_Fo, a, b, c, d, w0, F_w0c00, MD4S00);
422 MD4_STEP0(MD4_Fo, d, a, b, c, F_w1c00, MD4S01);
423 MD4_STEP0(MD4_Fo, c, d, a, b, F_w2c00, MD4S02);
424 MD4_STEP0(MD4_Fo, b, c, d, a, F_w3c00, MD4S03);
425 MD4_STEP0(MD4_Fo, a, b, c, d, F_w4c00, MD4S00);
426 MD4_STEP0(MD4_Fo, d, a, b, c, F_w5c00, MD4S01);
427 MD4_STEP0(MD4_Fo, c, d, a, b, F_w6c00, MD4S02);
428 MD4_STEP0(MD4_Fo, b, c, d, a, F_w7c00, MD4S03);
429 MD4_STEP0(MD4_Fo, a, b, c, d, F_w8c00, MD4S00);
430 MD4_STEP0(MD4_Fo, d, a, b, c, F_w9c00, MD4S01);
431 MD4_STEP0(MD4_Fo, c, d, a, b, F_wac00, MD4S02);
432 MD4_STEP0(MD4_Fo, b, c, d, a, F_wbc00, MD4S03);
433 MD4_STEP0(MD4_Fo, a, b, c, d, F_wcc00, MD4S00);
434 MD4_STEP0(MD4_Fo, d, a, b, c, F_wdc00, MD4S01);
435 MD4_STEP0(MD4_Fo, c, d, a, b, F_wec00, MD4S02);
436 MD4_STEP0(MD4_Fo, b, c, d, a, F_wfc00, MD4S03);
438 MD4_STEP (MD4_Go, a, b, c, d, w0, G_w0c01, MD4S10);
439 MD4_STEP0(MD4_Go, d, a, b, c, G_w4c01, MD4S11);
440 MD4_STEP0(MD4_Go, c, d, a, b, G_w8c01, MD4S12);
441 MD4_STEP0(MD4_Go, b, c, d, a, G_wcc01, MD4S13);
442 MD4_STEP0(MD4_Go, a, b, c, d, G_w1c01, MD4S10);
443 MD4_STEP0(MD4_Go, d, a, b, c, G_w5c01, MD4S11);
444 MD4_STEP0(MD4_Go, c, d, a, b, G_w9c01, MD4S12);
445 MD4_STEP0(MD4_Go, b, c, d, a, G_wdc01, MD4S13);
446 MD4_STEP0(MD4_Go, a, b, c, d, G_w2c01, MD4S10);
447 MD4_STEP0(MD4_Go, d, a, b, c, G_w6c01, MD4S11);
448 MD4_STEP0(MD4_Go, c, d, a, b, G_wac01, MD4S12);
449 MD4_STEP0(MD4_Go, b, c, d, a, G_wec01, MD4S13);
450 MD4_STEP0(MD4_Go, a, b, c, d, G_w3c01, MD4S10);
451 MD4_STEP0(MD4_Go, d, a, b, c, G_w7c01, MD4S11);
452 MD4_STEP0(MD4_Go, c, d, a, b, G_wbc01, MD4S12);
453 MD4_STEP0(MD4_Go, b, c, d, a, G_wfc01, MD4S13);
455 MD4_STEP (MD4_H , a, b, c, d, w0, H_w0c02, MD4S20);
456 MD4_STEP0(MD4_H , d, a, b, c, H_w8c02, MD4S21);
457 MD4_STEP0(MD4_H , c, d, a, b, H_w4c02, MD4S22);
458 MD4_STEP0(MD4_H , b, c, d, a, H_wcc02, MD4S23);
459 MD4_STEP0(MD4_H , a, b, c, d, H_w2c02, MD4S20);
460 MD4_STEP0(MD4_H , d, a, b, c, H_wac02, MD4S21);
461 MD4_STEP0(MD4_H , c, d, a, b, H_w6c02, MD4S22);
462 MD4_STEP0(MD4_H , b, c, d, a, H_wec02, MD4S23);
463 MD4_STEP0(MD4_H , a, b, c, d, H_w1c02, MD4S20);
464 MD4_STEP0(MD4_H , d, a, b, c, H_w9c02, MD4S21);
465 MD4_STEP0(MD4_H , c, d, a, b, H_w5c02, MD4S22);
466 MD4_STEP0(MD4_H , b, c, d, a, H_wdc02, MD4S23);
467 MD4_STEP0(MD4_H , a, b, c, d, H_w3c02, MD4S20);
468 MD4_STEP0(MD4_H , d, a, b, c, H_wbc02, MD4S21);
469 MD4_STEP0(MD4_H , c, d, a, b, H_w7c02, MD4S22);
470 MD4_STEP0(MD4_H , b, c, d, a, H_wfc02, MD4S23);
486 w1_t[0] = salt_buf0[0];
487 w1_t[1] = salt_buf0[1];
488 w1_t[2] = salt_buf0[2];
489 w1_t[3] = salt_buf0[3];
490 w2_t[0] = salt_buf1[0];
491 w2_t[1] = salt_buf1[1];
492 w2_t[2] = salt_buf1[2];
493 w2_t[3] = salt_buf1[3];
494 w3_t[0] = salt_buf2[0];
495 w3_t[1] = salt_buf2[1];
496 w3_t[2] = (16 + salt_len) * 8;
504 MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
505 MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
506 MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
507 MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
508 MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
509 MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
510 MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
511 MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
512 MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
513 MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
514 MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
515 MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
516 MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
517 MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
518 MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
519 MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
521 MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
522 MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
523 MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
524 MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
525 MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
526 MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
527 MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
528 MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
529 MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
530 MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
531 MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
532 MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
533 MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
534 MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
535 MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
536 MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
538 MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
539 MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
540 MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
541 MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
542 MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
543 MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
544 MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
545 MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
546 MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
547 MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
548 MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
549 MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
550 MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
552 bool q_cond = (search[0] != a);
554 if (q_cond) continue;
556 MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
557 MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
558 MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
565 #include VECT_COMPARE_S
569 extern "C" __global__ void __launch_bounds__ (256, 1) m01100_m04 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
575 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
577 if (gid >= gid_max) return;
581 w[ 0] = pws[gid].i[ 0];
582 w[ 1] = pws[gid].i[ 1];
583 w[ 2] = pws[gid].i[ 2];
584 w[ 3] = pws[gid].i[ 3];
595 w[14] = pws[gid].i[14];
598 const u32 pw_len = pws[gid].pw_len;
604 m01100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
607 extern "C" __global__ void __launch_bounds__ (256, 1) m01100_m08 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
613 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
615 if (gid >= gid_max) return;
619 w[ 0] = pws[gid].i[ 0];
620 w[ 1] = pws[gid].i[ 1];
621 w[ 2] = pws[gid].i[ 2];
622 w[ 3] = pws[gid].i[ 3];
623 w[ 4] = pws[gid].i[ 4];
624 w[ 5] = pws[gid].i[ 5];
625 w[ 6] = pws[gid].i[ 6];
626 w[ 7] = pws[gid].i[ 7];
633 w[14] = pws[gid].i[14];
636 const u32 pw_len = pws[gid].pw_len;
642 m01100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
645 extern "C" __global__ void __launch_bounds__ (256, 1) m01100_m16 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
649 extern "C" __global__ void __launch_bounds__ (256, 1) m01100_s04 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
655 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
657 if (gid >= gid_max) return;
661 w[ 0] = pws[gid].i[ 0];
662 w[ 1] = pws[gid].i[ 1];
663 w[ 2] = pws[gid].i[ 2];
664 w[ 3] = pws[gid].i[ 3];
675 w[14] = pws[gid].i[14];
678 const u32 pw_len = pws[gid].pw_len;
684 m01100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
687 extern "C" __global__ void __launch_bounds__ (256, 1) m01100_s08 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
693 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
695 if (gid >= gid_max) return;
699 w[ 0] = pws[gid].i[ 0];
700 w[ 1] = pws[gid].i[ 1];
701 w[ 2] = pws[gid].i[ 2];
702 w[ 3] = pws[gid].i[ 3];
703 w[ 4] = pws[gid].i[ 4];
704 w[ 5] = pws[gid].i[ 5];
705 w[ 6] = pws[gid].i[ 6];
706 w[ 7] = pws[gid].i[ 7];
713 w[14] = pws[gid].i[14];
716 const u32 pw_len = pws[gid].pw_len;
722 m01100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
725 extern "C" __global__ void __launch_bounds__ (256, 1) m01100_s16 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)