Initial commit
[hashcat.git] / nv / m02410_a1.cu
1 /**
2  * Author......: Jens Steube <jens.steube@gmail.com>
3  * License.....: MIT
4  */
5
6 #define _MD5_
7
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
10
11 #ifdef  VLIW1
12 #define VECT_SIZE1
13 #endif
14
15 #ifdef  VLIW2
16 #define VECT_SIZE4
17 #endif
18
19 #define DGST_R0 0
20 #define DGST_R1 3
21 #define DGST_R2 2
22 #define DGST_R3 1
23
24 #include "include/kernel_functions.c"
25 #include "types_nv.c"
26 #include "common_nv.c"
27
28 #ifdef  VECT_SIZE1
29 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
30 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
31 #endif
32
33 #ifdef  VECT_SIZE2
34 #define VECT_COMPARE_S "check_single_vect2_comp4.c"
35 #define VECT_COMPARE_M "check_multi_vect2_comp4.c"
36 #endif
37
38 #ifdef  VECT_SIZE4
39 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
40 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
41 #endif
42
43 __device__ __constant__ comb_t c_combs[1024];
44
45 extern "C" __global__ void __launch_bounds__ (256, 1) m02410_m04 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
46 {
47   /**
48    * modifier
49    */
50
51   const u32 lid = threadIdx.x;
52
53   /**
54    * base
55    */
56
57   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
58
59   if (gid >= gid_max) return;
60
61   u32x wordl0[4];
62
63   wordl0[0] = pws[gid].i[ 0];
64   wordl0[1] = pws[gid].i[ 1];
65   wordl0[2] = pws[gid].i[ 2];
66   wordl0[3] = pws[gid].i[ 3];
67
68   u32x wordl1[4];
69
70   wordl1[0] = pws[gid].i[ 4];
71   wordl1[1] = pws[gid].i[ 5];
72   wordl1[2] = pws[gid].i[ 6];
73   wordl1[3] = pws[gid].i[ 7];
74
75   u32x wordl2[4];
76
77   wordl2[0] = 0;
78   wordl2[1] = 0;
79   wordl2[2] = 0;
80   wordl2[3] = 0;
81
82   u32x wordl3[4];
83
84   wordl3[0] = 0;
85   wordl3[1] = 0;
86   wordl3[2] = 0;
87   wordl3[3] = 0;
88
89   const u32 pw_l_len = pws[gid].pw_len;
90
91   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
92   {
93     switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
94   }
95
96   /**
97    * salt
98    */
99
100   u32 salt_buf0[4];
101
102   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
103   salt_buf0[1] = 0;
104   salt_buf0[2] = 0;
105   salt_buf0[3] = 0;
106
107   const u32 salt_len = (salt_bufs[salt_pos].salt_len < 4) ? salt_bufs[salt_pos].salt_len : 4;
108
109   /**
110    * loop
111    */
112
113   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
114   {
115     const u32 pw_r_len = c_combs[il_pos].pw_len;
116
117     const u32 pw_len = pw_l_len + pw_r_len;
118
119     u32 wordr0[4];
120
121     wordr0[0] = c_combs[il_pos].i[0];
122     wordr0[1] = c_combs[il_pos].i[1];
123     wordr0[2] = c_combs[il_pos].i[2];
124     wordr0[3] = c_combs[il_pos].i[3];
125
126     u32 wordr1[4];
127
128     wordr1[0] = c_combs[il_pos].i[4];
129     wordr1[1] = c_combs[il_pos].i[5];
130     wordr1[2] = c_combs[il_pos].i[6];
131     wordr1[3] = c_combs[il_pos].i[7];
132
133     u32 wordr2[4];
134
135     wordr2[0] = 0;
136     wordr2[1] = 0;
137     wordr2[2] = 0;
138     wordr2[3] = 0;
139
140     u32 wordr3[4];
141
142     wordr3[0] = 0;
143     wordr3[1] = 0;
144     wordr3[2] = 0;
145     wordr3[3] = 0;
146
147     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
148     {
149       switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
150     }
151
152     /**
153      * append salt
154      */
155
156     u32 s0[4];
157
158     s0[0] = salt_buf0[0];
159     s0[1] = salt_buf0[1];
160     s0[2] = salt_buf0[2];
161     s0[3] = salt_buf0[3];
162
163     u32 s1[4];
164
165     s1[0] = 0;
166     s1[1] = 0;
167     s1[2] = 0;
168     s1[3] = 0;
169
170     u32 s2[4];
171
172     s2[0] = 0;
173     s2[1] = 0;
174     s2[2] = 0;
175     s2[3] = 0;
176
177     u32 s3[4];
178
179     s3[0] = 0;
180     s3[1] = 0;
181     s3[2] = 0;
182     s3[3] = 0;
183
184     switch_buffer_by_offset (s0, s1, s2, s3, pw_len);
185
186     const u32 pw_salt_len = pw_len + salt_len;
187
188     u32x w0[4];
189
190     w0[0] = wordl0[0] | wordr0[0] | s0[0];
191     w0[1] = wordl0[1] | wordr0[1] | s0[1];
192     w0[2] = wordl0[2] | wordr0[2] | s0[2];
193     w0[3] = wordl0[3] | wordr0[3] | s0[3];
194
195     u32x w1[4];
196
197     w1[0] = wordl1[0] | wordr1[0];
198     w1[1] = wordl1[1] | wordr1[1];
199     w1[2] = wordl1[2] | wordr1[2];
200     w1[3] = wordl1[3] | wordr1[3];
201
202     u32x w2[4];
203
204     w2[0] = wordl2[0] | wordr2[0];
205     w2[1] = wordl2[1] | wordr2[1];
206     w2[2] = wordl2[2] | wordr2[2];
207     w2[3] = wordl2[3] | wordr2[3];
208
209     u32x w3[4];
210
211     w3[0] = wordl3[0] | wordr3[0];
212     w3[1] = wordl3[1] | wordr3[1];
213     w3[2] = 0;
214     w3[3] = 0;
215
216     truncate_block (w0, pw_salt_len);
217
218     w1[0] = 0x80;
219     w3[2] = 16 * 8;
220
221     u32x tmp2;
222
223     u32x a = MD5M_A;
224     u32x b = MD5M_B;
225     u32x c = MD5M_C;
226     u32x d = MD5M_D;
227
228     MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
229     MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
230     MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
231     MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
232     MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
233     MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
234     MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
235     MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
236     MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
237     MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
238     MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
239     MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
240     MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
241     MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
242     MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
243     MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
244
245     MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
246     MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
247     MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
248     MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
249     MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
250     MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
251     MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
252     MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
253     MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
254     MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
255     MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
256     MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
257     MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
258     MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
259     MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
260     MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
261
262     MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20);
263     MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21);
264     MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22);
265     MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23);
266     MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20);
267     MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21);
268     MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22);
269     MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23);
270     MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20);
271     MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21);
272     MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22);
273     MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23);
274     MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20);
275     MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21);
276     MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22);
277     MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23);
278
279     MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
280     MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
281     MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
282     MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
283     MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
284     MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
285     MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
286     MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
287     MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
288     MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
289     MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
290     MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
291     MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
292     MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
293     MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
294     MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
295
296     a &= 0x00ffffff;
297     d &= 0x00ffffff;
298     c &= 0x00ffffff;
299     b &= 0x00ffffff;
300
301     const u32x r0 = a;
302     const u32x r1 = d;
303     const u32x r2 = c;
304     const u32x r3 = b;
305
306     #include VECT_COMPARE_M
307   }
308 }
309
310 extern "C" __global__ void __launch_bounds__ (256, 1) m02410_m08 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
311 {
312 }
313
314 extern "C" __global__ void __launch_bounds__ (256, 1) m02410_m16 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
315 {
316 }
317
318 extern "C" __global__ void __launch_bounds__ (256, 1) m02410_s04 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
319 {
320   /**
321    * modifier
322    */
323
324   const u32 lid = threadIdx.x;
325
326   /**
327    * base
328    */
329
330   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
331
332   if (gid >= gid_max) return;
333
334   u32x wordl0[4];
335
336   wordl0[0] = pws[gid].i[ 0];
337   wordl0[1] = pws[gid].i[ 1];
338   wordl0[2] = pws[gid].i[ 2];
339   wordl0[3] = pws[gid].i[ 3];
340
341   u32x wordl1[4];
342
343   wordl1[0] = pws[gid].i[ 4];
344   wordl1[1] = pws[gid].i[ 5];
345   wordl1[2] = pws[gid].i[ 6];
346   wordl1[3] = pws[gid].i[ 7];
347
348   u32x wordl2[4];
349
350   wordl2[0] = 0;
351   wordl2[1] = 0;
352   wordl2[2] = 0;
353   wordl2[3] = 0;
354
355   u32x wordl3[4];
356
357   wordl3[0] = 0;
358   wordl3[1] = 0;
359   wordl3[2] = 0;
360   wordl3[3] = 0;
361
362   const u32 pw_l_len = pws[gid].pw_len;
363
364   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
365   {
366     switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
367   }
368
369   /**
370    * salt
371    */
372
373   u32 salt_buf0[4];
374
375   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
376   salt_buf0[1] = 0;
377   salt_buf0[2] = 0;
378   salt_buf0[3] = 0;
379
380   const u32 salt_len = (salt_bufs[salt_pos].salt_len < 4) ? salt_bufs[salt_pos].salt_len : 4;
381
382   /**
383    * digest
384    */
385
386   const u32 search[4] =
387   {
388     digests_buf[digests_offset].digest_buf[DGST_R0],
389     digests_buf[digests_offset].digest_buf[DGST_R1],
390     digests_buf[digests_offset].digest_buf[DGST_R2],
391     digests_buf[digests_offset].digest_buf[DGST_R3]
392   };
393
394   /**
395    * loop
396    */
397
398   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
399   {
400     const u32 pw_r_len = c_combs[il_pos].pw_len;
401
402     const u32 pw_len = pw_l_len + pw_r_len;
403
404     u32 wordr0[4];
405
406     wordr0[0] = c_combs[il_pos].i[0];
407     wordr0[1] = c_combs[il_pos].i[1];
408     wordr0[2] = c_combs[il_pos].i[2];
409     wordr0[3] = c_combs[il_pos].i[3];
410
411     u32 wordr1[4];
412
413     wordr1[0] = c_combs[il_pos].i[4];
414     wordr1[1] = c_combs[il_pos].i[5];
415     wordr1[2] = c_combs[il_pos].i[6];
416     wordr1[3] = c_combs[il_pos].i[7];
417
418     u32 wordr2[4];
419
420     wordr2[0] = 0;
421     wordr2[1] = 0;
422     wordr2[2] = 0;
423     wordr2[3] = 0;
424
425     u32 wordr3[4];
426
427     wordr3[0] = 0;
428     wordr3[1] = 0;
429     wordr3[2] = 0;
430     wordr3[3] = 0;
431
432     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
433     {
434       switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
435     }
436
437     /**
438      * append salt
439      */
440
441     u32 s0[4];
442
443     s0[0] = salt_buf0[0];
444     s0[1] = salt_buf0[1];
445     s0[2] = salt_buf0[2];
446     s0[3] = salt_buf0[3];
447
448     u32 s1[4];
449
450     s1[0] = 0;
451     s1[1] = 0;
452     s1[2] = 0;
453     s1[3] = 0;
454
455     u32 s2[4];
456
457     s2[0] = 0;
458     s2[1] = 0;
459     s2[2] = 0;
460     s2[3] = 0;
461
462     u32 s3[4];
463
464     s3[0] = 0;
465     s3[1] = 0;
466     s3[2] = 0;
467     s3[3] = 0;
468
469     switch_buffer_by_offset (s0, s1, s2, s3, pw_len);
470
471     const u32 pw_salt_len = pw_len + salt_len;
472
473     u32x w0[4];
474
475     w0[0] = wordl0[0] | wordr0[0] | s0[0];
476     w0[1] = wordl0[1] | wordr0[1] | s0[1];
477     w0[2] = wordl0[2] | wordr0[2] | s0[2];
478     w0[3] = wordl0[3] | wordr0[3] | s0[3];
479
480     u32x w1[4];
481
482     w1[0] = wordl1[0] | wordr1[0];
483     w1[1] = wordl1[1] | wordr1[1];
484     w1[2] = wordl1[2] | wordr1[2];
485     w1[3] = wordl1[3] | wordr1[3];
486
487     u32x w2[4];
488
489     w2[0] = wordl2[0] | wordr2[0];
490     w2[1] = wordl2[1] | wordr2[1];
491     w2[2] = wordl2[2] | wordr2[2];
492     w2[3] = wordl2[3] | wordr2[3];
493
494     u32x w3[4];
495
496     w3[0] = wordl3[0] | wordr3[0];
497     w3[1] = wordl3[1] | wordr3[1];
498     w3[2] = 0;
499     w3[3] = 0;
500
501     truncate_block (w0, pw_salt_len);
502
503     w1[0] = 0x80;
504     w3[2] = 16 * 8;
505
506     u32x tmp2;
507
508     u32x a = MD5M_A;
509     u32x b = MD5M_B;
510     u32x c = MD5M_C;
511     u32x d = MD5M_D;
512
513     MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
514     MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
515     MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
516     MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
517     MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
518     MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
519     MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
520     MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
521     MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
522     MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
523     MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
524     MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
525     MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
526     MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
527     MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
528     MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
529
530     MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
531     MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
532     MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
533     MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
534     MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
535     MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
536     MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
537     MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
538     MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
539     MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
540     MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
541     MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
542     MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
543     MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
544     MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
545     MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
546
547     MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20);
548     MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21);
549     MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22);
550     MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23);
551     MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20);
552     MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21);
553     MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22);
554     MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23);
555     MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20);
556     MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21);
557     MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22);
558     MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23);
559     MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20);
560     MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21);
561     MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22);
562     MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23);
563
564     MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
565     MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
566     MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
567     MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
568     MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
569     MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
570     MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
571     MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
572     MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
573     MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
574     MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
575     MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
576     MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
577
578     bool q_cond = ((a & 0x00ffffff) != search[0]);
579
580     if (q_cond) continue;
581
582     MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
583     MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
584     MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
585
586     a &= 0x00ffffff;
587     d &= 0x00ffffff;
588     c &= 0x00ffffff;
589     b &= 0x00ffffff;
590
591     const u32x r0 = a;
592     const u32x r1 = d;
593     const u32x r2 = c;
594     const u32x r3 = b;
595
596     #include VECT_COMPARE_S
597   }
598 }
599
600 extern "C" __global__ void __launch_bounds__ (256, 1) m02410_s08 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
601 {
602 }
603
604 extern "C" __global__ void __launch_bounds__ (256, 1) m02410_s16 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
605 {
606 }