Initial commit
[hashcat.git] / nv / m00020_a0.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_SIZE1
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 #include "include/rp_gpu.h"
28 #include "rp_nv.c"
29
30 #ifdef  VECT_SIZE1
31 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
32 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
33 #endif
34
35 #ifdef  VECT_SIZE2
36 #define VECT_COMPARE_S "check_single_vect2_comp4.c"
37 #define VECT_COMPARE_M "check_multi_vect2_comp4.c"
38 #endif
39
40 #ifdef  VECT_SIZE4
41 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
42 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
43 #endif
44
45 __device__ __constant__ gpu_rule_t c_rules[1024];
46
47 extern "C" __global__ void __launch_bounds__ (256, 1) m00020_m04 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
48 {
49   /**
50    * modifier
51    */
52
53   const u32 lid = threadIdx.x;
54
55   /**
56    * base
57    */
58
59   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
60
61   if (gid >= gid_max) return;
62
63   u32x pw_buf0[4];
64
65   pw_buf0[0] = pws[gid].i[ 0];
66   pw_buf0[1] = pws[gid].i[ 1];
67   pw_buf0[2] = pws[gid].i[ 2];
68   pw_buf0[3] = pws[gid].i[ 3];
69
70   u32x pw_buf1[4];
71
72   pw_buf1[0] = pws[gid].i[ 4];
73   pw_buf1[1] = pws[gid].i[ 5];
74   pw_buf1[2] = pws[gid].i[ 6];
75   pw_buf1[3] = pws[gid].i[ 7];
76
77   const u32 pw_len = pws[gid].pw_len;
78
79   /**
80    * salt
81    */
82
83   u32 salt_buf0[4];
84
85   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
86   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
87   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
88   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
89
90   u32 salt_buf1[4];
91
92   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
93   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
94   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6];
95   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7];
96
97   const u32 salt_len = salt_bufs[salt_pos].salt_len;
98
99   /**
100    * loop
101    */
102
103   for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
104   {
105     u32x w0[4];
106     u32x w1[4];
107     u32x w2[4];
108     u32x w3[4];
109
110     w0[0] = pw_buf0[0];
111     w0[1] = pw_buf0[1];
112     w0[2] = pw_buf0[2];
113     w0[3] = pw_buf0[3];
114     w1[0] = pw_buf1[0];
115     w1[1] = pw_buf1[1];
116     w1[2] = pw_buf1[2];
117     w1[3] = pw_buf1[3];
118     w2[0] = 0;
119     w2[1] = 0;
120     w2[2] = 0;
121     w2[3] = 0;
122     w3[0] = 0;
123     w3[1] = 0;
124     w3[2] = 0;
125     w3[3] = 0;
126
127     const u32 out_len = apply_rules (c_rules[il_pos].cmds, w0, w1, pw_len);
128
129     /**
130      * prepend salt
131      */
132
133     const u32 out_salt_len = out_len + salt_len;
134
135     u32x w0_t[4];
136     u32x w1_t[4];
137     u32x w2_t[4];
138     u32x w3_t[4];
139
140     w0_t[0] = w0[0];
141     w0_t[1] = w0[1];
142     w0_t[2] = w0[2];
143     w0_t[3] = w0[3];
144     w1_t[0] = w1[0];
145     w1_t[1] = w1[1];
146     w1_t[2] = w1[2];
147     w1_t[3] = w1[3];
148     w2_t[0] = w2[0];
149     w2_t[1] = w2[1];
150     w2_t[2] = w2[2];
151     w2_t[3] = w2[3];
152     w3_t[0] = w3[0];
153     w3_t[1] = w3[1];
154     w3_t[2] = w3[2];
155     w3_t[3] = w3[3];
156
157     switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
158
159     w0_t[0] |= salt_buf0[0];
160     w0_t[1] |= salt_buf0[1];
161     w0_t[2] |= salt_buf0[2];
162     w0_t[3] |= salt_buf0[3];
163     w1_t[0] |= salt_buf1[0];
164     w1_t[1] |= salt_buf1[1];
165     w1_t[2] |= salt_buf1[2];
166     w1_t[3] |= salt_buf1[3];
167
168     append_0x80_4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
169
170     w3_t[2] = out_salt_len * 8;
171
172     /**
173      * md5
174      */
175
176     u32x tmp2;
177
178     u32x a = MD5M_A;
179     u32x b = MD5M_B;
180     u32x c = MD5M_C;
181     u32x d = MD5M_D;
182
183     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
184     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
185     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
186     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
187     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
188     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
189     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
190     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
191     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
192     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
193     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
194     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
195     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
196     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
197     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
198     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
199
200     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
201     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
202     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
203     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
204     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
205     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
206     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
207     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
208     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
209     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
210     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
211     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
212     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
213     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
214     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
215     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
216
217     MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
218     MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
219     MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
220     MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
221     MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
222     MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
223     MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
224     MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
225     MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
226     MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
227     MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
228     MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
229     MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
230     MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
231     MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
232     MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
233
234     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
235     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
236     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
237     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
238     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
239     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
240     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
241     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
242     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
243     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
244     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
245     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
246     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
247     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
248     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
249     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
250
251
252     const u32x r0 = a;
253     const u32x r1 = d;
254     const u32x r2 = c;
255     const u32x r3 = b;
256
257     #include VECT_COMPARE_M
258   }
259 }
260
261 extern "C" __global__ void __launch_bounds__ (256, 1) m00020_m08 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
262 {
263 }
264
265 extern "C" __global__ void __launch_bounds__ (256, 1) m00020_m16 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
266 {
267 }
268
269 extern "C" __global__ void __launch_bounds__ (256, 1) m00020_s04 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
270 {
271   /**
272    * modifier
273    */
274
275   const u32 lid = threadIdx.x;
276
277   /**
278    * base
279    */
280
281   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
282
283   if (gid >= gid_max) return;
284
285   u32x pw_buf0[4];
286
287   pw_buf0[0] = pws[gid].i[ 0];
288   pw_buf0[1] = pws[gid].i[ 1];
289   pw_buf0[2] = pws[gid].i[ 2];
290   pw_buf0[3] = pws[gid].i[ 3];
291
292   u32x pw_buf1[4];
293
294   pw_buf1[0] = pws[gid].i[ 4];
295   pw_buf1[1] = pws[gid].i[ 5];
296   pw_buf1[2] = pws[gid].i[ 6];
297   pw_buf1[3] = pws[gid].i[ 7];
298
299   const u32 pw_len = pws[gid].pw_len;
300
301   /**
302    * salt
303    */
304
305   u32 salt_buf0[4];
306
307   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
308   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
309   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
310   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
311
312   u32 salt_buf1[4];
313
314   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
315   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
316   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6];
317   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7];
318
319   const u32 salt_len = salt_bufs[salt_pos].salt_len;
320
321   /**
322    * digest
323    */
324
325   const u32 search[4] =
326   {
327     digests_buf[digests_offset].digest_buf[DGST_R0],
328     digests_buf[digests_offset].digest_buf[DGST_R1],
329     digests_buf[digests_offset].digest_buf[DGST_R2],
330     digests_buf[digests_offset].digest_buf[DGST_R3]
331   };
332
333   /**
334    * loop
335    */
336
337   for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
338   {
339     u32x w0[4];
340     u32x w1[4];
341     u32x w2[4];
342     u32x w3[4];
343
344     w0[0] = pw_buf0[0];
345     w0[1] = pw_buf0[1];
346     w0[2] = pw_buf0[2];
347     w0[3] = pw_buf0[3];
348     w1[0] = pw_buf1[0];
349     w1[1] = pw_buf1[1];
350     w1[2] = pw_buf1[2];
351     w1[3] = pw_buf1[3];
352     w2[0] = 0;
353     w2[1] = 0;
354     w2[2] = 0;
355     w2[3] = 0;
356     w3[0] = 0;
357     w3[1] = 0;
358     w3[2] = 0;
359     w3[3] = 0;
360
361     const u32 out_len = apply_rules (c_rules[il_pos].cmds, w0, w1, pw_len);
362
363     /**
364      * prepend salt
365      */
366
367     const u32 out_salt_len = out_len + salt_len;
368
369     u32x w0_t[4];
370     u32x w1_t[4];
371     u32x w2_t[4];
372     u32x w3_t[4];
373
374     w0_t[0] = w0[0];
375     w0_t[1] = w0[1];
376     w0_t[2] = w0[2];
377     w0_t[3] = w0[3];
378     w1_t[0] = w1[0];
379     w1_t[1] = w1[1];
380     w1_t[2] = w1[2];
381     w1_t[3] = w1[3];
382     w2_t[0] = w2[0];
383     w2_t[1] = w2[1];
384     w2_t[2] = w2[2];
385     w2_t[3] = w2[3];
386     w3_t[0] = w3[0];
387     w3_t[1] = w3[1];
388     w3_t[2] = w3[2];
389     w3_t[3] = w3[3];
390
391     switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
392
393     w0_t[0] |= salt_buf0[0];
394     w0_t[1] |= salt_buf0[1];
395     w0_t[2] |= salt_buf0[2];
396     w0_t[3] |= salt_buf0[3];
397     w1_t[0] |= salt_buf1[0];
398     w1_t[1] |= salt_buf1[1];
399     w1_t[2] |= salt_buf1[2];
400     w1_t[3] |= salt_buf1[3];
401
402     append_0x80_4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
403
404     w3_t[2] = out_salt_len * 8;
405
406     /**
407      * md5
408      */
409
410     u32x tmp2;
411
412     u32x a = MD5M_A;
413     u32x b = MD5M_B;
414     u32x c = MD5M_C;
415     u32x d = MD5M_D;
416
417     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
418     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
419     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
420     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
421     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
422     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
423     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
424     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
425     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
426     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
427     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
428     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
429     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
430     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
431     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
432     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
433
434     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
435     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
436     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
437     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
438     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
439     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
440     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
441     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
442     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
443     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
444     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
445     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
446     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
447     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
448     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
449     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
450
451     MD5_STEP (MD5_H1, a, b, c, d, w1_t[1], MD5C20, MD5S20);
452     MD5_STEP (MD5_H2, d, a, b, c, w2_t[0], MD5C21, MD5S21);
453     MD5_STEP (MD5_H1, c, d, a, b, w2_t[3], MD5C22, MD5S22);
454     MD5_STEP (MD5_H2, b, c, d, a, w3_t[2], MD5C23, MD5S23);
455     MD5_STEP (MD5_H1, a, b, c, d, w0_t[1], MD5C24, MD5S20);
456     MD5_STEP (MD5_H2, d, a, b, c, w1_t[0], MD5C25, MD5S21);
457     MD5_STEP (MD5_H1, c, d, a, b, w1_t[3], MD5C26, MD5S22);
458     MD5_STEP (MD5_H2, b, c, d, a, w2_t[2], MD5C27, MD5S23);
459     MD5_STEP (MD5_H1, a, b, c, d, w3_t[1], MD5C28, MD5S20);
460     MD5_STEP (MD5_H2, d, a, b, c, w0_t[0], MD5C29, MD5S21);
461     MD5_STEP (MD5_H1, c, d, a, b, w0_t[3], MD5C2a, MD5S22);
462     MD5_STEP (MD5_H2, b, c, d, a, w1_t[2], MD5C2b, MD5S23);
463     MD5_STEP (MD5_H1, a, b, c, d, w2_t[1], MD5C2c, MD5S20);
464     MD5_STEP (MD5_H2, d, a, b, c, w3_t[0], MD5C2d, MD5S21);
465     MD5_STEP (MD5_H1, c, d, a, b, w3_t[3], MD5C2e, MD5S22);
466     MD5_STEP (MD5_H2, b, c, d, a, w0_t[2], MD5C2f, MD5S23);
467
468     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
469     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
470     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
471     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
472     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
473     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
474     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
475     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
476     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
477     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
478     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
479     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
480     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
481
482     bool q_cond = (search[0] != a);
483
484     if (q_cond) continue;
485
486     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
487     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
488     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
489
490
491     const u32x r0 = a;
492     const u32x r1 = d;
493     const u32x r2 = c;
494     const u32x r3 = b;
495
496     #include VECT_COMPARE_S
497   }
498 }
499
500 extern "C" __global__ void __launch_bounds__ (256, 1) m00020_s08 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
501 {
502 }
503
504 extern "C" __global__ void __launch_bounds__ (256, 1) m00020_s16 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const bf_t *bfs_buf, const void *tmps, void *hooks, const u32 *bitmaps_buf_s1_a, const u32 *bitmaps_buf_s1_b, const u32 *bitmaps_buf_s1_c, const u32 *bitmaps_buf_s1_d, const u32 *bitmaps_buf_s2_a, const u32 *bitmaps_buf_s2_b, const u32 *bitmaps_buf_s2_c, const u32 *bitmaps_buf_s2_d, plain_t *plains_buf, const digest_t *digests_buf, u32 *hashes_shown, const salt_t *salt_bufs, const void *esalt_bufs, u32 *d_return_buf, u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
505 {
506 }