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"
44 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
48 #define uint_to_hex_lower8(i) u32x (l_bin2asc[(i).x], l_bin2asc[(i).y])
52 #define uint_to_hex_lower8(i) u32x (l_bin2asc[(i).x], l_bin2asc[(i).y], l_bin2asc[(i).z], l_bin2asc[(i).w])
55 __device__ static u32 memcat32 (u32x block0[16], u32x block1[16], const u32 block_len, const u32x append0[4], const u32x append1[4], const u32x append2[4], const u32x append3[4], const u32 append_len)
57 const u32 mod = block_len & 3;
58 const u32 div = block_len / 4;
60 const int offset_minus_4 = 4 - mod;
62 const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;
66 append0_t[0] = __byte_perm ( 0, append0[0], selector);
67 append0_t[1] = __byte_perm (append0[0], append0[1], selector);
68 append0_t[2] = __byte_perm (append0[1], append0[2], selector);
69 append0_t[3] = __byte_perm (append0[2], append0[3], selector);
73 append1_t[0] = __byte_perm (append0[3], append1[0], selector);
74 append1_t[1] = __byte_perm (append1[0], append1[1], selector);
75 append1_t[2] = __byte_perm (append1[1], append1[2], selector);
76 append1_t[3] = __byte_perm (append1[2], append1[3], selector);
80 append2_t[0] = __byte_perm (append1[3], append2[0], selector);
81 append2_t[1] = __byte_perm (append2[0], append2[1], selector);
82 append2_t[2] = __byte_perm (append2[1], append2[2], selector);
83 append2_t[3] = __byte_perm (append2[2], append2[3], selector);
87 append3_t[0] = __byte_perm (append2[3], append3[0], selector);
88 append3_t[1] = __byte_perm (append3[0], append3[1], selector);
89 append3_t[2] = __byte_perm (append3[1], append3[2], selector);
90 append3_t[3] = __byte_perm (append3[2], append3[3], selector);
94 append4_t[0] = __byte_perm (append3[3], 0, selector);
101 case 0: block0[ 0] |= append0_t[0];
102 block0[ 1] = append0_t[1];
103 block0[ 2] = append0_t[2];
104 block0[ 3] = append0_t[3];
106 block0[ 4] = append1_t[0];
107 block0[ 5] = append1_t[1];
108 block0[ 6] = append1_t[2];
109 block0[ 7] = append1_t[3];
111 block0[ 8] = append2_t[0];
112 block0[ 9] = append2_t[1];
113 block0[10] = append2_t[2];
114 block0[11] = append2_t[3];
116 block0[12] = append3_t[0];
117 block0[13] = append3_t[1];
118 block0[14] = append3_t[2];
119 block0[15] = append3_t[3];
121 block1[ 0] = append4_t[0];
122 block1[ 1] = append4_t[1];
123 block1[ 2] = append4_t[2];
124 block1[ 3] = append4_t[3];
127 case 1: block0[ 1] |= append0_t[0];
128 block0[ 2] = append0_t[1];
129 block0[ 3] = append0_t[2];
130 block0[ 4] = append0_t[3];
132 block0[ 5] = append1_t[0];
133 block0[ 6] = append1_t[1];
134 block0[ 7] = append1_t[2];
135 block0[ 8] = append1_t[3];
137 block0[ 9] = append2_t[0];
138 block0[10] = append2_t[1];
139 block0[11] = append2_t[2];
140 block0[12] = append2_t[3];
142 block0[13] = append3_t[0];
143 block0[14] = append3_t[1];
144 block0[15] = append3_t[2];
145 block1[ 0] = append3_t[3];
147 block1[ 1] = append4_t[0];
148 block1[ 2] = append4_t[1];
149 block1[ 3] = append4_t[2];
150 block1[ 4] = append4_t[3];
153 case 2: block0[ 2] |= append0_t[0];
154 block0[ 3] = append0_t[1];
155 block0[ 4] = append0_t[2];
156 block0[ 5] = append0_t[3];
158 block0[ 6] = append1_t[0];
159 block0[ 7] = append1_t[1];
160 block0[ 8] = append1_t[2];
161 block0[ 9] = append1_t[3];
163 block0[10] = append2_t[0];
164 block0[11] = append2_t[1];
165 block0[12] = append2_t[2];
166 block0[13] = append2_t[3];
168 block0[14] = append3_t[0];
169 block0[15] = append3_t[1];
170 block1[ 0] = append3_t[2];
171 block1[ 1] = append3_t[3];
173 block1[ 2] = append4_t[0];
174 block1[ 3] = append4_t[1];
175 block1[ 4] = append4_t[2];
176 block1[ 5] = append4_t[3];
179 case 3: block0[ 3] |= append0_t[0];
180 block0[ 4] = append0_t[1];
181 block0[ 5] = append0_t[2];
182 block0[ 6] = append0_t[3];
184 block0[ 7] = append1_t[0];
185 block0[ 8] = append1_t[1];
186 block0[ 9] = append1_t[2];
187 block0[10] = append1_t[3];
189 block0[11] = append2_t[0];
190 block0[12] = append2_t[1];
191 block0[13] = append2_t[2];
192 block0[14] = append2_t[3];
194 block0[15] = append3_t[0];
195 block1[ 0] = append3_t[1];
196 block1[ 1] = append3_t[2];
197 block1[ 2] = append3_t[3];
199 block1[ 3] = append4_t[0];
200 block1[ 4] = append4_t[1];
201 block1[ 5] = append4_t[2];
202 block1[ 6] = append4_t[3];
205 case 4: block0[ 4] |= append0_t[0];
206 block0[ 5] = append0_t[1];
207 block0[ 6] = append0_t[2];
208 block0[ 7] = append0_t[3];
210 block0[ 8] = append1_t[0];
211 block0[ 9] = append1_t[1];
212 block0[10] = append1_t[2];
213 block0[11] = append1_t[3];
215 block0[12] = append2_t[0];
216 block0[13] = append2_t[1];
217 block0[14] = append2_t[2];
218 block0[15] = append2_t[3];
220 block1[ 0] = append3_t[0];
221 block1[ 1] = append3_t[1];
222 block1[ 2] = append3_t[2];
223 block1[ 3] = append3_t[3];
225 block1[ 4] = append4_t[0];
226 block1[ 5] = append4_t[1];
227 block1[ 6] = append4_t[2];
228 block1[ 7] = append4_t[3];
231 case 5: block0[ 5] |= append0_t[0];
232 block0[ 6] = append0_t[1];
233 block0[ 7] = append0_t[2];
234 block0[ 8] = append0_t[3];
236 block0[ 9] = append1_t[0];
237 block0[10] = append1_t[1];
238 block0[11] = append1_t[2];
239 block0[12] = append1_t[3];
241 block0[13] = append2_t[0];
242 block0[14] = append2_t[1];
243 block0[15] = append2_t[2];
244 block1[ 0] = append2_t[3];
246 block1[ 1] = append3_t[0];
247 block1[ 2] = append3_t[1];
248 block1[ 3] = append3_t[2];
249 block1[ 4] = append3_t[3];
251 block1[ 5] = append4_t[0];
252 block1[ 6] = append4_t[1];
253 block1[ 7] = append4_t[2];
254 block1[ 8] = append4_t[3];
257 case 6: block0[ 6] |= append0_t[0];
258 block0[ 7] = append0_t[1];
259 block0[ 8] = append0_t[2];
260 block0[ 9] = append0_t[3];
262 block0[10] = append1_t[0];
263 block0[11] = append1_t[1];
264 block0[12] = append1_t[2];
265 block0[13] = append1_t[3];
267 block0[14] = append2_t[0];
268 block0[15] = append2_t[1];
269 block1[ 0] = append2_t[2];
270 block1[ 1] = append2_t[3];
272 block1[ 2] = append3_t[0];
273 block1[ 3] = append3_t[1];
274 block1[ 4] = append3_t[2];
275 block1[ 5] = append3_t[3];
277 block1[ 6] = append4_t[0];
278 block1[ 7] = append4_t[1];
279 block1[ 8] = append4_t[2];
280 block1[ 9] = append4_t[3];
283 case 7: block0[ 7] |= append0_t[0];
284 block0[ 8] = append0_t[1];
285 block0[ 9] = append0_t[2];
286 block0[10] = append0_t[3];
288 block0[11] = append1_t[0];
289 block0[12] = append1_t[1];
290 block0[13] = append1_t[2];
291 block0[14] = append1_t[3];
293 block0[15] = append2_t[0];
294 block1[ 0] = append2_t[1];
295 block1[ 1] = append2_t[2];
296 block1[ 2] = append2_t[3];
298 block1[ 3] = append3_t[0];
299 block1[ 4] = append3_t[1];
300 block1[ 5] = append3_t[2];
301 block1[ 6] = append3_t[3];
303 block1[ 7] = append4_t[0];
304 block1[ 8] = append4_t[1];
305 block1[ 9] = append4_t[2];
306 block1[10] = append4_t[3];
309 case 8: block0[ 8] |= append0_t[0];
310 block0[ 9] = append0_t[1];
311 block0[10] = append0_t[2];
312 block0[11] = append0_t[3];
314 block0[12] = append1_t[0];
315 block0[13] = append1_t[1];
316 block0[14] = append1_t[2];
317 block0[15] = append1_t[3];
319 block1[ 0] = append2_t[0];
320 block1[ 1] = append2_t[1];
321 block1[ 2] = append2_t[2];
322 block1[ 3] = append2_t[3];
324 block1[ 4] = append3_t[0];
325 block1[ 5] = append3_t[1];
326 block1[ 6] = append3_t[2];
327 block1[ 7] = append3_t[3];
329 block1[ 8] = append4_t[0];
330 block1[ 9] = append4_t[1];
331 block1[10] = append4_t[2];
332 block1[11] = append4_t[3];
335 case 9: block0[ 9] |= append0_t[0];
336 block0[10] = append0_t[1];
337 block0[11] = append0_t[2];
338 block0[12] = append0_t[3];
340 block0[13] = append1_t[0];
341 block0[14] = append1_t[1];
342 block0[15] = append1_t[2];
343 block1[ 0] = append1_t[3];
345 block1[ 1] = append2_t[0];
346 block1[ 2] = append2_t[1];
347 block1[ 3] = append2_t[2];
348 block1[ 4] = append2_t[3];
350 block1[ 5] = append3_t[0];
351 block1[ 6] = append3_t[1];
352 block1[ 7] = append3_t[2];
353 block1[ 8] = append3_t[3];
355 block1[ 9] = append4_t[0];
356 block1[10] = append4_t[1];
357 block1[11] = append4_t[2];
358 block1[12] = append4_t[3];
361 case 10: block0[10] |= append0_t[0];
362 block0[11] = append0_t[1];
363 block0[12] = append0_t[2];
364 block0[13] = append0_t[3];
366 block0[14] = append1_t[0];
367 block0[15] = append1_t[1];
368 block1[ 0] = append1_t[2];
369 block1[ 1] = append1_t[3];
371 block1[ 2] = append2_t[0];
372 block1[ 3] = append2_t[1];
373 block1[ 4] = append2_t[2];
374 block1[ 5] = append2_t[3];
376 block1[ 6] = append3_t[0];
377 block1[ 7] = append3_t[1];
378 block1[ 8] = append3_t[2];
379 block1[ 9] = append3_t[3];
381 block1[10] = append4_t[0];
382 block1[11] = append4_t[1];
383 block1[12] = append4_t[2];
384 block1[13] = append4_t[3];
387 case 11: block0[11] |= append0_t[0];
388 block0[12] = append0_t[1];
389 block0[13] = append0_t[2];
390 block0[14] = append0_t[3];
392 block0[15] = append1_t[0];
393 block1[ 0] = append1_t[1];
394 block1[ 1] = append1_t[2];
395 block1[ 2] = append1_t[3];
397 block1[ 3] = append2_t[0];
398 block1[ 4] = append2_t[1];
399 block1[ 5] = append2_t[2];
400 block1[ 6] = append2_t[3];
402 block1[ 7] = append3_t[0];
403 block1[ 8] = append3_t[1];
404 block1[ 9] = append3_t[2];
405 block1[10] = append3_t[3];
407 block1[11] = append4_t[0];
408 block1[12] = append4_t[1];
409 block1[13] = append4_t[2];
410 block1[14] = append4_t[3];
413 case 12: block0[12] |= append0_t[0];
414 block0[13] = append0_t[1];
415 block0[14] = append0_t[2];
416 block0[15] = append0_t[3];
418 block1[ 0] = append1_t[0];
419 block1[ 1] = append1_t[1];
420 block1[ 2] = append1_t[2];
421 block1[ 3] = append1_t[3];
423 block1[ 4] = append2_t[0];
424 block1[ 5] = append2_t[1];
425 block1[ 6] = append2_t[2];
426 block1[ 7] = append2_t[3];
428 block1[ 8] = append3_t[0];
429 block1[ 9] = append3_t[1];
430 block1[10] = append3_t[2];
431 block1[11] = append3_t[3];
433 block1[12] = append4_t[0];
434 block1[13] = append4_t[1];
435 block1[14] = append4_t[2];
436 block1[15] = append4_t[3];
439 case 13: block0[13] |= append0_t[0];
440 block0[14] = append0_t[1];
441 block0[15] = append0_t[2];
442 block1[ 0] = append0_t[3];
444 block1[ 1] = append1_t[0];
445 block1[ 2] = append1_t[1];
446 block1[ 3] = append1_t[2];
447 block1[ 4] = append1_t[3];
449 block1[ 5] = append2_t[0];
450 block1[ 6] = append2_t[1];
451 block1[ 7] = append2_t[2];
452 block1[ 8] = append2_t[3];
454 block1[ 9] = append3_t[0];
455 block1[10] = append3_t[1];
456 block1[11] = append3_t[2];
457 block1[12] = append3_t[3];
459 block1[13] = append4_t[0];
460 block1[14] = append4_t[1];
461 block1[15] = append4_t[2];
464 case 14: block0[14] |= append0_t[0];
465 block0[15] = append0_t[1];
466 block1[ 0] = append0_t[2];
467 block1[ 1] = append0_t[3];
469 block1[ 2] = append1_t[0];
470 block1[ 3] = append1_t[1];
471 block1[ 4] = append1_t[2];
472 block1[ 5] = append1_t[3];
474 block1[ 6] = append2_t[0];
475 block1[ 7] = append2_t[1];
476 block1[ 8] = append2_t[2];
477 block1[ 9] = append2_t[3];
479 block1[10] = append3_t[0];
480 block1[11] = append3_t[1];
481 block1[12] = append3_t[2];
482 block1[13] = append3_t[3];
484 block1[14] = append4_t[0];
485 block1[15] = append4_t[1];
488 case 15: block0[15] |= append0_t[0];
489 block1[ 0] = append0_t[1];
490 block1[ 1] = append0_t[2];
491 block1[ 2] = append0_t[3];
493 block1[ 3] = append1_t[1];
494 block1[ 4] = append1_t[2];
495 block1[ 5] = append1_t[3];
496 block1[ 6] = append1_t[0];
498 block1[ 7] = append2_t[0];
499 block1[ 8] = append2_t[1];
500 block1[ 9] = append2_t[2];
501 block1[10] = append2_t[3];
503 block1[11] = append3_t[0];
504 block1[12] = append3_t[1];
505 block1[13] = append3_t[2];
506 block1[14] = append3_t[3];
508 block1[15] = append4_t[0];
511 case 16: block1[ 0] |= append0_t[0];
512 block1[ 1] = append0_t[1];
513 block1[ 2] = append0_t[2];
514 block1[ 3] = append0_t[3];
516 block1[ 4] = append1_t[0];
517 block1[ 5] = append1_t[1];
518 block1[ 6] = append1_t[2];
519 block1[ 7] = append1_t[3];
521 block1[ 8] = append2_t[0];
522 block1[ 9] = append2_t[1];
523 block1[10] = append2_t[2];
524 block1[11] = append2_t[3];
526 block1[12] = append3_t[0];
527 block1[13] = append3_t[1];
528 block1[14] = append3_t[2];
529 block1[15] = append3_t[3];
532 case 17: block1[ 1] |= append0_t[0];
533 block1[ 2] = append0_t[1];
534 block1[ 3] = append0_t[2];
535 block1[ 4] = append0_t[3];
537 block1[ 5] = append1_t[0];
538 block1[ 6] = append1_t[1];
539 block1[ 7] = append1_t[2];
540 block1[ 8] = append1_t[3];
542 block1[ 9] = append2_t[0];
543 block1[10] = append2_t[1];
544 block1[11] = append2_t[2];
545 block1[12] = append2_t[3];
547 block1[13] = append3_t[0];
548 block1[14] = append3_t[1];
549 block1[15] = append3_t[2];
552 case 18: block1[ 2] |= append0_t[0];
553 block1[ 3] = append0_t[1];
554 block1[ 4] = append0_t[2];
555 block1[ 5] = append0_t[3];
557 block1[ 6] = append1_t[0];
558 block1[ 7] = append1_t[1];
559 block1[ 8] = append1_t[2];
560 block1[ 9] = append1_t[3];
562 block1[10] = append2_t[0];
563 block1[11] = append2_t[1];
564 block1[12] = append2_t[2];
565 block1[13] = append2_t[3];
567 block1[14] = append3_t[0];
568 block1[15] = append3_t[1];
571 case 19: block1[ 3] |= append0_t[0];
572 block1[ 4] = append0_t[1];
573 block1[ 5] = append0_t[2];
574 block1[ 6] = append0_t[3];
576 block1[ 7] = append1_t[0];
577 block1[ 8] = append1_t[1];
578 block1[ 9] = append1_t[2];
579 block1[10] = append1_t[3];
581 block1[11] = append2_t[0];
582 block1[12] = append2_t[1];
583 block1[13] = append2_t[2];
584 block1[14] = append2_t[3];
586 block1[15] = append3_t[0];
589 case 20: block1[ 4] |= append0_t[0];
590 block1[ 5] = append0_t[1];
591 block1[ 6] = append0_t[2];
592 block1[ 7] = append0_t[3];
594 block1[ 8] = append1_t[0];
595 block1[ 9] = append1_t[1];
596 block1[10] = append1_t[2];
597 block1[11] = append1_t[3];
599 block1[12] = append2_t[0];
600 block1[13] = append2_t[1];
601 block1[14] = append2_t[2];
602 block1[15] = append2_t[3];
605 case 21: block1[ 5] |= append0_t[0];
606 block1[ 6] = append0_t[1];
607 block1[ 7] = append0_t[2];
608 block1[ 8] = append0_t[3];
610 block1[ 9] = append1_t[0];
611 block1[10] = append1_t[1];
612 block1[11] = append1_t[2];
613 block1[12] = append1_t[3];
615 block1[13] = append2_t[0];
616 block1[14] = append2_t[1];
617 block1[15] = append2_t[2];
620 case 22: block1[ 6] |= append0_t[0];
621 block1[ 7] = append0_t[1];
622 block1[ 8] = append0_t[2];
623 block1[ 9] = append0_t[3];
625 block1[10] = append1_t[0];
626 block1[11] = append1_t[1];
627 block1[12] = append1_t[2];
628 block1[13] = append1_t[3];
630 block1[14] = append2_t[0];
631 block1[15] = append2_t[1];
634 case 23: block1[ 7] |= append0_t[0];
635 block1[ 8] = append0_t[1];
636 block1[ 9] = append0_t[2];
637 block1[10] = append0_t[3];
639 block1[11] = append1_t[0];
640 block1[12] = append1_t[1];
641 block1[13] = append1_t[2];
642 block1[14] = append1_t[3];
644 block1[15] = append2_t[0];
647 case 24: block1[ 8] |= append0_t[0];
648 block1[ 9] = append0_t[1];
649 block1[10] = append0_t[2];
650 block1[11] = append0_t[3];
652 block1[12] = append1_t[0];
653 block1[13] = append1_t[1];
654 block1[14] = append1_t[2];
655 block1[15] = append1_t[3];
658 case 25: block1[ 9] |= append0_t[0];
659 block1[10] = append0_t[1];
660 block1[11] = append0_t[2];
661 block1[12] = append0_t[3];
663 block1[13] = append1_t[0];
664 block1[14] = append1_t[1];
665 block1[15] = append1_t[2];
668 case 26: block1[10] |= append0_t[0];
669 block1[11] = append0_t[1];
670 block1[12] = append0_t[2];
671 block1[13] = append0_t[3];
673 block1[14] = append1_t[0];
674 block1[15] = append1_t[1];
677 case 27: block1[11] |= append0_t[0];
678 block1[12] = append0_t[1];
679 block1[13] = append0_t[2];
680 block1[14] = append0_t[3];
682 block1[15] = append1_t[0];
685 case 28: block1[12] |= append0_t[0];
686 block1[13] = append0_t[1];
687 block1[14] = append0_t[2];
688 block1[15] = append0_t[3];
691 case 29: block1[13] |= append0_t[0];
692 block1[14] = append0_t[1];
693 block1[15] = append0_t[2];
696 case 30: block1[14] |= append0_t[0];
697 block1[15] = append0_t[1];
701 u32 new_len = block_len + append_len;
706 __device__ __constant__ char c_bin2asc[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
708 __device__ __shared__ short l_bin2asc[256];
710 __device__ __constant__ bf_t c_bfs[1024];
712 __device__ static void m11400m_0_0 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, 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 sip_t *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)
718 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
719 const u32 lid = threadIdx.x;
725 const u32 search[4] =
727 digests_buf[digests_offset].digest_buf[DGST_R0],
728 digests_buf[digests_offset].digest_buf[DGST_R1],
729 digests_buf[digests_offset].digest_buf[DGST_R2],
730 digests_buf[digests_offset].digest_buf[DGST_R3]
737 const u32 salt_len = esalt_bufs[salt_pos].salt_len; // not a bug, we need to get it from the esalt
739 const u32 pw_salt_len = salt_len + pw_len;
743 salt_buf0[ 0] = esalt_bufs[salt_pos].salt_buf[ 0];
744 salt_buf0[ 1] = esalt_bufs[salt_pos].salt_buf[ 1];
745 salt_buf0[ 2] = esalt_bufs[salt_pos].salt_buf[ 2];
746 salt_buf0[ 3] = esalt_bufs[salt_pos].salt_buf[ 3];
747 salt_buf0[ 4] = esalt_bufs[salt_pos].salt_buf[ 4];
748 salt_buf0[ 5] = esalt_bufs[salt_pos].salt_buf[ 5];
749 salt_buf0[ 6] = esalt_bufs[salt_pos].salt_buf[ 6];
750 salt_buf0[ 7] = esalt_bufs[salt_pos].salt_buf[ 7];
751 salt_buf0[ 8] = esalt_bufs[salt_pos].salt_buf[ 8];
752 salt_buf0[ 9] = esalt_bufs[salt_pos].salt_buf[ 9];
753 salt_buf0[10] = esalt_bufs[salt_pos].salt_buf[10];
754 salt_buf0[11] = esalt_bufs[salt_pos].salt_buf[11];
755 salt_buf0[12] = esalt_bufs[salt_pos].salt_buf[12];
756 salt_buf0[13] = esalt_bufs[salt_pos].salt_buf[13];
757 salt_buf0[14] = esalt_bufs[salt_pos].salt_buf[14];
758 salt_buf0[15] = esalt_bufs[salt_pos].salt_buf[15];
762 salt_buf1[ 0] = esalt_bufs[salt_pos].salt_buf[16];
763 salt_buf1[ 1] = esalt_bufs[salt_pos].salt_buf[17];
764 salt_buf1[ 2] = esalt_bufs[salt_pos].salt_buf[18];
765 salt_buf1[ 3] = esalt_bufs[salt_pos].salt_buf[19];
766 salt_buf1[ 4] = esalt_bufs[salt_pos].salt_buf[20];
767 salt_buf1[ 5] = esalt_bufs[salt_pos].salt_buf[21];
768 salt_buf1[ 6] = esalt_bufs[salt_pos].salt_buf[22];
769 salt_buf1[ 7] = esalt_bufs[salt_pos].salt_buf[23];
770 salt_buf1[ 8] = esalt_bufs[salt_pos].salt_buf[24];
771 salt_buf1[ 9] = esalt_bufs[salt_pos].salt_buf[25];
772 salt_buf1[10] = esalt_bufs[salt_pos].salt_buf[26];
773 salt_buf1[11] = esalt_bufs[salt_pos].salt_buf[27];
774 salt_buf1[12] = esalt_bufs[salt_pos].salt_buf[28];
775 salt_buf1[13] = esalt_bufs[salt_pos].salt_buf[29];
783 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
787 esalt_buf0[ 0] = esalt_bufs[salt_pos].esalt_buf[ 0];
788 esalt_buf0[ 1] = esalt_bufs[salt_pos].esalt_buf[ 1];
789 esalt_buf0[ 2] = esalt_bufs[salt_pos].esalt_buf[ 2];
790 esalt_buf0[ 3] = esalt_bufs[salt_pos].esalt_buf[ 3];
791 esalt_buf0[ 4] = esalt_bufs[salt_pos].esalt_buf[ 4];
792 esalt_buf0[ 5] = esalt_bufs[salt_pos].esalt_buf[ 5];
793 esalt_buf0[ 6] = esalt_bufs[salt_pos].esalt_buf[ 6];
794 esalt_buf0[ 7] = esalt_bufs[salt_pos].esalt_buf[ 7];
795 esalt_buf0[ 8] = esalt_bufs[salt_pos].esalt_buf[ 8];
796 esalt_buf0[ 9] = esalt_bufs[salt_pos].esalt_buf[ 9];
797 esalt_buf0[10] = esalt_bufs[salt_pos].esalt_buf[10];
798 esalt_buf0[11] = esalt_bufs[salt_pos].esalt_buf[11];
799 esalt_buf0[12] = esalt_bufs[salt_pos].esalt_buf[12];
800 esalt_buf0[13] = esalt_bufs[salt_pos].esalt_buf[13];
801 esalt_buf0[14] = esalt_bufs[salt_pos].esalt_buf[14];
802 esalt_buf0[15] = esalt_bufs[salt_pos].esalt_buf[15];
806 esalt_buf1[ 0] = esalt_bufs[salt_pos].esalt_buf[16];
807 esalt_buf1[ 1] = esalt_bufs[salt_pos].esalt_buf[17];
808 esalt_buf1[ 2] = esalt_bufs[salt_pos].esalt_buf[18];
809 esalt_buf1[ 3] = esalt_bufs[salt_pos].esalt_buf[19];
810 esalt_buf1[ 4] = esalt_bufs[salt_pos].esalt_buf[20];
811 esalt_buf1[ 5] = esalt_bufs[salt_pos].esalt_buf[21];
812 esalt_buf1[ 6] = esalt_bufs[salt_pos].esalt_buf[22];
813 esalt_buf1[ 7] = esalt_bufs[salt_pos].esalt_buf[23];
814 esalt_buf1[ 8] = esalt_bufs[salt_pos].esalt_buf[24];
815 esalt_buf1[ 9] = esalt_bufs[salt_pos].esalt_buf[25];
816 esalt_buf1[10] = esalt_bufs[salt_pos].esalt_buf[26];
817 esalt_buf1[11] = esalt_bufs[salt_pos].esalt_buf[27];
818 esalt_buf1[12] = esalt_bufs[salt_pos].esalt_buf[28];
819 esalt_buf1[13] = esalt_bufs[salt_pos].esalt_buf[29];
820 esalt_buf1[14] = esalt_bufs[salt_pos].esalt_buf[30];
821 esalt_buf1[15] = esalt_bufs[salt_pos].esalt_buf[31];
823 const u32 digest_esalt_len = 32 + esalt_len;
831 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
833 const u32 w0r = c_bfs[il_pos].i;
838 * HA1 = md5 ($salt . $pass)
841 // append the pass to the salt
845 block0[ 0] = salt_buf0[ 0];
846 block0[ 1] = salt_buf0[ 1];
847 block0[ 2] = salt_buf0[ 2];
848 block0[ 3] = salt_buf0[ 3];
849 block0[ 4] = salt_buf0[ 4];
850 block0[ 5] = salt_buf0[ 5];
851 block0[ 6] = salt_buf0[ 6];
852 block0[ 7] = salt_buf0[ 7];
853 block0[ 8] = salt_buf0[ 8];
854 block0[ 9] = salt_buf0[ 9];
855 block0[10] = salt_buf0[10];
856 block0[11] = salt_buf0[11];
857 block0[12] = salt_buf0[12];
858 block0[13] = salt_buf0[13];
859 block0[14] = salt_buf0[14];
860 block0[15] = salt_buf0[15];
864 block1[ 0] = salt_buf1[ 0];
865 block1[ 1] = salt_buf1[ 1];
866 block1[ 2] = salt_buf1[ 2];
867 block1[ 3] = salt_buf1[ 3];
868 block1[ 4] = salt_buf1[ 4];
869 block1[ 5] = salt_buf1[ 5];
870 block1[ 6] = salt_buf1[ 6];
871 block1[ 7] = salt_buf1[ 7];
872 block1[ 8] = salt_buf1[ 8];
873 block1[ 9] = salt_buf1[ 9];
874 block1[10] = salt_buf1[10];
875 block1[11] = salt_buf1[11];
876 block1[12] = salt_buf1[12];
877 block1[13] = salt_buf1[13];
878 block1[14] = salt_buf1[14];
879 block1[15] = salt_buf1[15];
881 memcat32 (block0, block1, salt_len, w0, w1, w2, w3, pw_len);
885 w0_t[0] = block0[ 0];
886 w0_t[1] = block0[ 1];
887 w0_t[2] = block0[ 2];
888 w0_t[3] = block0[ 3];
892 w1_t[0] = block0[ 4];
893 w1_t[1] = block0[ 5];
894 w1_t[2] = block0[ 6];
895 w1_t[3] = block0[ 7];
899 w2_t[0] = block0[ 8];
900 w2_t[1] = block0[ 9];
901 w2_t[2] = block0[10];
902 w2_t[3] = block0[11];
906 w3_t[0] = block0[12];
907 w3_t[1] = block0[13];
908 w3_t[2] = pw_salt_len * 8;
920 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
921 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
922 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
923 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
924 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
925 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
926 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
927 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
928 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
929 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
930 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
931 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
932 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
933 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
934 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
935 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
937 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
938 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
939 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
940 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
941 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
942 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
943 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
944 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
945 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
946 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
947 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
948 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
949 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
950 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
951 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
952 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
954 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
955 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
956 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
957 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
958 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
959 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
960 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
961 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
962 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
963 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
964 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
965 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
966 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
967 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
968 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
969 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
971 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
972 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
973 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
974 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
975 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
976 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
977 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
978 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
979 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
980 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
981 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
982 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
983 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
984 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
985 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
986 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
994 * final = md5 ($HA1 . $esalt)
995 * we have at least 2 MD5 blocks/transformations, but we might need 3
998 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
999 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
1000 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
1001 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
1002 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
1003 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
1004 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
1005 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
1006 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
1007 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
1008 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
1009 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
1010 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
1011 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
1012 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
1013 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
1015 w2_t[0] = esalt_buf0[0];
1016 w2_t[1] = esalt_buf0[1];
1017 w2_t[2] = esalt_buf0[2];
1018 w2_t[3] = esalt_buf0[3];
1020 w3_t[0] = esalt_buf0[4];
1021 w3_t[1] = esalt_buf0[5];
1022 w3_t[2] = esalt_buf0[6];
1023 w3_t[3] = esalt_buf0[7];
1033 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
1034 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
1035 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
1036 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
1037 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
1038 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
1039 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
1040 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
1041 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
1042 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
1043 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
1044 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
1045 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
1046 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
1047 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
1048 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
1050 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
1051 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
1052 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
1053 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
1054 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
1055 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
1056 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
1057 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
1058 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
1059 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
1060 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
1061 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
1062 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
1063 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
1064 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
1065 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
1067 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
1068 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
1069 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
1070 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
1071 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
1072 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
1073 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
1074 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
1075 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
1076 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
1077 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
1078 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
1079 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
1080 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
1081 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
1082 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
1084 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
1085 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
1086 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
1087 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
1088 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
1089 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
1090 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
1091 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
1092 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
1093 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
1094 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
1095 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
1096 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
1097 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
1098 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
1099 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
1113 w0_t[0] = esalt_buf0[ 8];
1114 w0_t[1] = esalt_buf0[ 9];
1115 w0_t[2] = esalt_buf0[10];
1116 w0_t[3] = esalt_buf0[11];
1118 w1_t[0] = esalt_buf0[12];
1119 w1_t[1] = esalt_buf0[13];
1120 w1_t[2] = esalt_buf0[14];
1121 w1_t[3] = esalt_buf0[15];
1123 w2_t[0] = esalt_buf1[ 0];
1124 w2_t[1] = esalt_buf1[ 1];
1125 w2_t[2] = esalt_buf1[ 2];
1126 w2_t[3] = esalt_buf1[ 3];
1128 w3_t[0] = esalt_buf1[ 4];
1129 w3_t[1] = esalt_buf1[ 5];
1130 w3_t[2] = digest_esalt_len * 8;
1133 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
1134 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
1135 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
1136 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
1137 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
1138 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
1139 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
1140 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
1141 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
1142 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
1143 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
1144 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
1145 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
1146 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
1147 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
1148 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
1150 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
1151 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
1152 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
1153 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
1154 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
1155 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
1156 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
1157 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
1158 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
1159 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
1160 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
1161 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
1162 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
1163 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
1164 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
1165 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
1167 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
1168 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
1169 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
1170 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
1171 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
1172 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
1173 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
1174 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
1175 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
1176 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
1177 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
1178 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
1179 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
1180 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
1181 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
1182 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
1184 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
1185 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
1186 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
1187 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
1188 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
1189 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
1190 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
1191 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
1192 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
1193 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
1194 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
1195 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
1196 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
1197 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
1198 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
1199 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
1211 #include VECT_COMPARE_S
1215 __device__ static void m11400m_0_1 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, 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 sip_t *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)
1221 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
1222 const u32 lid = threadIdx.x;
1228 const u32 search[4] =
1230 digests_buf[digests_offset].digest_buf[DGST_R0],
1231 digests_buf[digests_offset].digest_buf[DGST_R1],
1232 digests_buf[digests_offset].digest_buf[DGST_R2],
1233 digests_buf[digests_offset].digest_buf[DGST_R3]
1240 const u32 salt_len = esalt_bufs[salt_pos].salt_len; // not a bug, we need to get it from the esalt
1242 const u32 pw_salt_len = salt_len + pw_len;
1246 salt_buf0[ 0] = esalt_bufs[salt_pos].salt_buf[ 0];
1247 salt_buf0[ 1] = esalt_bufs[salt_pos].salt_buf[ 1];
1248 salt_buf0[ 2] = esalt_bufs[salt_pos].salt_buf[ 2];
1249 salt_buf0[ 3] = esalt_bufs[salt_pos].salt_buf[ 3];
1250 salt_buf0[ 4] = esalt_bufs[salt_pos].salt_buf[ 4];
1251 salt_buf0[ 5] = esalt_bufs[salt_pos].salt_buf[ 5];
1252 salt_buf0[ 6] = esalt_bufs[salt_pos].salt_buf[ 6];
1253 salt_buf0[ 7] = esalt_bufs[salt_pos].salt_buf[ 7];
1254 salt_buf0[ 8] = esalt_bufs[salt_pos].salt_buf[ 8];
1255 salt_buf0[ 9] = esalt_bufs[salt_pos].salt_buf[ 9];
1256 salt_buf0[10] = esalt_bufs[salt_pos].salt_buf[10];
1257 salt_buf0[11] = esalt_bufs[salt_pos].salt_buf[11];
1258 salt_buf0[12] = esalt_bufs[salt_pos].salt_buf[12];
1259 salt_buf0[13] = esalt_bufs[salt_pos].salt_buf[13];
1260 salt_buf0[14] = esalt_bufs[salt_pos].salt_buf[14];
1261 salt_buf0[15] = esalt_bufs[salt_pos].salt_buf[15];
1265 salt_buf1[ 0] = esalt_bufs[salt_pos].salt_buf[16];
1266 salt_buf1[ 1] = esalt_bufs[salt_pos].salt_buf[17];
1267 salt_buf1[ 2] = esalt_bufs[salt_pos].salt_buf[18];
1268 salt_buf1[ 3] = esalt_bufs[salt_pos].salt_buf[19];
1269 salt_buf1[ 4] = esalt_bufs[salt_pos].salt_buf[20];
1270 salt_buf1[ 5] = esalt_bufs[salt_pos].salt_buf[21];
1271 salt_buf1[ 6] = esalt_bufs[salt_pos].salt_buf[22];
1272 salt_buf1[ 7] = esalt_bufs[salt_pos].salt_buf[23];
1273 salt_buf1[ 8] = esalt_bufs[salt_pos].salt_buf[24];
1274 salt_buf1[ 9] = esalt_bufs[salt_pos].salt_buf[25];
1275 salt_buf1[10] = esalt_bufs[salt_pos].salt_buf[26];
1276 salt_buf1[11] = esalt_bufs[salt_pos].salt_buf[27];
1277 salt_buf1[12] = esalt_bufs[salt_pos].salt_buf[28];
1278 salt_buf1[13] = esalt_bufs[salt_pos].salt_buf[29];
1286 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
1290 esalt_buf0[ 0] = esalt_bufs[salt_pos].esalt_buf[ 0];
1291 esalt_buf0[ 1] = esalt_bufs[salt_pos].esalt_buf[ 1];
1292 esalt_buf0[ 2] = esalt_bufs[salt_pos].esalt_buf[ 2];
1293 esalt_buf0[ 3] = esalt_bufs[salt_pos].esalt_buf[ 3];
1294 esalt_buf0[ 4] = esalt_bufs[salt_pos].esalt_buf[ 4];
1295 esalt_buf0[ 5] = esalt_bufs[salt_pos].esalt_buf[ 5];
1296 esalt_buf0[ 6] = esalt_bufs[salt_pos].esalt_buf[ 6];
1297 esalt_buf0[ 7] = esalt_bufs[salt_pos].esalt_buf[ 7];
1298 esalt_buf0[ 8] = esalt_bufs[salt_pos].esalt_buf[ 8];
1299 esalt_buf0[ 9] = esalt_bufs[salt_pos].esalt_buf[ 9];
1300 esalt_buf0[10] = esalt_bufs[salt_pos].esalt_buf[10];
1301 esalt_buf0[11] = esalt_bufs[salt_pos].esalt_buf[11];
1302 esalt_buf0[12] = esalt_bufs[salt_pos].esalt_buf[12];
1303 esalt_buf0[13] = esalt_bufs[salt_pos].esalt_buf[13];
1304 esalt_buf0[14] = esalt_bufs[salt_pos].esalt_buf[14];
1305 esalt_buf0[15] = esalt_bufs[salt_pos].esalt_buf[15];
1309 esalt_buf1[ 0] = esalt_bufs[salt_pos].esalt_buf[16];
1310 esalt_buf1[ 1] = esalt_bufs[salt_pos].esalt_buf[17];
1311 esalt_buf1[ 2] = esalt_bufs[salt_pos].esalt_buf[18];
1312 esalt_buf1[ 3] = esalt_bufs[salt_pos].esalt_buf[19];
1313 esalt_buf1[ 4] = esalt_bufs[salt_pos].esalt_buf[20];
1314 esalt_buf1[ 5] = esalt_bufs[salt_pos].esalt_buf[21];
1315 esalt_buf1[ 6] = esalt_bufs[salt_pos].esalt_buf[22];
1316 esalt_buf1[ 7] = esalt_bufs[salt_pos].esalt_buf[23];
1317 esalt_buf1[ 8] = esalt_bufs[salt_pos].esalt_buf[24];
1318 esalt_buf1[ 9] = esalt_bufs[salt_pos].esalt_buf[25];
1319 esalt_buf1[10] = esalt_bufs[salt_pos].esalt_buf[26];
1320 esalt_buf1[11] = esalt_bufs[salt_pos].esalt_buf[27];
1321 esalt_buf1[12] = esalt_bufs[salt_pos].esalt_buf[28];
1322 esalt_buf1[13] = esalt_bufs[salt_pos].esalt_buf[29];
1323 esalt_buf1[14] = esalt_bufs[salt_pos].esalt_buf[30];
1324 esalt_buf1[15] = esalt_bufs[salt_pos].esalt_buf[31];
1328 esalt_buf2[ 0] = esalt_bufs[salt_pos].esalt_buf[32];
1329 esalt_buf2[ 1] = esalt_bufs[salt_pos].esalt_buf[33];
1330 esalt_buf2[ 2] = esalt_bufs[salt_pos].esalt_buf[34];
1331 esalt_buf2[ 3] = esalt_bufs[salt_pos].esalt_buf[35];
1332 esalt_buf2[ 4] = esalt_bufs[salt_pos].esalt_buf[36];
1333 esalt_buf2[ 5] = esalt_bufs[salt_pos].esalt_buf[37];
1345 const u32 digest_esalt_len = 32 + esalt_len;
1353 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
1355 const u32 w0r = c_bfs[il_pos].i;
1360 * HA1 = md5 ($salt . $pass)
1363 // append the pass to the salt
1367 block0[ 0] = salt_buf0[ 0];
1368 block0[ 1] = salt_buf0[ 1];
1369 block0[ 2] = salt_buf0[ 2];
1370 block0[ 3] = salt_buf0[ 3];
1371 block0[ 4] = salt_buf0[ 4];
1372 block0[ 5] = salt_buf0[ 5];
1373 block0[ 6] = salt_buf0[ 6];
1374 block0[ 7] = salt_buf0[ 7];
1375 block0[ 8] = salt_buf0[ 8];
1376 block0[ 9] = salt_buf0[ 9];
1377 block0[10] = salt_buf0[10];
1378 block0[11] = salt_buf0[11];
1379 block0[12] = salt_buf0[12];
1380 block0[13] = salt_buf0[13];
1381 block0[14] = salt_buf0[14];
1382 block0[15] = salt_buf0[15];
1386 block1[ 0] = salt_buf1[ 0];
1387 block1[ 1] = salt_buf1[ 1];
1388 block1[ 2] = salt_buf1[ 2];
1389 block1[ 3] = salt_buf1[ 3];
1390 block1[ 4] = salt_buf1[ 4];
1391 block1[ 5] = salt_buf1[ 5];
1392 block1[ 6] = salt_buf1[ 6];
1393 block1[ 7] = salt_buf1[ 7];
1394 block1[ 8] = salt_buf1[ 8];
1395 block1[ 9] = salt_buf1[ 9];
1396 block1[10] = salt_buf1[10];
1397 block1[11] = salt_buf1[11];
1398 block1[12] = salt_buf1[12];
1399 block1[13] = salt_buf1[13];
1400 block1[14] = salt_buf1[14];
1401 block1[15] = salt_buf1[15];
1403 memcat32 (block0, block1, salt_len, w0, w1, w2, w3, pw_len);
1407 w0_t[0] = block0[ 0];
1408 w0_t[1] = block0[ 1];
1409 w0_t[2] = block0[ 2];
1410 w0_t[3] = block0[ 3];
1414 w1_t[0] = block0[ 4];
1415 w1_t[1] = block0[ 5];
1416 w1_t[2] = block0[ 6];
1417 w1_t[3] = block0[ 7];
1421 w2_t[0] = block0[ 8];
1422 w2_t[1] = block0[ 9];
1423 w2_t[2] = block0[10];
1424 w2_t[3] = block0[11];
1428 w3_t[0] = block0[12];
1429 w3_t[1] = block0[13];
1430 w3_t[2] = pw_salt_len * 8;
1442 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
1443 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
1444 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
1445 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
1446 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
1447 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
1448 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
1449 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
1450 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
1451 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
1452 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
1453 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
1454 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
1455 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
1456 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
1457 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
1459 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
1460 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
1461 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
1462 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
1463 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
1464 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
1465 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
1466 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
1467 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
1468 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
1469 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
1470 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
1471 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
1472 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
1473 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
1474 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
1476 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
1477 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
1478 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
1479 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
1480 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
1481 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
1482 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
1483 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
1484 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
1485 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
1486 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
1487 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
1488 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
1489 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
1490 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
1491 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
1493 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
1494 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
1495 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
1496 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
1497 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
1498 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
1499 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
1500 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
1501 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
1502 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
1503 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
1504 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
1505 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
1506 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
1507 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
1508 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
1516 * final = md5 ($HA1 . $esalt)
1517 * we have at least 2 MD5 blocks/transformations, but we might need 3
1520 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
1521 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
1522 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
1523 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
1524 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
1525 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
1526 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
1527 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
1528 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
1529 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
1530 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
1531 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
1532 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
1533 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
1534 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
1535 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
1537 w2_t[0] = esalt_buf0[0];
1538 w2_t[1] = esalt_buf0[1];
1539 w2_t[2] = esalt_buf0[2];
1540 w2_t[3] = esalt_buf0[3];
1542 w3_t[0] = esalt_buf0[4];
1543 w3_t[1] = esalt_buf0[5];
1544 w3_t[2] = esalt_buf0[6];
1545 w3_t[3] = esalt_buf0[7];
1555 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
1556 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
1557 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
1558 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
1559 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
1560 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
1561 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
1562 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
1563 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
1564 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
1565 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
1566 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
1567 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
1568 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
1569 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
1570 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
1572 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
1573 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
1574 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
1575 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
1576 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
1577 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
1578 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
1579 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
1580 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
1581 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
1582 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
1583 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
1584 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
1585 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
1586 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
1587 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
1589 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
1590 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
1591 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
1592 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
1593 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
1594 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
1595 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
1596 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
1597 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
1598 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
1599 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
1600 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
1601 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
1602 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
1603 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
1604 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
1606 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
1607 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
1608 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
1609 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
1610 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
1611 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
1612 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
1613 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
1614 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
1615 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
1616 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
1617 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
1618 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
1619 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
1620 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
1621 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
1635 w0_t[0] = esalt_buf0[ 8];
1636 w0_t[1] = esalt_buf0[ 9];
1637 w0_t[2] = esalt_buf0[10];
1638 w0_t[3] = esalt_buf0[11];
1640 w1_t[0] = esalt_buf0[12];
1641 w1_t[1] = esalt_buf0[13];
1642 w1_t[2] = esalt_buf0[14];
1643 w1_t[3] = esalt_buf0[15];
1645 w2_t[0] = esalt_buf1[ 0];
1646 w2_t[1] = esalt_buf1[ 1];
1647 w2_t[2] = esalt_buf1[ 2];
1648 w2_t[3] = esalt_buf1[ 3];
1650 w3_t[0] = esalt_buf1[ 4];
1651 w3_t[1] = esalt_buf1[ 5];
1652 w3_t[2] = esalt_buf1[ 6];
1653 w3_t[3] = esalt_buf1[ 7];
1655 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
1656 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
1657 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
1658 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
1659 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
1660 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
1661 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
1662 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
1663 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
1664 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
1665 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
1666 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
1667 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
1668 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
1669 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
1670 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
1672 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
1673 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
1674 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
1675 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
1676 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
1677 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
1678 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
1679 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
1680 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
1681 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
1682 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
1683 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
1684 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
1685 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
1686 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
1687 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
1689 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
1690 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
1691 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
1692 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
1693 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
1694 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
1695 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
1696 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
1697 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
1698 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
1699 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
1700 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
1701 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
1702 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
1703 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
1704 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
1706 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
1707 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
1708 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
1709 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
1710 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
1711 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
1712 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
1713 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
1714 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
1715 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
1716 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
1717 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
1718 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
1719 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
1720 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
1721 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
1723 // this is for sure the final block
1735 w0_t[0] = esalt_buf1[ 8];
1736 w0_t[1] = esalt_buf1[ 9];
1737 w0_t[2] = esalt_buf1[10];
1738 w0_t[3] = esalt_buf1[11];
1740 w1_t[0] = esalt_buf1[12];
1741 w1_t[1] = esalt_buf1[13];
1742 w1_t[2] = esalt_buf1[14];
1743 w1_t[3] = esalt_buf1[15];
1745 w2_t[0] = esalt_buf2[ 0];
1746 w2_t[1] = esalt_buf2[ 1];
1747 w2_t[2] = esalt_buf2[ 2];
1748 w2_t[3] = esalt_buf2[ 3];
1750 w3_t[0] = esalt_buf2[ 4];
1751 w3_t[1] = esalt_buf2[ 5];
1752 w3_t[2] = digest_esalt_len * 8;
1755 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
1756 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
1757 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
1758 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
1759 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
1760 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
1761 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
1762 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
1763 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
1764 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
1765 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
1766 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
1767 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
1768 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
1769 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
1770 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
1772 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
1773 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
1774 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
1775 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
1776 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
1777 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
1778 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
1779 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
1780 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
1781 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
1782 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
1783 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
1784 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
1785 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
1786 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
1787 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
1789 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
1790 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
1791 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
1792 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
1793 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
1794 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
1795 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
1796 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
1797 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
1798 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
1799 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
1800 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
1801 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
1802 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
1803 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
1804 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
1806 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
1807 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
1808 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
1809 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
1810 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
1811 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
1812 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
1813 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
1814 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
1815 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
1816 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
1817 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
1818 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
1819 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
1820 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
1821 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
1833 #include VECT_COMPARE_S
1837 __device__ static void m11400m_1_0 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, 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 sip_t *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)
1843 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
1844 const u32 lid = threadIdx.x;
1850 const u32 search[4] =
1852 digests_buf[digests_offset].digest_buf[DGST_R0],
1853 digests_buf[digests_offset].digest_buf[DGST_R1],
1854 digests_buf[digests_offset].digest_buf[DGST_R2],
1855 digests_buf[digests_offset].digest_buf[DGST_R3]
1862 const u32 salt_len = esalt_bufs[salt_pos].salt_len; // not a bug, we need to get it from the esalt
1864 const u32 pw_salt_len = salt_len + pw_len;
1868 salt_buf0[ 0] = esalt_bufs[salt_pos].salt_buf[ 0];
1869 salt_buf0[ 1] = esalt_bufs[salt_pos].salt_buf[ 1];
1870 salt_buf0[ 2] = esalt_bufs[salt_pos].salt_buf[ 2];
1871 salt_buf0[ 3] = esalt_bufs[salt_pos].salt_buf[ 3];
1872 salt_buf0[ 4] = esalt_bufs[salt_pos].salt_buf[ 4];
1873 salt_buf0[ 5] = esalt_bufs[salt_pos].salt_buf[ 5];
1874 salt_buf0[ 6] = esalt_bufs[salt_pos].salt_buf[ 6];
1875 salt_buf0[ 7] = esalt_bufs[salt_pos].salt_buf[ 7];
1876 salt_buf0[ 8] = esalt_bufs[salt_pos].salt_buf[ 8];
1877 salt_buf0[ 9] = esalt_bufs[salt_pos].salt_buf[ 9];
1878 salt_buf0[10] = esalt_bufs[salt_pos].salt_buf[10];
1879 salt_buf0[11] = esalt_bufs[salt_pos].salt_buf[11];
1880 salt_buf0[12] = esalt_bufs[salt_pos].salt_buf[12];
1881 salt_buf0[13] = esalt_bufs[salt_pos].salt_buf[13];
1882 salt_buf0[14] = esalt_bufs[salt_pos].salt_buf[14];
1883 salt_buf0[15] = esalt_bufs[salt_pos].salt_buf[15];
1887 salt_buf1[ 0] = esalt_bufs[salt_pos].salt_buf[16];
1888 salt_buf1[ 1] = esalt_bufs[salt_pos].salt_buf[17];
1889 salt_buf1[ 2] = esalt_bufs[salt_pos].salt_buf[18];
1890 salt_buf1[ 3] = esalt_bufs[salt_pos].salt_buf[19];
1891 salt_buf1[ 4] = esalt_bufs[salt_pos].salt_buf[20];
1892 salt_buf1[ 5] = esalt_bufs[salt_pos].salt_buf[21];
1893 salt_buf1[ 6] = esalt_bufs[salt_pos].salt_buf[22];
1894 salt_buf1[ 7] = esalt_bufs[salt_pos].salt_buf[23];
1895 salt_buf1[ 8] = esalt_bufs[salt_pos].salt_buf[24];
1896 salt_buf1[ 9] = esalt_bufs[salt_pos].salt_buf[25];
1897 salt_buf1[10] = esalt_bufs[salt_pos].salt_buf[26];
1898 salt_buf1[11] = esalt_bufs[salt_pos].salt_buf[27];
1899 salt_buf1[12] = esalt_bufs[salt_pos].salt_buf[28];
1900 salt_buf1[13] = esalt_bufs[salt_pos].salt_buf[29];
1908 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
1912 esalt_buf0[ 0] = esalt_bufs[salt_pos].esalt_buf[ 0];
1913 esalt_buf0[ 1] = esalt_bufs[salt_pos].esalt_buf[ 1];
1914 esalt_buf0[ 2] = esalt_bufs[salt_pos].esalt_buf[ 2];
1915 esalt_buf0[ 3] = esalt_bufs[salt_pos].esalt_buf[ 3];
1916 esalt_buf0[ 4] = esalt_bufs[salt_pos].esalt_buf[ 4];
1917 esalt_buf0[ 5] = esalt_bufs[salt_pos].esalt_buf[ 5];
1918 esalt_buf0[ 6] = esalt_bufs[salt_pos].esalt_buf[ 6];
1919 esalt_buf0[ 7] = esalt_bufs[salt_pos].esalt_buf[ 7];
1920 esalt_buf0[ 8] = esalt_bufs[salt_pos].esalt_buf[ 8];
1921 esalt_buf0[ 9] = esalt_bufs[salt_pos].esalt_buf[ 9];
1922 esalt_buf0[10] = esalt_bufs[salt_pos].esalt_buf[10];
1923 esalt_buf0[11] = esalt_bufs[salt_pos].esalt_buf[11];
1924 esalt_buf0[12] = esalt_bufs[salt_pos].esalt_buf[12];
1925 esalt_buf0[13] = esalt_bufs[salt_pos].esalt_buf[13];
1926 esalt_buf0[14] = esalt_bufs[salt_pos].esalt_buf[14];
1927 esalt_buf0[15] = esalt_bufs[salt_pos].esalt_buf[15];
1931 esalt_buf1[ 0] = esalt_bufs[salt_pos].esalt_buf[16];
1932 esalt_buf1[ 1] = esalt_bufs[salt_pos].esalt_buf[17];
1933 esalt_buf1[ 2] = esalt_bufs[salt_pos].esalt_buf[18];
1934 esalt_buf1[ 3] = esalt_bufs[salt_pos].esalt_buf[19];
1935 esalt_buf1[ 4] = esalt_bufs[salt_pos].esalt_buf[20];
1936 esalt_buf1[ 5] = esalt_bufs[salt_pos].esalt_buf[21];
1937 esalt_buf1[ 6] = esalt_bufs[salt_pos].esalt_buf[22];
1938 esalt_buf1[ 7] = esalt_bufs[salt_pos].esalt_buf[23];
1939 esalt_buf1[ 8] = esalt_bufs[salt_pos].esalt_buf[24];
1940 esalt_buf1[ 9] = esalt_bufs[salt_pos].esalt_buf[25];
1941 esalt_buf1[10] = esalt_bufs[salt_pos].esalt_buf[26];
1942 esalt_buf1[11] = esalt_bufs[salt_pos].esalt_buf[27];
1943 esalt_buf1[12] = esalt_bufs[salt_pos].esalt_buf[28];
1944 esalt_buf1[13] = esalt_bufs[salt_pos].esalt_buf[29];
1945 esalt_buf1[14] = esalt_bufs[salt_pos].esalt_buf[30];
1946 esalt_buf1[15] = esalt_bufs[salt_pos].esalt_buf[31];
1948 const u32 digest_esalt_len = 32 + esalt_len;
1956 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
1958 const u32 w0r = c_bfs[il_pos].i;
1963 * HA1 = md5 ($salt . $pass)
1966 // append the pass to the salt
1970 block0[ 0] = salt_buf0[ 0];
1971 block0[ 1] = salt_buf0[ 1];
1972 block0[ 2] = salt_buf0[ 2];
1973 block0[ 3] = salt_buf0[ 3];
1974 block0[ 4] = salt_buf0[ 4];
1975 block0[ 5] = salt_buf0[ 5];
1976 block0[ 6] = salt_buf0[ 6];
1977 block0[ 7] = salt_buf0[ 7];
1978 block0[ 8] = salt_buf0[ 8];
1979 block0[ 9] = salt_buf0[ 9];
1980 block0[10] = salt_buf0[10];
1981 block0[11] = salt_buf0[11];
1982 block0[12] = salt_buf0[12];
1983 block0[13] = salt_buf0[13];
1984 block0[14] = salt_buf0[14];
1985 block0[15] = salt_buf0[15];
1989 block1[ 0] = salt_buf1[ 0];
1990 block1[ 1] = salt_buf1[ 1];
1991 block1[ 2] = salt_buf1[ 2];
1992 block1[ 3] = salt_buf1[ 3];
1993 block1[ 4] = salt_buf1[ 4];
1994 block1[ 5] = salt_buf1[ 5];
1995 block1[ 6] = salt_buf1[ 6];
1996 block1[ 7] = salt_buf1[ 7];
1997 block1[ 8] = salt_buf1[ 8];
1998 block1[ 9] = salt_buf1[ 9];
1999 block1[10] = salt_buf1[10];
2000 block1[11] = salt_buf1[11];
2001 block1[12] = salt_buf1[12];
2002 block1[13] = salt_buf1[13];
2003 block1[14] = salt_buf1[14];
2004 block1[15] = salt_buf1[15];
2006 memcat32 (block0, block1, salt_len, w0, w1, w2, w3, pw_len);
2010 w0_t[0] = block0[ 0];
2011 w0_t[1] = block0[ 1];
2012 w0_t[2] = block0[ 2];
2013 w0_t[3] = block0[ 3];
2017 w1_t[0] = block0[ 4];
2018 w1_t[1] = block0[ 5];
2019 w1_t[2] = block0[ 6];
2020 w1_t[3] = block0[ 7];
2024 w2_t[0] = block0[ 8];
2025 w2_t[1] = block0[ 9];
2026 w2_t[2] = block0[10];
2027 w2_t[3] = block0[11];
2031 w3_t[0] = block0[12];
2032 w3_t[1] = block0[13];
2033 w3_t[2] = block0[14];
2034 w3_t[3] = block0[15];
2045 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
2046 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
2047 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
2048 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
2049 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
2050 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
2051 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
2052 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
2053 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
2054 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
2055 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
2056 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
2057 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
2058 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
2059 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
2060 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
2062 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
2063 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
2064 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
2065 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
2066 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
2067 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
2068 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
2069 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
2070 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
2071 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
2072 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
2073 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
2074 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
2075 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
2076 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
2077 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
2079 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
2080 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
2081 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
2082 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
2083 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
2084 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
2085 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
2086 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
2087 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
2088 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
2089 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
2090 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
2091 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
2092 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
2093 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
2094 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
2096 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
2097 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
2098 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
2099 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
2100 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
2101 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
2102 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
2103 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
2104 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
2105 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
2106 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
2107 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
2108 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
2109 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
2110 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
2111 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
2123 w0_t[0] = block1[ 0];
2124 w0_t[1] = block1[ 1];
2125 w0_t[2] = block1[ 2];
2126 w0_t[3] = block1[ 3];
2128 w1_t[0] = block1[ 4];
2129 w1_t[1] = block1[ 5];
2130 w1_t[2] = block1[ 6];
2131 w1_t[3] = block1[ 7];
2133 w2_t[0] = block1[ 8];
2134 w2_t[1] = block1[ 9];
2135 w2_t[2] = block1[10];
2136 w2_t[3] = block1[11];
2138 w3_t[0] = block1[12];
2139 w3_t[1] = block1[13];
2140 w3_t[2] = pw_salt_len * 8;
2143 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
2144 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
2145 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
2146 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
2147 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
2148 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
2149 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
2150 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
2151 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
2152 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
2153 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
2154 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
2155 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
2156 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
2157 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
2158 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
2160 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
2161 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
2162 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
2163 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
2164 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
2165 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
2166 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
2167 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
2168 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
2169 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
2170 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
2171 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
2172 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
2173 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
2174 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
2175 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
2177 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
2178 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
2179 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
2180 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
2181 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
2182 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
2183 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
2184 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
2185 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
2186 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
2187 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
2188 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
2189 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
2190 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
2191 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
2192 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
2194 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
2195 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
2196 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
2197 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
2198 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
2199 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
2200 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
2201 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
2202 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
2203 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
2204 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
2205 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
2206 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
2207 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
2208 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
2209 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
2217 * final = md5 ($HA1 . $esalt)
2218 * we have at least 2 MD5 blocks/transformations, but we might need 3
2221 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
2222 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
2223 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
2224 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
2225 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
2226 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
2227 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
2228 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
2229 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
2230 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
2231 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
2232 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
2233 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
2234 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
2235 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
2236 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
2238 w2_t[0] = esalt_buf0[0];
2239 w2_t[1] = esalt_buf0[1];
2240 w2_t[2] = esalt_buf0[2];
2241 w2_t[3] = esalt_buf0[3];
2243 w3_t[0] = esalt_buf0[4];
2244 w3_t[1] = esalt_buf0[5];
2245 w3_t[2] = esalt_buf0[6];
2246 w3_t[3] = esalt_buf0[7];
2256 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
2257 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
2258 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
2259 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
2260 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
2261 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
2262 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
2263 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
2264 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
2265 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
2266 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
2267 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
2268 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
2269 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
2270 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
2271 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
2273 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
2274 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
2275 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
2276 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
2277 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
2278 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
2279 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
2280 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
2281 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
2282 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
2283 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
2284 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
2285 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
2286 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
2287 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
2288 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
2290 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
2291 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
2292 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
2293 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
2294 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
2295 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
2296 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
2297 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
2298 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
2299 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
2300 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
2301 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
2302 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
2303 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
2304 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
2305 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
2307 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
2308 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
2309 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
2310 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
2311 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
2312 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
2313 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
2314 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
2315 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
2316 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
2317 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
2318 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
2319 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
2320 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
2321 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
2322 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
2336 w0_t[0] = esalt_buf0[ 8];
2337 w0_t[1] = esalt_buf0[ 9];
2338 w0_t[2] = esalt_buf0[10];
2339 w0_t[3] = esalt_buf0[11];
2341 w1_t[0] = esalt_buf0[12];
2342 w1_t[1] = esalt_buf0[13];
2343 w1_t[2] = esalt_buf0[14];
2344 w1_t[3] = esalt_buf0[15];
2346 w2_t[0] = esalt_buf1[ 0];
2347 w2_t[1] = esalt_buf1[ 1];
2348 w2_t[2] = esalt_buf1[ 2];
2349 w2_t[3] = esalt_buf1[ 3];
2351 w3_t[0] = esalt_buf1[ 4];
2352 w3_t[1] = esalt_buf1[ 5];
2353 w3_t[2] = digest_esalt_len * 8;
2356 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
2357 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
2358 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
2359 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
2360 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
2361 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
2362 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
2363 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
2364 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
2365 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
2366 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
2367 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
2368 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
2369 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
2370 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
2371 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
2373 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
2374 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
2375 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
2376 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
2377 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
2378 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
2379 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
2380 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
2381 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
2382 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
2383 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
2384 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
2385 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
2386 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
2387 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
2388 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
2390 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
2391 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
2392 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
2393 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
2394 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
2395 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
2396 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
2397 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
2398 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
2399 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
2400 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
2401 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
2402 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
2403 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
2404 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
2405 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
2407 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
2408 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
2409 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
2410 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
2411 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
2412 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
2413 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
2414 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
2415 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
2416 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
2417 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
2418 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
2419 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
2420 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
2421 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
2422 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
2434 #include VECT_COMPARE_S
2438 __device__ static void m11400m_1_1 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, 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 sip_t *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)
2444 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
2445 const u32 lid = threadIdx.x;
2451 const u32 search[4] =
2453 digests_buf[digests_offset].digest_buf[DGST_R0],
2454 digests_buf[digests_offset].digest_buf[DGST_R1],
2455 digests_buf[digests_offset].digest_buf[DGST_R2],
2456 digests_buf[digests_offset].digest_buf[DGST_R3]
2463 const u32 salt_len = esalt_bufs[salt_pos].salt_len; // not a bug, we need to get it from the esalt
2465 const u32 pw_salt_len = salt_len + pw_len;
2469 salt_buf0[ 0] = esalt_bufs[salt_pos].salt_buf[ 0];
2470 salt_buf0[ 1] = esalt_bufs[salt_pos].salt_buf[ 1];
2471 salt_buf0[ 2] = esalt_bufs[salt_pos].salt_buf[ 2];
2472 salt_buf0[ 3] = esalt_bufs[salt_pos].salt_buf[ 3];
2473 salt_buf0[ 4] = esalt_bufs[salt_pos].salt_buf[ 4];
2474 salt_buf0[ 5] = esalt_bufs[salt_pos].salt_buf[ 5];
2475 salt_buf0[ 6] = esalt_bufs[salt_pos].salt_buf[ 6];
2476 salt_buf0[ 7] = esalt_bufs[salt_pos].salt_buf[ 7];
2477 salt_buf0[ 8] = esalt_bufs[salt_pos].salt_buf[ 8];
2478 salt_buf0[ 9] = esalt_bufs[salt_pos].salt_buf[ 9];
2479 salt_buf0[10] = esalt_bufs[salt_pos].salt_buf[10];
2480 salt_buf0[11] = esalt_bufs[salt_pos].salt_buf[11];
2481 salt_buf0[12] = esalt_bufs[salt_pos].salt_buf[12];
2482 salt_buf0[13] = esalt_bufs[salt_pos].salt_buf[13];
2483 salt_buf0[14] = esalt_bufs[salt_pos].salt_buf[14];
2484 salt_buf0[15] = esalt_bufs[salt_pos].salt_buf[15];
2488 salt_buf1[ 0] = esalt_bufs[salt_pos].salt_buf[16];
2489 salt_buf1[ 1] = esalt_bufs[salt_pos].salt_buf[17];
2490 salt_buf1[ 2] = esalt_bufs[salt_pos].salt_buf[18];
2491 salt_buf1[ 3] = esalt_bufs[salt_pos].salt_buf[19];
2492 salt_buf1[ 4] = esalt_bufs[salt_pos].salt_buf[20];
2493 salt_buf1[ 5] = esalt_bufs[salt_pos].salt_buf[21];
2494 salt_buf1[ 6] = esalt_bufs[salt_pos].salt_buf[22];
2495 salt_buf1[ 7] = esalt_bufs[salt_pos].salt_buf[23];
2496 salt_buf1[ 8] = esalt_bufs[salt_pos].salt_buf[24];
2497 salt_buf1[ 9] = esalt_bufs[salt_pos].salt_buf[25];
2498 salt_buf1[10] = esalt_bufs[salt_pos].salt_buf[26];
2499 salt_buf1[11] = esalt_bufs[salt_pos].salt_buf[27];
2500 salt_buf1[12] = esalt_bufs[salt_pos].salt_buf[28];
2501 salt_buf1[13] = esalt_bufs[salt_pos].salt_buf[29];
2509 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
2513 esalt_buf0[ 0] = esalt_bufs[salt_pos].esalt_buf[ 0];
2514 esalt_buf0[ 1] = esalt_bufs[salt_pos].esalt_buf[ 1];
2515 esalt_buf0[ 2] = esalt_bufs[salt_pos].esalt_buf[ 2];
2516 esalt_buf0[ 3] = esalt_bufs[salt_pos].esalt_buf[ 3];
2517 esalt_buf0[ 4] = esalt_bufs[salt_pos].esalt_buf[ 4];
2518 esalt_buf0[ 5] = esalt_bufs[salt_pos].esalt_buf[ 5];
2519 esalt_buf0[ 6] = esalt_bufs[salt_pos].esalt_buf[ 6];
2520 esalt_buf0[ 7] = esalt_bufs[salt_pos].esalt_buf[ 7];
2521 esalt_buf0[ 8] = esalt_bufs[salt_pos].esalt_buf[ 8];
2522 esalt_buf0[ 9] = esalt_bufs[salt_pos].esalt_buf[ 9];
2523 esalt_buf0[10] = esalt_bufs[salt_pos].esalt_buf[10];
2524 esalt_buf0[11] = esalt_bufs[salt_pos].esalt_buf[11];
2525 esalt_buf0[12] = esalt_bufs[salt_pos].esalt_buf[12];
2526 esalt_buf0[13] = esalt_bufs[salt_pos].esalt_buf[13];
2527 esalt_buf0[14] = esalt_bufs[salt_pos].esalt_buf[14];
2528 esalt_buf0[15] = esalt_bufs[salt_pos].esalt_buf[15];
2532 esalt_buf1[ 0] = esalt_bufs[salt_pos].esalt_buf[16];
2533 esalt_buf1[ 1] = esalt_bufs[salt_pos].esalt_buf[17];
2534 esalt_buf1[ 2] = esalt_bufs[salt_pos].esalt_buf[18];
2535 esalt_buf1[ 3] = esalt_bufs[salt_pos].esalt_buf[19];
2536 esalt_buf1[ 4] = esalt_bufs[salt_pos].esalt_buf[20];
2537 esalt_buf1[ 5] = esalt_bufs[salt_pos].esalt_buf[21];
2538 esalt_buf1[ 6] = esalt_bufs[salt_pos].esalt_buf[22];
2539 esalt_buf1[ 7] = esalt_bufs[salt_pos].esalt_buf[23];
2540 esalt_buf1[ 8] = esalt_bufs[salt_pos].esalt_buf[24];
2541 esalt_buf1[ 9] = esalt_bufs[salt_pos].esalt_buf[25];
2542 esalt_buf1[10] = esalt_bufs[salt_pos].esalt_buf[26];
2543 esalt_buf1[11] = esalt_bufs[salt_pos].esalt_buf[27];
2544 esalt_buf1[12] = esalt_bufs[salt_pos].esalt_buf[28];
2545 esalt_buf1[13] = esalt_bufs[salt_pos].esalt_buf[29];
2546 esalt_buf1[14] = esalt_bufs[salt_pos].esalt_buf[30];
2547 esalt_buf1[15] = esalt_bufs[salt_pos].esalt_buf[31];
2551 esalt_buf2[ 0] = esalt_bufs[salt_pos].esalt_buf[32];
2552 esalt_buf2[ 1] = esalt_bufs[salt_pos].esalt_buf[33];
2553 esalt_buf2[ 2] = esalt_bufs[salt_pos].esalt_buf[34];
2554 esalt_buf2[ 3] = esalt_bufs[salt_pos].esalt_buf[35];
2555 esalt_buf2[ 4] = esalt_bufs[salt_pos].esalt_buf[36];
2556 esalt_buf2[ 5] = esalt_bufs[salt_pos].esalt_buf[37];
2568 const u32 digest_esalt_len = 32 + esalt_len;
2576 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
2578 const u32 w0r = c_bfs[il_pos].i;
2583 * HA1 = md5 ($salt . $pass)
2586 // append the pass to the salt
2590 block0[ 0] = salt_buf0[ 0];
2591 block0[ 1] = salt_buf0[ 1];
2592 block0[ 2] = salt_buf0[ 2];
2593 block0[ 3] = salt_buf0[ 3];
2594 block0[ 4] = salt_buf0[ 4];
2595 block0[ 5] = salt_buf0[ 5];
2596 block0[ 6] = salt_buf0[ 6];
2597 block0[ 7] = salt_buf0[ 7];
2598 block0[ 8] = salt_buf0[ 8];
2599 block0[ 9] = salt_buf0[ 9];
2600 block0[10] = salt_buf0[10];
2601 block0[11] = salt_buf0[11];
2602 block0[12] = salt_buf0[12];
2603 block0[13] = salt_buf0[13];
2604 block0[14] = salt_buf0[14];
2605 block0[15] = salt_buf0[15];
2609 block1[ 0] = salt_buf1[ 0];
2610 block1[ 1] = salt_buf1[ 1];
2611 block1[ 2] = salt_buf1[ 2];
2612 block1[ 3] = salt_buf1[ 3];
2613 block1[ 4] = salt_buf1[ 4];
2614 block1[ 5] = salt_buf1[ 5];
2615 block1[ 6] = salt_buf1[ 6];
2616 block1[ 7] = salt_buf1[ 7];
2617 block1[ 8] = salt_buf1[ 8];
2618 block1[ 9] = salt_buf1[ 9];
2619 block1[10] = salt_buf1[10];
2620 block1[11] = salt_buf1[11];
2621 block1[12] = salt_buf1[12];
2622 block1[13] = salt_buf1[13];
2623 block1[14] = salt_buf1[14];
2624 block1[15] = salt_buf1[15];
2626 memcat32 (block0, block1, salt_len, w0, w1, w2, w3, pw_len);
2630 w0_t[0] = block0[ 0];
2631 w0_t[1] = block0[ 1];
2632 w0_t[2] = block0[ 2];
2633 w0_t[3] = block0[ 3];
2637 w1_t[0] = block0[ 4];
2638 w1_t[1] = block0[ 5];
2639 w1_t[2] = block0[ 6];
2640 w1_t[3] = block0[ 7];
2644 w2_t[0] = block0[ 8];
2645 w2_t[1] = block0[ 9];
2646 w2_t[2] = block0[10];
2647 w2_t[3] = block0[11];
2651 w3_t[0] = block0[12];
2652 w3_t[1] = block0[13];
2653 w3_t[2] = block0[14];
2654 w3_t[3] = block0[15];
2665 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
2666 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
2667 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
2668 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
2669 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
2670 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
2671 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
2672 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
2673 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
2674 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
2675 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
2676 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
2677 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
2678 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
2679 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
2680 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
2682 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
2683 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
2684 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
2685 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
2686 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
2687 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
2688 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
2689 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
2690 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
2691 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
2692 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
2693 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
2694 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
2695 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
2696 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
2697 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
2699 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
2700 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
2701 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
2702 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
2703 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
2704 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
2705 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
2706 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
2707 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
2708 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
2709 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
2710 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
2711 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
2712 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
2713 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
2714 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
2716 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
2717 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
2718 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
2719 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
2720 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
2721 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
2722 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
2723 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
2724 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
2725 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
2726 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
2727 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
2728 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
2729 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
2730 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
2731 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
2743 w0_t[0] = block1[ 0];
2744 w0_t[1] = block1[ 1];
2745 w0_t[2] = block1[ 2];
2746 w0_t[3] = block1[ 3];
2748 w1_t[0] = block1[ 4];
2749 w1_t[1] = block1[ 5];
2750 w1_t[2] = block1[ 6];
2751 w1_t[3] = block1[ 7];
2753 w2_t[0] = block1[ 8];
2754 w2_t[1] = block1[ 9];
2755 w2_t[2] = block1[10];
2756 w2_t[3] = block1[11];
2758 w3_t[0] = block1[12];
2759 w3_t[1] = block1[13];
2760 w3_t[2] = pw_salt_len * 8;
2763 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
2764 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
2765 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
2766 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
2767 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
2768 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
2769 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
2770 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
2771 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
2772 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
2773 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
2774 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
2775 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
2776 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
2777 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
2778 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
2780 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
2781 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
2782 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
2783 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
2784 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
2785 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
2786 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
2787 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
2788 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
2789 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
2790 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
2791 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
2792 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
2793 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
2794 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
2795 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
2797 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
2798 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
2799 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
2800 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
2801 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
2802 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
2803 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
2804 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
2805 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
2806 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
2807 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
2808 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
2809 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
2810 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
2811 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
2812 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
2814 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
2815 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
2816 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
2817 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
2818 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
2819 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
2820 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
2821 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
2822 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
2823 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
2824 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
2825 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
2826 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
2827 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
2828 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
2829 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
2837 * final = md5 ($HA1 . $esalt)
2838 * we have at least 2 MD5 blocks/transformations, but we might need 3
2841 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
2842 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
2843 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
2844 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
2845 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
2846 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
2847 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
2848 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
2849 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
2850 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
2851 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
2852 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
2853 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
2854 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
2855 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
2856 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
2858 w2_t[0] = esalt_buf0[0];
2859 w2_t[1] = esalt_buf0[1];
2860 w2_t[2] = esalt_buf0[2];
2861 w2_t[3] = esalt_buf0[3];
2863 w3_t[0] = esalt_buf0[4];
2864 w3_t[1] = esalt_buf0[5];
2865 w3_t[2] = esalt_buf0[6];
2866 w3_t[3] = esalt_buf0[7];
2876 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
2877 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
2878 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
2879 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
2880 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
2881 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
2882 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
2883 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
2884 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
2885 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
2886 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
2887 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
2888 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
2889 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
2890 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
2891 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
2893 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
2894 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
2895 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
2896 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
2897 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
2898 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
2899 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
2900 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
2901 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
2902 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
2903 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
2904 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
2905 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
2906 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
2907 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
2908 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
2910 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
2911 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
2912 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
2913 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
2914 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
2915 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
2916 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
2917 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
2918 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
2919 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
2920 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
2921 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
2922 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
2923 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
2924 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
2925 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
2927 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
2928 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
2929 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
2930 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
2931 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
2932 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
2933 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
2934 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
2935 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
2936 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
2937 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
2938 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
2939 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
2940 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
2941 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
2942 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
2956 w0_t[0] = esalt_buf0[ 8];
2957 w0_t[1] = esalt_buf0[ 9];
2958 w0_t[2] = esalt_buf0[10];
2959 w0_t[3] = esalt_buf0[11];
2961 w1_t[0] = esalt_buf0[12];
2962 w1_t[1] = esalt_buf0[13];
2963 w1_t[2] = esalt_buf0[14];
2964 w1_t[3] = esalt_buf0[15];
2966 w2_t[0] = esalt_buf1[ 0];
2967 w2_t[1] = esalt_buf1[ 1];
2968 w2_t[2] = esalt_buf1[ 2];
2969 w2_t[3] = esalt_buf1[ 3];
2971 w3_t[0] = esalt_buf1[ 4];
2972 w3_t[1] = esalt_buf1[ 5];
2973 w3_t[2] = esalt_buf1[ 6];
2974 w3_t[3] = esalt_buf1[ 7];
2976 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
2977 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
2978 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
2979 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
2980 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
2981 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
2982 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
2983 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
2984 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
2985 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
2986 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
2987 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
2988 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
2989 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
2990 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
2991 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
2993 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
2994 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
2995 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
2996 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
2997 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
2998 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
2999 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
3000 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
3001 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
3002 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
3003 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
3004 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
3005 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
3006 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
3007 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
3008 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
3010 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
3011 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
3012 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
3013 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
3014 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
3015 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
3016 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
3017 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
3018 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
3019 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
3020 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
3021 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
3022 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
3023 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
3024 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
3025 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
3027 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
3028 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
3029 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
3030 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
3031 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
3032 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
3033 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
3034 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
3035 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
3036 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
3037 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
3038 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
3039 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
3040 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
3041 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
3042 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
3044 // this is for sure the final block
3056 w0_t[0] = esalt_buf1[ 8];
3057 w0_t[1] = esalt_buf1[ 9];
3058 w0_t[2] = esalt_buf1[10];
3059 w0_t[3] = esalt_buf1[11];
3061 w1_t[0] = esalt_buf1[12];
3062 w1_t[1] = esalt_buf1[13];
3063 w1_t[2] = esalt_buf1[14];
3064 w1_t[3] = esalt_buf1[15];
3066 w2_t[0] = esalt_buf2[ 0];
3067 w2_t[1] = esalt_buf2[ 1];
3068 w2_t[2] = esalt_buf2[ 2];
3069 w2_t[3] = esalt_buf2[ 3];
3071 w3_t[0] = esalt_buf2[ 4];
3072 w3_t[1] = esalt_buf2[ 5];
3073 w3_t[2] = digest_esalt_len * 8;
3076 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
3077 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
3078 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
3079 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
3080 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
3081 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
3082 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
3083 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
3084 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
3085 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
3086 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
3087 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
3088 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
3089 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
3090 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
3091 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
3093 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
3094 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
3095 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
3096 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
3097 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
3098 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
3099 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
3100 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
3101 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
3102 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
3103 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
3104 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
3105 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
3106 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
3107 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
3108 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
3110 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
3111 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
3112 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
3113 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
3114 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
3115 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
3116 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
3117 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
3118 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
3119 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
3120 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
3121 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
3122 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
3123 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
3124 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
3125 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
3127 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
3128 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
3129 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
3130 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
3131 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
3132 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
3133 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
3134 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
3135 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
3136 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
3137 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
3138 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
3139 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
3140 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
3141 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
3142 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
3154 #include VECT_COMPARE_S
3158 __device__ static void m11400s_0_0 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, 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 sip_t *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)
3164 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
3165 const u32 lid = threadIdx.x;
3171 const u32 search[4] =
3173 digests_buf[digests_offset].digest_buf[DGST_R0],
3174 digests_buf[digests_offset].digest_buf[DGST_R1],
3175 digests_buf[digests_offset].digest_buf[DGST_R2],
3176 digests_buf[digests_offset].digest_buf[DGST_R3]
3183 const u32 salt_len = esalt_bufs[salt_pos].salt_len; // not a bug, we need to get it from the esalt
3185 const u32 pw_salt_len = salt_len + pw_len;
3189 salt_buf0[ 0] = esalt_bufs[salt_pos].salt_buf[ 0];
3190 salt_buf0[ 1] = esalt_bufs[salt_pos].salt_buf[ 1];
3191 salt_buf0[ 2] = esalt_bufs[salt_pos].salt_buf[ 2];
3192 salt_buf0[ 3] = esalt_bufs[salt_pos].salt_buf[ 3];
3193 salt_buf0[ 4] = esalt_bufs[salt_pos].salt_buf[ 4];
3194 salt_buf0[ 5] = esalt_bufs[salt_pos].salt_buf[ 5];
3195 salt_buf0[ 6] = esalt_bufs[salt_pos].salt_buf[ 6];
3196 salt_buf0[ 7] = esalt_bufs[salt_pos].salt_buf[ 7];
3197 salt_buf0[ 8] = esalt_bufs[salt_pos].salt_buf[ 8];
3198 salt_buf0[ 9] = esalt_bufs[salt_pos].salt_buf[ 9];
3199 salt_buf0[10] = esalt_bufs[salt_pos].salt_buf[10];
3200 salt_buf0[11] = esalt_bufs[salt_pos].salt_buf[11];
3201 salt_buf0[12] = esalt_bufs[salt_pos].salt_buf[12];
3202 salt_buf0[13] = esalt_bufs[salt_pos].salt_buf[13];
3203 salt_buf0[14] = esalt_bufs[salt_pos].salt_buf[14];
3204 salt_buf0[15] = esalt_bufs[salt_pos].salt_buf[15];
3208 salt_buf1[ 0] = esalt_bufs[salt_pos].salt_buf[16];
3209 salt_buf1[ 1] = esalt_bufs[salt_pos].salt_buf[17];
3210 salt_buf1[ 2] = esalt_bufs[salt_pos].salt_buf[18];
3211 salt_buf1[ 3] = esalt_bufs[salt_pos].salt_buf[19];
3212 salt_buf1[ 4] = esalt_bufs[salt_pos].salt_buf[20];
3213 salt_buf1[ 5] = esalt_bufs[salt_pos].salt_buf[21];
3214 salt_buf1[ 6] = esalt_bufs[salt_pos].salt_buf[22];
3215 salt_buf1[ 7] = esalt_bufs[salt_pos].salt_buf[23];
3216 salt_buf1[ 8] = esalt_bufs[salt_pos].salt_buf[24];
3217 salt_buf1[ 9] = esalt_bufs[salt_pos].salt_buf[25];
3218 salt_buf1[10] = esalt_bufs[salt_pos].salt_buf[26];
3219 salt_buf1[11] = esalt_bufs[salt_pos].salt_buf[27];
3220 salt_buf1[12] = esalt_bufs[salt_pos].salt_buf[28];
3221 salt_buf1[13] = esalt_bufs[salt_pos].salt_buf[29];
3229 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
3233 esalt_buf0[ 0] = esalt_bufs[salt_pos].esalt_buf[ 0];
3234 esalt_buf0[ 1] = esalt_bufs[salt_pos].esalt_buf[ 1];
3235 esalt_buf0[ 2] = esalt_bufs[salt_pos].esalt_buf[ 2];
3236 esalt_buf0[ 3] = esalt_bufs[salt_pos].esalt_buf[ 3];
3237 esalt_buf0[ 4] = esalt_bufs[salt_pos].esalt_buf[ 4];
3238 esalt_buf0[ 5] = esalt_bufs[salt_pos].esalt_buf[ 5];
3239 esalt_buf0[ 6] = esalt_bufs[salt_pos].esalt_buf[ 6];
3240 esalt_buf0[ 7] = esalt_bufs[salt_pos].esalt_buf[ 7];
3241 esalt_buf0[ 8] = esalt_bufs[salt_pos].esalt_buf[ 8];
3242 esalt_buf0[ 9] = esalt_bufs[salt_pos].esalt_buf[ 9];
3243 esalt_buf0[10] = esalt_bufs[salt_pos].esalt_buf[10];
3244 esalt_buf0[11] = esalt_bufs[salt_pos].esalt_buf[11];
3245 esalt_buf0[12] = esalt_bufs[salt_pos].esalt_buf[12];
3246 esalt_buf0[13] = esalt_bufs[salt_pos].esalt_buf[13];
3247 esalt_buf0[14] = esalt_bufs[salt_pos].esalt_buf[14];
3248 esalt_buf0[15] = esalt_bufs[salt_pos].esalt_buf[15];
3252 esalt_buf1[ 0] = esalt_bufs[salt_pos].esalt_buf[16];
3253 esalt_buf1[ 1] = esalt_bufs[salt_pos].esalt_buf[17];
3254 esalt_buf1[ 2] = esalt_bufs[salt_pos].esalt_buf[18];
3255 esalt_buf1[ 3] = esalt_bufs[salt_pos].esalt_buf[19];
3256 esalt_buf1[ 4] = esalt_bufs[salt_pos].esalt_buf[20];
3257 esalt_buf1[ 5] = esalt_bufs[salt_pos].esalt_buf[21];
3258 esalt_buf1[ 6] = esalt_bufs[salt_pos].esalt_buf[22];
3259 esalt_buf1[ 7] = esalt_bufs[salt_pos].esalt_buf[23];
3260 esalt_buf1[ 8] = esalt_bufs[salt_pos].esalt_buf[24];
3261 esalt_buf1[ 9] = esalt_bufs[salt_pos].esalt_buf[25];
3262 esalt_buf1[10] = esalt_bufs[salt_pos].esalt_buf[26];
3263 esalt_buf1[11] = esalt_bufs[salt_pos].esalt_buf[27];
3264 esalt_buf1[12] = esalt_bufs[salt_pos].esalt_buf[28];
3265 esalt_buf1[13] = esalt_bufs[salt_pos].esalt_buf[29];
3266 esalt_buf1[14] = esalt_bufs[salt_pos].esalt_buf[30];
3267 esalt_buf1[15] = esalt_bufs[salt_pos].esalt_buf[31];
3269 const u32 digest_esalt_len = 32 + esalt_len;
3277 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
3279 const u32 w0r = c_bfs[il_pos].i;
3284 * HA1 = md5 ($salt . $pass)
3287 // append the pass to the salt
3291 block0[ 0] = salt_buf0[ 0];
3292 block0[ 1] = salt_buf0[ 1];
3293 block0[ 2] = salt_buf0[ 2];
3294 block0[ 3] = salt_buf0[ 3];
3295 block0[ 4] = salt_buf0[ 4];
3296 block0[ 5] = salt_buf0[ 5];
3297 block0[ 6] = salt_buf0[ 6];
3298 block0[ 7] = salt_buf0[ 7];
3299 block0[ 8] = salt_buf0[ 8];
3300 block0[ 9] = salt_buf0[ 9];
3301 block0[10] = salt_buf0[10];
3302 block0[11] = salt_buf0[11];
3303 block0[12] = salt_buf0[12];
3304 block0[13] = salt_buf0[13];
3305 block0[14] = salt_buf0[14];
3306 block0[15] = salt_buf0[15];
3310 block1[ 0] = salt_buf1[ 0];
3311 block1[ 1] = salt_buf1[ 1];
3312 block1[ 2] = salt_buf1[ 2];
3313 block1[ 3] = salt_buf1[ 3];
3314 block1[ 4] = salt_buf1[ 4];
3315 block1[ 5] = salt_buf1[ 5];
3316 block1[ 6] = salt_buf1[ 6];
3317 block1[ 7] = salt_buf1[ 7];
3318 block1[ 8] = salt_buf1[ 8];
3319 block1[ 9] = salt_buf1[ 9];
3320 block1[10] = salt_buf1[10];
3321 block1[11] = salt_buf1[11];
3322 block1[12] = salt_buf1[12];
3323 block1[13] = salt_buf1[13];
3324 block1[14] = salt_buf1[14];
3325 block1[15] = salt_buf1[15];
3327 memcat32 (block0, block1, salt_len, w0, w1, w2, w3, pw_len);
3331 w0_t[0] = block0[ 0];
3332 w0_t[1] = block0[ 1];
3333 w0_t[2] = block0[ 2];
3334 w0_t[3] = block0[ 3];
3338 w1_t[0] = block0[ 4];
3339 w1_t[1] = block0[ 5];
3340 w1_t[2] = block0[ 6];
3341 w1_t[3] = block0[ 7];
3345 w2_t[0] = block0[ 8];
3346 w2_t[1] = block0[ 9];
3347 w2_t[2] = block0[10];
3348 w2_t[3] = block0[11];
3352 w3_t[0] = block0[12];
3353 w3_t[1] = block0[13];
3354 w3_t[2] = pw_salt_len * 8;
3366 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
3367 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
3368 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
3369 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
3370 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
3371 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
3372 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
3373 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
3374 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
3375 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
3376 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
3377 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
3378 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
3379 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
3380 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
3381 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
3383 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
3384 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
3385 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
3386 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
3387 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
3388 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
3389 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
3390 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
3391 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
3392 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
3393 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
3394 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
3395 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
3396 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
3397 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
3398 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
3400 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
3401 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
3402 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
3403 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
3404 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
3405 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
3406 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
3407 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
3408 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
3409 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
3410 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
3411 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
3412 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
3413 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
3414 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
3415 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
3417 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
3418 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
3419 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
3420 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
3421 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
3422 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
3423 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
3424 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
3425 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
3426 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
3427 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
3428 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
3429 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
3430 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
3431 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
3432 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
3440 * final = md5 ($HA1 . $esalt)
3441 * we have at least 2 MD5 blocks/transformations, but we might need 3
3444 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
3445 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
3446 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
3447 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
3448 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
3449 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
3450 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
3451 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
3452 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
3453 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
3454 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
3455 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
3456 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
3457 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
3458 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
3459 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
3461 w2_t[0] = esalt_buf0[0];
3462 w2_t[1] = esalt_buf0[1];
3463 w2_t[2] = esalt_buf0[2];
3464 w2_t[3] = esalt_buf0[3];
3466 w3_t[0] = esalt_buf0[4];
3467 w3_t[1] = esalt_buf0[5];
3468 w3_t[2] = esalt_buf0[6];
3469 w3_t[3] = esalt_buf0[7];
3479 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
3480 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
3481 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
3482 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
3483 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
3484 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
3485 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
3486 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
3487 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
3488 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
3489 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
3490 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
3491 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
3492 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
3493 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
3494 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
3496 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
3497 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
3498 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
3499 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
3500 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
3501 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
3502 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
3503 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
3504 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
3505 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
3506 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
3507 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
3508 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
3509 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
3510 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
3511 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
3513 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
3514 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
3515 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
3516 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
3517 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
3518 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
3519 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
3520 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
3521 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
3522 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
3523 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
3524 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
3525 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
3526 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
3527 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
3528 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
3530 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
3531 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
3532 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
3533 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
3534 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
3535 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
3536 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
3537 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
3538 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
3539 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
3540 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
3541 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
3542 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
3543 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
3544 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
3545 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
3559 w0_t[0] = esalt_buf0[ 8];
3560 w0_t[1] = esalt_buf0[ 9];
3561 w0_t[2] = esalt_buf0[10];
3562 w0_t[3] = esalt_buf0[11];
3564 w1_t[0] = esalt_buf0[12];
3565 w1_t[1] = esalt_buf0[13];
3566 w1_t[2] = esalt_buf0[14];
3567 w1_t[3] = esalt_buf0[15];
3569 w2_t[0] = esalt_buf1[ 0];
3570 w2_t[1] = esalt_buf1[ 1];
3571 w2_t[2] = esalt_buf1[ 2];
3572 w2_t[3] = esalt_buf1[ 3];
3574 w3_t[0] = esalt_buf1[ 4];
3575 w3_t[1] = esalt_buf1[ 5];
3576 w3_t[2] = digest_esalt_len * 8;
3579 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
3580 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
3581 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
3582 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
3583 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
3584 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
3585 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
3586 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
3587 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
3588 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
3589 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
3590 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
3591 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
3592 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
3593 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
3594 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
3596 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
3597 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
3598 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
3599 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
3600 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
3601 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
3602 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
3603 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
3604 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
3605 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
3606 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
3607 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
3608 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
3609 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
3610 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
3611 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
3613 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
3614 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
3615 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
3616 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
3617 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
3618 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
3619 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
3620 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
3621 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
3622 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
3623 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
3624 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
3625 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
3626 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
3627 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
3628 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
3630 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
3631 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
3632 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
3633 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
3634 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
3635 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
3636 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
3637 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
3638 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
3639 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
3640 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
3641 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
3642 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
3643 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
3644 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
3645 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
3657 #include VECT_COMPARE_S
3661 __device__ static void m11400s_0_1 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, 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 sip_t *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)
3667 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
3668 const u32 lid = threadIdx.x;
3674 const u32 search[4] =
3676 digests_buf[digests_offset].digest_buf[DGST_R0],
3677 digests_buf[digests_offset].digest_buf[DGST_R1],
3678 digests_buf[digests_offset].digest_buf[DGST_R2],
3679 digests_buf[digests_offset].digest_buf[DGST_R3]
3686 const u32 salt_len = esalt_bufs[salt_pos].salt_len; // not a bug, we need to get it from the esalt
3688 const u32 pw_salt_len = salt_len + pw_len;
3692 salt_buf0[ 0] = esalt_bufs[salt_pos].salt_buf[ 0];
3693 salt_buf0[ 1] = esalt_bufs[salt_pos].salt_buf[ 1];
3694 salt_buf0[ 2] = esalt_bufs[salt_pos].salt_buf[ 2];
3695 salt_buf0[ 3] = esalt_bufs[salt_pos].salt_buf[ 3];
3696 salt_buf0[ 4] = esalt_bufs[salt_pos].salt_buf[ 4];
3697 salt_buf0[ 5] = esalt_bufs[salt_pos].salt_buf[ 5];
3698 salt_buf0[ 6] = esalt_bufs[salt_pos].salt_buf[ 6];
3699 salt_buf0[ 7] = esalt_bufs[salt_pos].salt_buf[ 7];
3700 salt_buf0[ 8] = esalt_bufs[salt_pos].salt_buf[ 8];
3701 salt_buf0[ 9] = esalt_bufs[salt_pos].salt_buf[ 9];
3702 salt_buf0[10] = esalt_bufs[salt_pos].salt_buf[10];
3703 salt_buf0[11] = esalt_bufs[salt_pos].salt_buf[11];
3704 salt_buf0[12] = esalt_bufs[salt_pos].salt_buf[12];
3705 salt_buf0[13] = esalt_bufs[salt_pos].salt_buf[13];
3706 salt_buf0[14] = esalt_bufs[salt_pos].salt_buf[14];
3707 salt_buf0[15] = esalt_bufs[salt_pos].salt_buf[15];
3711 salt_buf1[ 0] = esalt_bufs[salt_pos].salt_buf[16];
3712 salt_buf1[ 1] = esalt_bufs[salt_pos].salt_buf[17];
3713 salt_buf1[ 2] = esalt_bufs[salt_pos].salt_buf[18];
3714 salt_buf1[ 3] = esalt_bufs[salt_pos].salt_buf[19];
3715 salt_buf1[ 4] = esalt_bufs[salt_pos].salt_buf[20];
3716 salt_buf1[ 5] = esalt_bufs[salt_pos].salt_buf[21];
3717 salt_buf1[ 6] = esalt_bufs[salt_pos].salt_buf[22];
3718 salt_buf1[ 7] = esalt_bufs[salt_pos].salt_buf[23];
3719 salt_buf1[ 8] = esalt_bufs[salt_pos].salt_buf[24];
3720 salt_buf1[ 9] = esalt_bufs[salt_pos].salt_buf[25];
3721 salt_buf1[10] = esalt_bufs[salt_pos].salt_buf[26];
3722 salt_buf1[11] = esalt_bufs[salt_pos].salt_buf[27];
3723 salt_buf1[12] = esalt_bufs[salt_pos].salt_buf[28];
3724 salt_buf1[13] = esalt_bufs[salt_pos].salt_buf[29];
3732 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
3736 esalt_buf0[ 0] = esalt_bufs[salt_pos].esalt_buf[ 0];
3737 esalt_buf0[ 1] = esalt_bufs[salt_pos].esalt_buf[ 1];
3738 esalt_buf0[ 2] = esalt_bufs[salt_pos].esalt_buf[ 2];
3739 esalt_buf0[ 3] = esalt_bufs[salt_pos].esalt_buf[ 3];
3740 esalt_buf0[ 4] = esalt_bufs[salt_pos].esalt_buf[ 4];
3741 esalt_buf0[ 5] = esalt_bufs[salt_pos].esalt_buf[ 5];
3742 esalt_buf0[ 6] = esalt_bufs[salt_pos].esalt_buf[ 6];
3743 esalt_buf0[ 7] = esalt_bufs[salt_pos].esalt_buf[ 7];
3744 esalt_buf0[ 8] = esalt_bufs[salt_pos].esalt_buf[ 8];
3745 esalt_buf0[ 9] = esalt_bufs[salt_pos].esalt_buf[ 9];
3746 esalt_buf0[10] = esalt_bufs[salt_pos].esalt_buf[10];
3747 esalt_buf0[11] = esalt_bufs[salt_pos].esalt_buf[11];
3748 esalt_buf0[12] = esalt_bufs[salt_pos].esalt_buf[12];
3749 esalt_buf0[13] = esalt_bufs[salt_pos].esalt_buf[13];
3750 esalt_buf0[14] = esalt_bufs[salt_pos].esalt_buf[14];
3751 esalt_buf0[15] = esalt_bufs[salt_pos].esalt_buf[15];
3755 esalt_buf1[ 0] = esalt_bufs[salt_pos].esalt_buf[16];
3756 esalt_buf1[ 1] = esalt_bufs[salt_pos].esalt_buf[17];
3757 esalt_buf1[ 2] = esalt_bufs[salt_pos].esalt_buf[18];
3758 esalt_buf1[ 3] = esalt_bufs[salt_pos].esalt_buf[19];
3759 esalt_buf1[ 4] = esalt_bufs[salt_pos].esalt_buf[20];
3760 esalt_buf1[ 5] = esalt_bufs[salt_pos].esalt_buf[21];
3761 esalt_buf1[ 6] = esalt_bufs[salt_pos].esalt_buf[22];
3762 esalt_buf1[ 7] = esalt_bufs[salt_pos].esalt_buf[23];
3763 esalt_buf1[ 8] = esalt_bufs[salt_pos].esalt_buf[24];
3764 esalt_buf1[ 9] = esalt_bufs[salt_pos].esalt_buf[25];
3765 esalt_buf1[10] = esalt_bufs[salt_pos].esalt_buf[26];
3766 esalt_buf1[11] = esalt_bufs[salt_pos].esalt_buf[27];
3767 esalt_buf1[12] = esalt_bufs[salt_pos].esalt_buf[28];
3768 esalt_buf1[13] = esalt_bufs[salt_pos].esalt_buf[29];
3769 esalt_buf1[14] = esalt_bufs[salt_pos].esalt_buf[30];
3770 esalt_buf1[15] = esalt_bufs[salt_pos].esalt_buf[31];
3774 esalt_buf2[ 0] = esalt_bufs[salt_pos].esalt_buf[32];
3775 esalt_buf2[ 1] = esalt_bufs[salt_pos].esalt_buf[33];
3776 esalt_buf2[ 2] = esalt_bufs[salt_pos].esalt_buf[34];
3777 esalt_buf2[ 3] = esalt_bufs[salt_pos].esalt_buf[35];
3778 esalt_buf2[ 4] = esalt_bufs[salt_pos].esalt_buf[36];
3779 esalt_buf2[ 5] = esalt_bufs[salt_pos].esalt_buf[37];
3791 const u32 digest_esalt_len = 32 + esalt_len;
3799 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
3801 const u32 w0r = c_bfs[il_pos].i;
3806 * HA1 = md5 ($salt . $pass)
3809 // append the pass to the salt
3813 block0[ 0] = salt_buf0[ 0];
3814 block0[ 1] = salt_buf0[ 1];
3815 block0[ 2] = salt_buf0[ 2];
3816 block0[ 3] = salt_buf0[ 3];
3817 block0[ 4] = salt_buf0[ 4];
3818 block0[ 5] = salt_buf0[ 5];
3819 block0[ 6] = salt_buf0[ 6];
3820 block0[ 7] = salt_buf0[ 7];
3821 block0[ 8] = salt_buf0[ 8];
3822 block0[ 9] = salt_buf0[ 9];
3823 block0[10] = salt_buf0[10];
3824 block0[11] = salt_buf0[11];
3825 block0[12] = salt_buf0[12];
3826 block0[13] = salt_buf0[13];
3827 block0[14] = salt_buf0[14];
3828 block0[15] = salt_buf0[15];
3832 block1[ 0] = salt_buf1[ 0];
3833 block1[ 1] = salt_buf1[ 1];
3834 block1[ 2] = salt_buf1[ 2];
3835 block1[ 3] = salt_buf1[ 3];
3836 block1[ 4] = salt_buf1[ 4];
3837 block1[ 5] = salt_buf1[ 5];
3838 block1[ 6] = salt_buf1[ 6];
3839 block1[ 7] = salt_buf1[ 7];
3840 block1[ 8] = salt_buf1[ 8];
3841 block1[ 9] = salt_buf1[ 9];
3842 block1[10] = salt_buf1[10];
3843 block1[11] = salt_buf1[11];
3844 block1[12] = salt_buf1[12];
3845 block1[13] = salt_buf1[13];
3846 block1[14] = salt_buf1[14];
3847 block1[15] = salt_buf1[15];
3849 memcat32 (block0, block1, salt_len, w0, w1, w2, w3, pw_len);
3853 w0_t[0] = block0[ 0];
3854 w0_t[1] = block0[ 1];
3855 w0_t[2] = block0[ 2];
3856 w0_t[3] = block0[ 3];
3860 w1_t[0] = block0[ 4];
3861 w1_t[1] = block0[ 5];
3862 w1_t[2] = block0[ 6];
3863 w1_t[3] = block0[ 7];
3867 w2_t[0] = block0[ 8];
3868 w2_t[1] = block0[ 9];
3869 w2_t[2] = block0[10];
3870 w2_t[3] = block0[11];
3874 w3_t[0] = block0[12];
3875 w3_t[1] = block0[13];
3876 w3_t[2] = pw_salt_len * 8;
3888 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
3889 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
3890 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
3891 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
3892 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
3893 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
3894 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
3895 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
3896 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
3897 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
3898 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
3899 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
3900 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
3901 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
3902 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
3903 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
3905 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
3906 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
3907 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
3908 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
3909 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
3910 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
3911 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
3912 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
3913 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
3914 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
3915 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
3916 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
3917 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
3918 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
3919 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
3920 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
3922 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
3923 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
3924 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
3925 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
3926 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
3927 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
3928 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
3929 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
3930 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
3931 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
3932 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
3933 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
3934 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
3935 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
3936 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
3937 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
3939 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
3940 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
3941 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
3942 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
3943 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
3944 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
3945 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
3946 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
3947 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
3948 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
3949 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
3950 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
3951 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
3952 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
3953 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
3954 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
3962 * final = md5 ($HA1 . $esalt)
3963 * we have at least 2 MD5 blocks/transformations, but we might need 3
3966 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
3967 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
3968 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
3969 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
3970 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
3971 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
3972 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
3973 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
3974 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
3975 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
3976 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
3977 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
3978 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
3979 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
3980 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
3981 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
3983 w2_t[0] = esalt_buf0[0];
3984 w2_t[1] = esalt_buf0[1];
3985 w2_t[2] = esalt_buf0[2];
3986 w2_t[3] = esalt_buf0[3];
3988 w3_t[0] = esalt_buf0[4];
3989 w3_t[1] = esalt_buf0[5];
3990 w3_t[2] = esalt_buf0[6];
3991 w3_t[3] = esalt_buf0[7];
4001 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
4002 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
4003 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
4004 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
4005 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
4006 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
4007 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
4008 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
4009 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
4010 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
4011 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
4012 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
4013 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
4014 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
4015 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
4016 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
4018 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
4019 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
4020 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
4021 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
4022 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
4023 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
4024 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
4025 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
4026 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
4027 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
4028 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
4029 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
4030 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
4031 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
4032 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
4033 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
4035 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
4036 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
4037 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
4038 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
4039 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
4040 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
4041 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
4042 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
4043 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
4044 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
4045 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
4046 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
4047 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
4048 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
4049 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
4050 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
4052 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
4053 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
4054 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
4055 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
4056 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
4057 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
4058 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
4059 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
4060 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
4061 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
4062 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
4063 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
4064 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
4065 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
4066 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
4067 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
4081 w0_t[0] = esalt_buf0[ 8];
4082 w0_t[1] = esalt_buf0[ 9];
4083 w0_t[2] = esalt_buf0[10];
4084 w0_t[3] = esalt_buf0[11];
4086 w1_t[0] = esalt_buf0[12];
4087 w1_t[1] = esalt_buf0[13];
4088 w1_t[2] = esalt_buf0[14];
4089 w1_t[3] = esalt_buf0[15];
4091 w2_t[0] = esalt_buf1[ 0];
4092 w2_t[1] = esalt_buf1[ 1];
4093 w2_t[2] = esalt_buf1[ 2];
4094 w2_t[3] = esalt_buf1[ 3];
4096 w3_t[0] = esalt_buf1[ 4];
4097 w3_t[1] = esalt_buf1[ 5];
4098 w3_t[2] = esalt_buf1[ 6];
4099 w3_t[3] = esalt_buf1[ 7];
4101 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
4102 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
4103 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
4104 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
4105 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
4106 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
4107 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
4108 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
4109 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
4110 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
4111 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
4112 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
4113 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
4114 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
4115 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
4116 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
4118 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
4119 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
4120 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
4121 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
4122 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
4123 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
4124 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
4125 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
4126 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
4127 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
4128 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
4129 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
4130 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
4131 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
4132 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
4133 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
4135 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
4136 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
4137 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
4138 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
4139 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
4140 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
4141 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
4142 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
4143 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
4144 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
4145 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
4146 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
4147 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
4148 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
4149 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
4150 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
4152 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
4153 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
4154 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
4155 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
4156 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
4157 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
4158 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
4159 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
4160 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
4161 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
4162 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
4163 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
4164 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
4165 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
4166 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
4167 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
4169 // this is for sure the final block
4181 w0_t[0] = esalt_buf1[ 8];
4182 w0_t[1] = esalt_buf1[ 9];
4183 w0_t[2] = esalt_buf1[10];
4184 w0_t[3] = esalt_buf1[11];
4186 w1_t[0] = esalt_buf1[12];
4187 w1_t[1] = esalt_buf1[13];
4188 w1_t[2] = esalt_buf1[14];
4189 w1_t[3] = esalt_buf1[15];
4191 w2_t[0] = esalt_buf2[ 0];
4192 w2_t[1] = esalt_buf2[ 1];
4193 w2_t[2] = esalt_buf2[ 2];
4194 w2_t[3] = esalt_buf2[ 3];
4196 w3_t[0] = esalt_buf2[ 4];
4197 w3_t[1] = esalt_buf2[ 5];
4198 w3_t[2] = digest_esalt_len * 8;
4201 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
4202 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
4203 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
4204 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
4205 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
4206 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
4207 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
4208 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
4209 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
4210 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
4211 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
4212 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
4213 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
4214 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
4215 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
4216 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
4218 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
4219 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
4220 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
4221 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
4222 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
4223 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
4224 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
4225 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
4226 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
4227 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
4228 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
4229 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
4230 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
4231 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
4232 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
4233 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
4235 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
4236 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
4237 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
4238 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
4239 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
4240 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
4241 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
4242 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
4243 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
4244 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
4245 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
4246 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
4247 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
4248 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
4249 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
4250 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
4252 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
4253 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
4254 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
4255 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
4256 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
4257 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
4258 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
4259 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
4260 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
4261 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
4262 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
4263 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
4264 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
4265 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
4266 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
4267 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
4279 #include VECT_COMPARE_S
4283 __device__ static void m11400s_1_0 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, 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 sip_t *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)
4289 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
4290 const u32 lid = threadIdx.x;
4296 const u32 search[4] =
4298 digests_buf[digests_offset].digest_buf[DGST_R0],
4299 digests_buf[digests_offset].digest_buf[DGST_R1],
4300 digests_buf[digests_offset].digest_buf[DGST_R2],
4301 digests_buf[digests_offset].digest_buf[DGST_R3]
4308 const u32 salt_len = esalt_bufs[salt_pos].salt_len; // not a bug, we need to get it from the esalt
4310 const u32 pw_salt_len = salt_len + pw_len;
4314 salt_buf0[ 0] = esalt_bufs[salt_pos].salt_buf[ 0];
4315 salt_buf0[ 1] = esalt_bufs[salt_pos].salt_buf[ 1];
4316 salt_buf0[ 2] = esalt_bufs[salt_pos].salt_buf[ 2];
4317 salt_buf0[ 3] = esalt_bufs[salt_pos].salt_buf[ 3];
4318 salt_buf0[ 4] = esalt_bufs[salt_pos].salt_buf[ 4];
4319 salt_buf0[ 5] = esalt_bufs[salt_pos].salt_buf[ 5];
4320 salt_buf0[ 6] = esalt_bufs[salt_pos].salt_buf[ 6];
4321 salt_buf0[ 7] = esalt_bufs[salt_pos].salt_buf[ 7];
4322 salt_buf0[ 8] = esalt_bufs[salt_pos].salt_buf[ 8];
4323 salt_buf0[ 9] = esalt_bufs[salt_pos].salt_buf[ 9];
4324 salt_buf0[10] = esalt_bufs[salt_pos].salt_buf[10];
4325 salt_buf0[11] = esalt_bufs[salt_pos].salt_buf[11];
4326 salt_buf0[12] = esalt_bufs[salt_pos].salt_buf[12];
4327 salt_buf0[13] = esalt_bufs[salt_pos].salt_buf[13];
4328 salt_buf0[14] = esalt_bufs[salt_pos].salt_buf[14];
4329 salt_buf0[15] = esalt_bufs[salt_pos].salt_buf[15];
4333 salt_buf1[ 0] = esalt_bufs[salt_pos].salt_buf[16];
4334 salt_buf1[ 1] = esalt_bufs[salt_pos].salt_buf[17];
4335 salt_buf1[ 2] = esalt_bufs[salt_pos].salt_buf[18];
4336 salt_buf1[ 3] = esalt_bufs[salt_pos].salt_buf[19];
4337 salt_buf1[ 4] = esalt_bufs[salt_pos].salt_buf[20];
4338 salt_buf1[ 5] = esalt_bufs[salt_pos].salt_buf[21];
4339 salt_buf1[ 6] = esalt_bufs[salt_pos].salt_buf[22];
4340 salt_buf1[ 7] = esalt_bufs[salt_pos].salt_buf[23];
4341 salt_buf1[ 8] = esalt_bufs[salt_pos].salt_buf[24];
4342 salt_buf1[ 9] = esalt_bufs[salt_pos].salt_buf[25];
4343 salt_buf1[10] = esalt_bufs[salt_pos].salt_buf[26];
4344 salt_buf1[11] = esalt_bufs[salt_pos].salt_buf[27];
4345 salt_buf1[12] = esalt_bufs[salt_pos].salt_buf[28];
4346 salt_buf1[13] = esalt_bufs[salt_pos].salt_buf[29];
4354 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
4358 esalt_buf0[ 0] = esalt_bufs[salt_pos].esalt_buf[ 0];
4359 esalt_buf0[ 1] = esalt_bufs[salt_pos].esalt_buf[ 1];
4360 esalt_buf0[ 2] = esalt_bufs[salt_pos].esalt_buf[ 2];
4361 esalt_buf0[ 3] = esalt_bufs[salt_pos].esalt_buf[ 3];
4362 esalt_buf0[ 4] = esalt_bufs[salt_pos].esalt_buf[ 4];
4363 esalt_buf0[ 5] = esalt_bufs[salt_pos].esalt_buf[ 5];
4364 esalt_buf0[ 6] = esalt_bufs[salt_pos].esalt_buf[ 6];
4365 esalt_buf0[ 7] = esalt_bufs[salt_pos].esalt_buf[ 7];
4366 esalt_buf0[ 8] = esalt_bufs[salt_pos].esalt_buf[ 8];
4367 esalt_buf0[ 9] = esalt_bufs[salt_pos].esalt_buf[ 9];
4368 esalt_buf0[10] = esalt_bufs[salt_pos].esalt_buf[10];
4369 esalt_buf0[11] = esalt_bufs[salt_pos].esalt_buf[11];
4370 esalt_buf0[12] = esalt_bufs[salt_pos].esalt_buf[12];
4371 esalt_buf0[13] = esalt_bufs[salt_pos].esalt_buf[13];
4372 esalt_buf0[14] = esalt_bufs[salt_pos].esalt_buf[14];
4373 esalt_buf0[15] = esalt_bufs[salt_pos].esalt_buf[15];
4377 esalt_buf1[ 0] = esalt_bufs[salt_pos].esalt_buf[16];
4378 esalt_buf1[ 1] = esalt_bufs[salt_pos].esalt_buf[17];
4379 esalt_buf1[ 2] = esalt_bufs[salt_pos].esalt_buf[18];
4380 esalt_buf1[ 3] = esalt_bufs[salt_pos].esalt_buf[19];
4381 esalt_buf1[ 4] = esalt_bufs[salt_pos].esalt_buf[20];
4382 esalt_buf1[ 5] = esalt_bufs[salt_pos].esalt_buf[21];
4383 esalt_buf1[ 6] = esalt_bufs[salt_pos].esalt_buf[22];
4384 esalt_buf1[ 7] = esalt_bufs[salt_pos].esalt_buf[23];
4385 esalt_buf1[ 8] = esalt_bufs[salt_pos].esalt_buf[24];
4386 esalt_buf1[ 9] = esalt_bufs[salt_pos].esalt_buf[25];
4387 esalt_buf1[10] = esalt_bufs[salt_pos].esalt_buf[26];
4388 esalt_buf1[11] = esalt_bufs[salt_pos].esalt_buf[27];
4389 esalt_buf1[12] = esalt_bufs[salt_pos].esalt_buf[28];
4390 esalt_buf1[13] = esalt_bufs[salt_pos].esalt_buf[29];
4391 esalt_buf1[14] = esalt_bufs[salt_pos].esalt_buf[30];
4392 esalt_buf1[15] = esalt_bufs[salt_pos].esalt_buf[31];
4394 const u32 digest_esalt_len = 32 + esalt_len;
4402 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
4404 const u32 w0r = c_bfs[il_pos].i;
4409 * HA1 = md5 ($salt . $pass)
4412 // append the pass to the salt
4416 block0[ 0] = salt_buf0[ 0];
4417 block0[ 1] = salt_buf0[ 1];
4418 block0[ 2] = salt_buf0[ 2];
4419 block0[ 3] = salt_buf0[ 3];
4420 block0[ 4] = salt_buf0[ 4];
4421 block0[ 5] = salt_buf0[ 5];
4422 block0[ 6] = salt_buf0[ 6];
4423 block0[ 7] = salt_buf0[ 7];
4424 block0[ 8] = salt_buf0[ 8];
4425 block0[ 9] = salt_buf0[ 9];
4426 block0[10] = salt_buf0[10];
4427 block0[11] = salt_buf0[11];
4428 block0[12] = salt_buf0[12];
4429 block0[13] = salt_buf0[13];
4430 block0[14] = salt_buf0[14];
4431 block0[15] = salt_buf0[15];
4435 block1[ 0] = salt_buf1[ 0];
4436 block1[ 1] = salt_buf1[ 1];
4437 block1[ 2] = salt_buf1[ 2];
4438 block1[ 3] = salt_buf1[ 3];
4439 block1[ 4] = salt_buf1[ 4];
4440 block1[ 5] = salt_buf1[ 5];
4441 block1[ 6] = salt_buf1[ 6];
4442 block1[ 7] = salt_buf1[ 7];
4443 block1[ 8] = salt_buf1[ 8];
4444 block1[ 9] = salt_buf1[ 9];
4445 block1[10] = salt_buf1[10];
4446 block1[11] = salt_buf1[11];
4447 block1[12] = salt_buf1[12];
4448 block1[13] = salt_buf1[13];
4449 block1[14] = salt_buf1[14];
4450 block1[15] = salt_buf1[15];
4452 memcat32 (block0, block1, salt_len, w0, w1, w2, w3, pw_len);
4456 w0_t[0] = block0[ 0];
4457 w0_t[1] = block0[ 1];
4458 w0_t[2] = block0[ 2];
4459 w0_t[3] = block0[ 3];
4463 w1_t[0] = block0[ 4];
4464 w1_t[1] = block0[ 5];
4465 w1_t[2] = block0[ 6];
4466 w1_t[3] = block0[ 7];
4470 w2_t[0] = block0[ 8];
4471 w2_t[1] = block0[ 9];
4472 w2_t[2] = block0[10];
4473 w2_t[3] = block0[11];
4477 w3_t[0] = block0[12];
4478 w3_t[1] = block0[13];
4479 w3_t[2] = block0[14];
4480 w3_t[3] = block0[15];
4491 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
4492 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
4493 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
4494 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
4495 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
4496 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
4497 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
4498 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
4499 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
4500 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
4501 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
4502 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
4503 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
4504 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
4505 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
4506 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
4508 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
4509 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
4510 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
4511 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
4512 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
4513 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
4514 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
4515 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
4516 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
4517 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
4518 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
4519 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
4520 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
4521 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
4522 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
4523 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
4525 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
4526 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
4527 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
4528 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
4529 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
4530 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
4531 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
4532 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
4533 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
4534 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
4535 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
4536 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
4537 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
4538 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
4539 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
4540 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
4542 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
4543 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
4544 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
4545 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
4546 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
4547 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
4548 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
4549 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
4550 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
4551 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
4552 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
4553 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
4554 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
4555 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
4556 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
4557 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
4569 w0_t[0] = block1[ 0];
4570 w0_t[1] = block1[ 1];
4571 w0_t[2] = block1[ 2];
4572 w0_t[3] = block1[ 3];
4574 w1_t[0] = block1[ 4];
4575 w1_t[1] = block1[ 5];
4576 w1_t[2] = block1[ 6];
4577 w1_t[3] = block1[ 7];
4579 w2_t[0] = block1[ 8];
4580 w2_t[1] = block1[ 9];
4581 w2_t[2] = block1[10];
4582 w2_t[3] = block1[11];
4584 w3_t[0] = block1[12];
4585 w3_t[1] = block1[13];
4586 w3_t[2] = pw_salt_len * 8;
4589 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
4590 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
4591 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
4592 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
4593 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
4594 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
4595 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
4596 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
4597 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
4598 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
4599 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
4600 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
4601 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
4602 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
4603 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
4604 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
4606 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
4607 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
4608 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
4609 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
4610 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
4611 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
4612 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
4613 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
4614 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
4615 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
4616 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
4617 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
4618 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
4619 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
4620 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
4621 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
4623 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
4624 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
4625 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
4626 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
4627 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
4628 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
4629 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
4630 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
4631 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
4632 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
4633 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
4634 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
4635 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
4636 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
4637 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
4638 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
4640 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
4641 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
4642 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
4643 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
4644 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
4645 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
4646 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
4647 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
4648 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
4649 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
4650 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
4651 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
4652 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
4653 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
4654 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
4655 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
4663 * final = md5 ($HA1 . $esalt)
4664 * we have at least 2 MD5 blocks/transformations, but we might need 3
4667 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
4668 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
4669 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
4670 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
4671 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
4672 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
4673 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
4674 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
4675 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
4676 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
4677 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
4678 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
4679 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
4680 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
4681 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
4682 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
4684 w2_t[0] = esalt_buf0[0];
4685 w2_t[1] = esalt_buf0[1];
4686 w2_t[2] = esalt_buf0[2];
4687 w2_t[3] = esalt_buf0[3];
4689 w3_t[0] = esalt_buf0[4];
4690 w3_t[1] = esalt_buf0[5];
4691 w3_t[2] = esalt_buf0[6];
4692 w3_t[3] = esalt_buf0[7];
4702 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
4703 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
4704 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
4705 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
4706 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
4707 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
4708 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
4709 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
4710 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
4711 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
4712 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
4713 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
4714 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
4715 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
4716 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
4717 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
4719 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
4720 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
4721 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
4722 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
4723 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
4724 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
4725 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
4726 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
4727 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
4728 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
4729 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
4730 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
4731 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
4732 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
4733 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
4734 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
4736 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
4737 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
4738 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
4739 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
4740 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
4741 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
4742 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
4743 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
4744 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
4745 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
4746 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
4747 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
4748 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
4749 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
4750 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
4751 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
4753 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
4754 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
4755 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
4756 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
4757 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
4758 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
4759 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
4760 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
4761 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
4762 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
4763 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
4764 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
4765 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
4766 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
4767 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
4768 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
4782 w0_t[0] = esalt_buf0[ 8];
4783 w0_t[1] = esalt_buf0[ 9];
4784 w0_t[2] = esalt_buf0[10];
4785 w0_t[3] = esalt_buf0[11];
4787 w1_t[0] = esalt_buf0[12];
4788 w1_t[1] = esalt_buf0[13];
4789 w1_t[2] = esalt_buf0[14];
4790 w1_t[3] = esalt_buf0[15];
4792 w2_t[0] = esalt_buf1[ 0];
4793 w2_t[1] = esalt_buf1[ 1];
4794 w2_t[2] = esalt_buf1[ 2];
4795 w2_t[3] = esalt_buf1[ 3];
4797 w3_t[0] = esalt_buf1[ 4];
4798 w3_t[1] = esalt_buf1[ 5];
4799 w3_t[2] = digest_esalt_len * 8;
4802 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
4803 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
4804 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
4805 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
4806 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
4807 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
4808 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
4809 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
4810 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
4811 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
4812 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
4813 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
4814 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
4815 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
4816 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
4817 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
4819 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
4820 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
4821 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
4822 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
4823 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
4824 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
4825 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
4826 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
4827 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
4828 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
4829 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
4830 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
4831 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
4832 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
4833 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
4834 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
4836 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
4837 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
4838 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
4839 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
4840 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
4841 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
4842 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
4843 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
4844 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
4845 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
4846 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
4847 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
4848 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
4849 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
4850 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
4851 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
4853 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
4854 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
4855 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
4856 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
4857 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
4858 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
4859 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
4860 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
4861 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
4862 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
4863 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
4864 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
4865 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
4866 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
4867 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
4868 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
4880 #include VECT_COMPARE_S
4884 __device__ static void m11400s_1_1 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, 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 sip_t *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)
4890 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
4891 const u32 lid = threadIdx.x;
4897 const u32 search[4] =
4899 digests_buf[digests_offset].digest_buf[DGST_R0],
4900 digests_buf[digests_offset].digest_buf[DGST_R1],
4901 digests_buf[digests_offset].digest_buf[DGST_R2],
4902 digests_buf[digests_offset].digest_buf[DGST_R3]
4909 const u32 salt_len = esalt_bufs[salt_pos].salt_len; // not a bug, we need to get it from the esalt
4911 const u32 pw_salt_len = salt_len + pw_len;
4915 salt_buf0[ 0] = esalt_bufs[salt_pos].salt_buf[ 0];
4916 salt_buf0[ 1] = esalt_bufs[salt_pos].salt_buf[ 1];
4917 salt_buf0[ 2] = esalt_bufs[salt_pos].salt_buf[ 2];
4918 salt_buf0[ 3] = esalt_bufs[salt_pos].salt_buf[ 3];
4919 salt_buf0[ 4] = esalt_bufs[salt_pos].salt_buf[ 4];
4920 salt_buf0[ 5] = esalt_bufs[salt_pos].salt_buf[ 5];
4921 salt_buf0[ 6] = esalt_bufs[salt_pos].salt_buf[ 6];
4922 salt_buf0[ 7] = esalt_bufs[salt_pos].salt_buf[ 7];
4923 salt_buf0[ 8] = esalt_bufs[salt_pos].salt_buf[ 8];
4924 salt_buf0[ 9] = esalt_bufs[salt_pos].salt_buf[ 9];
4925 salt_buf0[10] = esalt_bufs[salt_pos].salt_buf[10];
4926 salt_buf0[11] = esalt_bufs[salt_pos].salt_buf[11];
4927 salt_buf0[12] = esalt_bufs[salt_pos].salt_buf[12];
4928 salt_buf0[13] = esalt_bufs[salt_pos].salt_buf[13];
4929 salt_buf0[14] = esalt_bufs[salt_pos].salt_buf[14];
4930 salt_buf0[15] = esalt_bufs[salt_pos].salt_buf[15];
4934 salt_buf1[ 0] = esalt_bufs[salt_pos].salt_buf[16];
4935 salt_buf1[ 1] = esalt_bufs[salt_pos].salt_buf[17];
4936 salt_buf1[ 2] = esalt_bufs[salt_pos].salt_buf[18];
4937 salt_buf1[ 3] = esalt_bufs[salt_pos].salt_buf[19];
4938 salt_buf1[ 4] = esalt_bufs[salt_pos].salt_buf[20];
4939 salt_buf1[ 5] = esalt_bufs[salt_pos].salt_buf[21];
4940 salt_buf1[ 6] = esalt_bufs[salt_pos].salt_buf[22];
4941 salt_buf1[ 7] = esalt_bufs[salt_pos].salt_buf[23];
4942 salt_buf1[ 8] = esalt_bufs[salt_pos].salt_buf[24];
4943 salt_buf1[ 9] = esalt_bufs[salt_pos].salt_buf[25];
4944 salt_buf1[10] = esalt_bufs[salt_pos].salt_buf[26];
4945 salt_buf1[11] = esalt_bufs[salt_pos].salt_buf[27];
4946 salt_buf1[12] = esalt_bufs[salt_pos].salt_buf[28];
4947 salt_buf1[13] = esalt_bufs[salt_pos].salt_buf[29];
4955 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
4959 esalt_buf0[ 0] = esalt_bufs[salt_pos].esalt_buf[ 0];
4960 esalt_buf0[ 1] = esalt_bufs[salt_pos].esalt_buf[ 1];
4961 esalt_buf0[ 2] = esalt_bufs[salt_pos].esalt_buf[ 2];
4962 esalt_buf0[ 3] = esalt_bufs[salt_pos].esalt_buf[ 3];
4963 esalt_buf0[ 4] = esalt_bufs[salt_pos].esalt_buf[ 4];
4964 esalt_buf0[ 5] = esalt_bufs[salt_pos].esalt_buf[ 5];
4965 esalt_buf0[ 6] = esalt_bufs[salt_pos].esalt_buf[ 6];
4966 esalt_buf0[ 7] = esalt_bufs[salt_pos].esalt_buf[ 7];
4967 esalt_buf0[ 8] = esalt_bufs[salt_pos].esalt_buf[ 8];
4968 esalt_buf0[ 9] = esalt_bufs[salt_pos].esalt_buf[ 9];
4969 esalt_buf0[10] = esalt_bufs[salt_pos].esalt_buf[10];
4970 esalt_buf0[11] = esalt_bufs[salt_pos].esalt_buf[11];
4971 esalt_buf0[12] = esalt_bufs[salt_pos].esalt_buf[12];
4972 esalt_buf0[13] = esalt_bufs[salt_pos].esalt_buf[13];
4973 esalt_buf0[14] = esalt_bufs[salt_pos].esalt_buf[14];
4974 esalt_buf0[15] = esalt_bufs[salt_pos].esalt_buf[15];
4978 esalt_buf1[ 0] = esalt_bufs[salt_pos].esalt_buf[16];
4979 esalt_buf1[ 1] = esalt_bufs[salt_pos].esalt_buf[17];
4980 esalt_buf1[ 2] = esalt_bufs[salt_pos].esalt_buf[18];
4981 esalt_buf1[ 3] = esalt_bufs[salt_pos].esalt_buf[19];
4982 esalt_buf1[ 4] = esalt_bufs[salt_pos].esalt_buf[20];
4983 esalt_buf1[ 5] = esalt_bufs[salt_pos].esalt_buf[21];
4984 esalt_buf1[ 6] = esalt_bufs[salt_pos].esalt_buf[22];
4985 esalt_buf1[ 7] = esalt_bufs[salt_pos].esalt_buf[23];
4986 esalt_buf1[ 8] = esalt_bufs[salt_pos].esalt_buf[24];
4987 esalt_buf1[ 9] = esalt_bufs[salt_pos].esalt_buf[25];
4988 esalt_buf1[10] = esalt_bufs[salt_pos].esalt_buf[26];
4989 esalt_buf1[11] = esalt_bufs[salt_pos].esalt_buf[27];
4990 esalt_buf1[12] = esalt_bufs[salt_pos].esalt_buf[28];
4991 esalt_buf1[13] = esalt_bufs[salt_pos].esalt_buf[29];
4992 esalt_buf1[14] = esalt_bufs[salt_pos].esalt_buf[30];
4993 esalt_buf1[15] = esalt_bufs[salt_pos].esalt_buf[31];
4997 esalt_buf2[ 0] = esalt_bufs[salt_pos].esalt_buf[32];
4998 esalt_buf2[ 1] = esalt_bufs[salt_pos].esalt_buf[33];
4999 esalt_buf2[ 2] = esalt_bufs[salt_pos].esalt_buf[34];
5000 esalt_buf2[ 3] = esalt_bufs[salt_pos].esalt_buf[35];
5001 esalt_buf2[ 4] = esalt_bufs[salt_pos].esalt_buf[36];
5002 esalt_buf2[ 5] = esalt_bufs[salt_pos].esalt_buf[37];
5014 const u32 digest_esalt_len = 32 + esalt_len;
5022 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
5024 const u32 w0r = c_bfs[il_pos].i;
5029 * HA1 = md5 ($salt . $pass)
5032 // append the pass to the salt
5036 block0[ 0] = salt_buf0[ 0];
5037 block0[ 1] = salt_buf0[ 1];
5038 block0[ 2] = salt_buf0[ 2];
5039 block0[ 3] = salt_buf0[ 3];
5040 block0[ 4] = salt_buf0[ 4];
5041 block0[ 5] = salt_buf0[ 5];
5042 block0[ 6] = salt_buf0[ 6];
5043 block0[ 7] = salt_buf0[ 7];
5044 block0[ 8] = salt_buf0[ 8];
5045 block0[ 9] = salt_buf0[ 9];
5046 block0[10] = salt_buf0[10];
5047 block0[11] = salt_buf0[11];
5048 block0[12] = salt_buf0[12];
5049 block0[13] = salt_buf0[13];
5050 block0[14] = salt_buf0[14];
5051 block0[15] = salt_buf0[15];
5055 block1[ 0] = salt_buf1[ 0];
5056 block1[ 1] = salt_buf1[ 1];
5057 block1[ 2] = salt_buf1[ 2];
5058 block1[ 3] = salt_buf1[ 3];
5059 block1[ 4] = salt_buf1[ 4];
5060 block1[ 5] = salt_buf1[ 5];
5061 block1[ 6] = salt_buf1[ 6];
5062 block1[ 7] = salt_buf1[ 7];
5063 block1[ 8] = salt_buf1[ 8];
5064 block1[ 9] = salt_buf1[ 9];
5065 block1[10] = salt_buf1[10];
5066 block1[11] = salt_buf1[11];
5067 block1[12] = salt_buf1[12];
5068 block1[13] = salt_buf1[13];
5069 block1[14] = salt_buf1[14];
5070 block1[15] = salt_buf1[15];
5072 memcat32 (block0, block1, salt_len, w0, w1, w2, w3, pw_len);
5076 w0_t[0] = block0[ 0];
5077 w0_t[1] = block0[ 1];
5078 w0_t[2] = block0[ 2];
5079 w0_t[3] = block0[ 3];
5083 w1_t[0] = block0[ 4];
5084 w1_t[1] = block0[ 5];
5085 w1_t[2] = block0[ 6];
5086 w1_t[3] = block0[ 7];
5090 w2_t[0] = block0[ 8];
5091 w2_t[1] = block0[ 9];
5092 w2_t[2] = block0[10];
5093 w2_t[3] = block0[11];
5097 w3_t[0] = block0[12];
5098 w3_t[1] = block0[13];
5099 w3_t[2] = block0[14];
5100 w3_t[3] = block0[15];
5111 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
5112 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
5113 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
5114 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
5115 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
5116 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
5117 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
5118 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
5119 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
5120 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
5121 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
5122 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
5123 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
5124 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
5125 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
5126 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
5128 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
5129 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
5130 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
5131 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
5132 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
5133 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
5134 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
5135 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
5136 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
5137 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
5138 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
5139 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
5140 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
5141 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
5142 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
5143 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
5145 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
5146 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
5147 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
5148 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
5149 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
5150 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
5151 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
5152 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
5153 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
5154 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
5155 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
5156 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
5157 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
5158 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
5159 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
5160 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
5162 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
5163 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
5164 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
5165 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
5166 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
5167 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
5168 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
5169 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
5170 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
5171 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
5172 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
5173 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
5174 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
5175 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
5176 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
5177 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
5189 w0_t[0] = block1[ 0];
5190 w0_t[1] = block1[ 1];
5191 w0_t[2] = block1[ 2];
5192 w0_t[3] = block1[ 3];
5194 w1_t[0] = block1[ 4];
5195 w1_t[1] = block1[ 5];
5196 w1_t[2] = block1[ 6];
5197 w1_t[3] = block1[ 7];
5199 w2_t[0] = block1[ 8];
5200 w2_t[1] = block1[ 9];
5201 w2_t[2] = block1[10];
5202 w2_t[3] = block1[11];
5204 w3_t[0] = block1[12];
5205 w3_t[1] = block1[13];
5206 w3_t[2] = pw_salt_len * 8;
5209 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
5210 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
5211 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
5212 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
5213 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
5214 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
5215 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
5216 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
5217 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
5218 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
5219 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
5220 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
5221 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
5222 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
5223 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
5224 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
5226 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
5227 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
5228 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
5229 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
5230 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
5231 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
5232 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
5233 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
5234 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
5235 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
5236 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
5237 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
5238 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
5239 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
5240 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
5241 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
5243 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
5244 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
5245 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
5246 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
5247 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
5248 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
5249 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
5250 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
5251 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
5252 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
5253 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
5254 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
5255 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
5256 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
5257 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
5258 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
5260 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
5261 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
5262 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
5263 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
5264 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
5265 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
5266 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
5267 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
5268 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
5269 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
5270 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
5271 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
5272 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
5273 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
5274 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
5275 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
5283 * final = md5 ($HA1 . $esalt)
5284 * we have at least 2 MD5 blocks/transformations, but we might need 3
5287 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
5288 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
5289 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
5290 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
5291 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
5292 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
5293 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
5294 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
5295 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
5296 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
5297 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
5298 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
5299 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
5300 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
5301 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
5302 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
5304 w2_t[0] = esalt_buf0[0];
5305 w2_t[1] = esalt_buf0[1];
5306 w2_t[2] = esalt_buf0[2];
5307 w2_t[3] = esalt_buf0[3];
5309 w3_t[0] = esalt_buf0[4];
5310 w3_t[1] = esalt_buf0[5];
5311 w3_t[2] = esalt_buf0[6];
5312 w3_t[3] = esalt_buf0[7];
5322 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
5323 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
5324 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
5325 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
5326 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
5327 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
5328 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
5329 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
5330 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
5331 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
5332 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
5333 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
5334 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
5335 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
5336 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
5337 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
5339 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
5340 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
5341 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
5342 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
5343 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
5344 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
5345 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
5346 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
5347 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
5348 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
5349 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
5350 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
5351 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
5352 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
5353 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
5354 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
5356 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
5357 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
5358 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
5359 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
5360 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
5361 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
5362 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
5363 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
5364 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
5365 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
5366 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
5367 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
5368 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
5369 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
5370 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
5371 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
5373 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
5374 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
5375 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
5376 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
5377 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
5378 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
5379 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
5380 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
5381 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
5382 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
5383 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
5384 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
5385 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
5386 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
5387 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
5388 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
5402 w0_t[0] = esalt_buf0[ 8];
5403 w0_t[1] = esalt_buf0[ 9];
5404 w0_t[2] = esalt_buf0[10];
5405 w0_t[3] = esalt_buf0[11];
5407 w1_t[0] = esalt_buf0[12];
5408 w1_t[1] = esalt_buf0[13];
5409 w1_t[2] = esalt_buf0[14];
5410 w1_t[3] = esalt_buf0[15];
5412 w2_t[0] = esalt_buf1[ 0];
5413 w2_t[1] = esalt_buf1[ 1];
5414 w2_t[2] = esalt_buf1[ 2];
5415 w2_t[3] = esalt_buf1[ 3];
5417 w3_t[0] = esalt_buf1[ 4];
5418 w3_t[1] = esalt_buf1[ 5];
5419 w3_t[2] = esalt_buf1[ 6];
5420 w3_t[3] = esalt_buf1[ 7];
5422 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
5423 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
5424 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
5425 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
5426 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
5427 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
5428 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
5429 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
5430 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
5431 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
5432 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
5433 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
5434 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
5435 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
5436 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
5437 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
5439 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
5440 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
5441 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
5442 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
5443 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
5444 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
5445 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
5446 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
5447 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
5448 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
5449 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
5450 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
5451 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
5452 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
5453 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
5454 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
5456 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
5457 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
5458 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
5459 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
5460 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
5461 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
5462 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
5463 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
5464 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
5465 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
5466 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
5467 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
5468 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
5469 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
5470 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
5471 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
5473 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
5474 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
5475 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
5476 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
5477 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
5478 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
5479 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
5480 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
5481 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
5482 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
5483 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
5484 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
5485 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
5486 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
5487 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
5488 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
5490 // this is for sure the final block
5502 w0_t[0] = esalt_buf1[ 8];
5503 w0_t[1] = esalt_buf1[ 9];
5504 w0_t[2] = esalt_buf1[10];
5505 w0_t[3] = esalt_buf1[11];
5507 w1_t[0] = esalt_buf1[12];
5508 w1_t[1] = esalt_buf1[13];
5509 w1_t[2] = esalt_buf1[14];
5510 w1_t[3] = esalt_buf1[15];
5512 w2_t[0] = esalt_buf2[ 0];
5513 w2_t[1] = esalt_buf2[ 1];
5514 w2_t[2] = esalt_buf2[ 2];
5515 w2_t[3] = esalt_buf2[ 3];
5517 w3_t[0] = esalt_buf2[ 4];
5518 w3_t[1] = esalt_buf2[ 5];
5519 w3_t[2] = digest_esalt_len * 8;
5522 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
5523 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
5524 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
5525 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
5526 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
5527 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
5528 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
5529 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
5530 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
5531 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
5532 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
5533 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
5534 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
5535 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
5536 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
5537 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
5539 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
5540 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
5541 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
5542 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
5543 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
5544 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
5545 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
5546 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
5547 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
5548 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
5549 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
5550 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
5551 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
5552 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
5553 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
5554 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
5556 MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
5557 MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
5558 MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
5559 MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
5560 MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
5561 MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
5562 MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
5563 MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
5564 MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
5565 MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
5566 MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
5567 MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
5568 MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
5569 MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
5570 MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
5571 MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
5573 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
5574 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
5575 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
5576 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
5577 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
5578 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
5579 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
5580 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
5581 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
5582 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
5583 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
5584 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
5585 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
5586 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
5587 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
5588 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
5600 #include VECT_COMPARE_S
5604 extern "C" __global__ void __launch_bounds__ (256, 1) m11400_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 sip_t *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)
5610 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
5616 const u32 lid = threadIdx.x;
5621 w0[0] = pws[gid].i[ 0];
5622 w0[1] = pws[gid].i[ 1];
5623 w0[2] = pws[gid].i[ 2];
5624 w0[3] = pws[gid].i[ 3];
5644 w3[2] = pws[gid].i[14];
5647 const u32 pw_len = pws[gid].pw_len;
5653 l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
5654 | c_bin2asc[(lid >> 4) & 15] << 0;
5658 if (gid >= gid_max) return;
5664 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
5665 const u32 salt_len = esalt_bufs[salt_pos].salt_len;
5667 const u32 sw_1 = ((32 + esalt_len + 1) > 119);
5668 const u32 sw_2 = ((pw_len + salt_len) > 55) << 1;
5670 switch (sw_1 | sw_2)
5673 m11400m_0_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5676 m11400m_0_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5679 m11400m_1_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5682 m11400m_1_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5687 extern "C" __global__ void __launch_bounds__ (256, 1) m11400_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 sip_t *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)
5693 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
5699 const u32 lid = threadIdx.x;
5703 w0[0] = pws[gid].i[ 0];
5704 w0[1] = pws[gid].i[ 1];
5705 w0[2] = pws[gid].i[ 2];
5706 w0[3] = pws[gid].i[ 3];
5710 w1[0] = pws[gid].i[ 4];
5711 w1[1] = pws[gid].i[ 5];
5712 w1[2] = pws[gid].i[ 6];
5713 w1[3] = pws[gid].i[ 7];
5726 w3[2] = pws[gid].i[14];
5729 const u32 pw_len = pws[gid].pw_len;
5735 l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
5736 | c_bin2asc[(lid >> 4) & 15] << 0;
5740 if (gid >= gid_max) return;
5746 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
5747 const u32 salt_len = esalt_bufs[salt_pos].salt_len;
5749 const u32 sw_1 = ((32 + esalt_len + 1) > 119);
5750 const u32 sw_2 = ((pw_len + salt_len) > 55) << 1;
5752 switch (sw_1 | sw_2)
5755 m11400m_0_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5758 m11400m_0_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5761 m11400m_1_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5764 m11400m_1_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5769 extern "C" __global__ void __launch_bounds__ (256, 1) m11400_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 sip_t *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)
5775 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
5781 const u32 lid = threadIdx.x;
5785 w0[0] = pws[gid].i[ 0];
5786 w0[1] = pws[gid].i[ 1];
5787 w0[2] = pws[gid].i[ 2];
5788 w0[3] = pws[gid].i[ 3];
5792 w1[0] = pws[gid].i[ 4];
5793 w1[1] = pws[gid].i[ 5];
5794 w1[2] = pws[gid].i[ 6];
5795 w1[3] = pws[gid].i[ 7];
5799 w2[0] = pws[gid].i[ 8];
5800 w2[1] = pws[gid].i[ 9];
5801 w2[2] = pws[gid].i[10];
5802 w2[3] = pws[gid].i[11];
5806 w3[0] = pws[gid].i[12];
5807 w3[1] = pws[gid].i[13];
5808 w3[2] = pws[gid].i[14];
5809 w3[3] = pws[gid].i[15];
5811 const u32 pw_len = pws[gid].pw_len;
5817 l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
5818 | c_bin2asc[(lid >> 4) & 15] << 0;
5822 if (gid >= gid_max) return;
5828 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
5829 const u32 salt_len = esalt_bufs[salt_pos].salt_len;
5831 const u32 sw_1 = ((32 + esalt_len + 1) > 119);
5832 const u32 sw_2 = ((pw_len + salt_len) > 55) << 1;
5834 switch (sw_1 | sw_2)
5837 m11400m_0_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5840 m11400m_0_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5843 m11400m_1_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5846 m11400m_1_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5851 extern "C" __global__ void __launch_bounds__ (256, 1) m11400_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 sip_t *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)
5857 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
5863 const u32 lid = threadIdx.x;
5867 w0[0] = pws[gid].i[ 0];
5868 w0[1] = pws[gid].i[ 1];
5869 w0[2] = pws[gid].i[ 2];
5870 w0[3] = pws[gid].i[ 3];
5890 w3[2] = pws[gid].i[14];
5893 const u32 pw_len = pws[gid].pw_len;
5899 l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
5900 | c_bin2asc[(lid >> 4) & 15] << 0;
5904 if (gid >= gid_max) return;
5910 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
5911 const u32 salt_len = esalt_bufs[salt_pos].salt_len;
5913 const u32 sw_1 = ((32 + esalt_len + 1) > 119);
5914 const u32 sw_2 = ((pw_len + salt_len) > 55) << 1;
5916 switch (sw_1 | sw_2)
5919 m11400s_0_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5922 m11400s_0_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5925 m11400s_1_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5928 m11400s_1_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
5933 extern "C" __global__ void __launch_bounds__ (256, 1) m11400_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 sip_t *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)
5939 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
5945 const u32 lid = threadIdx.x;
5949 w0[0] = pws[gid].i[ 0];
5950 w0[1] = pws[gid].i[ 1];
5951 w0[2] = pws[gid].i[ 2];
5952 w0[3] = pws[gid].i[ 3];
5956 w1[0] = pws[gid].i[ 4];
5957 w1[1] = pws[gid].i[ 5];
5958 w1[2] = pws[gid].i[ 6];
5959 w1[3] = pws[gid].i[ 7];
5972 w3[2] = pws[gid].i[14];
5975 const u32 pw_len = pws[gid].pw_len;
5981 l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
5982 | c_bin2asc[(lid >> 4) & 15] << 0;
5986 if (gid >= gid_max) return;
5992 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
5993 const u32 salt_len = esalt_bufs[salt_pos].salt_len;
5995 const u32 sw_1 = ((32 + esalt_len + 1) > 119);
5996 const u32 sw_2 = ((pw_len + salt_len) > 55) << 1;
5998 switch (sw_1 | sw_2)
6001 m11400s_0_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
6004 m11400s_0_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
6007 m11400s_1_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
6010 m11400s_1_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
6015 extern "C" __global__ void __launch_bounds__ (256, 1) m11400_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 sip_t *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)
6021 const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
6027 const u32 lid = threadIdx.x;
6031 w0[0] = pws[gid].i[ 0];
6032 w0[1] = pws[gid].i[ 1];
6033 w0[2] = pws[gid].i[ 2];
6034 w0[3] = pws[gid].i[ 3];
6038 w1[0] = pws[gid].i[ 4];
6039 w1[1] = pws[gid].i[ 5];
6040 w1[2] = pws[gid].i[ 6];
6041 w1[3] = pws[gid].i[ 7];
6045 w2[0] = pws[gid].i[ 8];
6046 w2[1] = pws[gid].i[ 9];
6047 w2[2] = pws[gid].i[10];
6048 w2[3] = pws[gid].i[11];
6052 w3[0] = pws[gid].i[12];
6053 w3[1] = pws[gid].i[13];
6054 w3[2] = pws[gid].i[14];
6055 w3[3] = pws[gid].i[15];
6057 const u32 pw_len = pws[gid].pw_len;
6063 l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
6064 | c_bin2asc[(lid >> 4) & 15] << 0;
6068 if (gid >= gid_max) return;
6074 const u32 esalt_len = esalt_bufs[salt_pos].esalt_len;
6075 const u32 salt_len = esalt_bufs[salt_pos].salt_len;
6077 const u32 sw_1 = ((32 + esalt_len + 1) > 119);
6078 const u32 sw_2 = ((pw_len + salt_len) > 55) << 1;
6080 switch (sw_1 | sw_2)
6083 m11400s_0_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
6086 m11400s_0_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
6089 m11400s_1_0 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);
6092 m11400s_1_1 (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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);