Initial commit
[hashcat.git] / nv / m00040_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) m00040_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
107     w0[0] = pw_buf0[0];
108     w0[1] = pw_buf0[1];
109     w0[2] = pw_buf0[2];
110     w0[3] = pw_buf0[3];
111
112     u32x w1[4];
113
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
119     u32x w2[4];
120
121     w2[0] = 0;
122     w2[1] = 0;
123     w2[2] = 0;
124     w2[3] = 0;
125
126     u32x w3[4];
127
128     w3[0] = 0;
129     w3[1] = 0;
130     w3[2] = 0;
131     w3[3] = 0;
132
133     const u32 out_len = apply_rules (c_rules[il_pos].cmds, w0, w1, pw_len);
134
135     /**
136      * prepend salt
137      */
138
139     const u32 out_salt_len = (out_len * 2) + salt_len;
140
141     u32x w0_t[4];
142     u32x w1_t[4];
143     u32x w2_t[4];
144     u32x w3_t[4];
145
146     make_unicode (w0, w0_t, w1_t);
147     make_unicode (w1, w2_t, w3_t);
148
149     switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
150
151     w0_t[0] |= salt_buf0[0];
152     w0_t[1] |= salt_buf0[1];
153     w0_t[2] |= salt_buf0[2];
154     w0_t[3] |= salt_buf0[3];
155     w1_t[0] |= salt_buf1[0];
156     w1_t[1] |= salt_buf1[1];
157     w1_t[2] |= salt_buf1[2];
158     w1_t[3] |= salt_buf1[3];
159
160     append_0x80_4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
161
162     w3_t[2] = out_salt_len * 8;
163
164     /**
165      * md5
166      */
167
168     u32x a = MD5M_A;
169     u32x b = MD5M_B;
170     u32x c = MD5M_C;
171     u32x d = MD5M_D;
172
173     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
174     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
175     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
176     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
177     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
178     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
179     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
180     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
181     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
182     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
183     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
184     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
185     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
186     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
187     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
188     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
189
190     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
191     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
192     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
193     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
194     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
195     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
196     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
197     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
198     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
199     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
200     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
201     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
202     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
203     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
204     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
205     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
206
207     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
208     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
209     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
210     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
211     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
212     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
213     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
214     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
215     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
216     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
217     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
218     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
219     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
220     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
221     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
222     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
223
224     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
225     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
226     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
227     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
228     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
229     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
230     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
231     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
232     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
233     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
234     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
235     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
236     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
237     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
238     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
239     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
240
241
242     const u32x r0 = a;
243     const u32x r1 = d;
244     const u32x r2 = c;
245     const u32x r3 = b;
246
247     #include VECT_COMPARE_M
248   }
249 }
250
251 extern "C" __global__ void __launch_bounds__ (256, 1) m00040_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)
252 {
253 }
254
255 extern "C" __global__ void __launch_bounds__ (256, 1) m00040_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)
256 {
257 }
258
259 extern "C" __global__ void __launch_bounds__ (256, 1) m00040_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)
260 {
261   /**
262    * modifier
263    */
264
265   const u32 lid = threadIdx.x;
266
267   /**
268    * base
269    */
270
271   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
272
273   if (gid >= gid_max) return;
274
275   u32x pw_buf0[4];
276
277   pw_buf0[0] = pws[gid].i[ 0];
278   pw_buf0[1] = pws[gid].i[ 1];
279   pw_buf0[2] = pws[gid].i[ 2];
280   pw_buf0[3] = pws[gid].i[ 3];
281
282   u32x pw_buf1[4];
283
284   pw_buf1[0] = pws[gid].i[ 4];
285   pw_buf1[1] = pws[gid].i[ 5];
286   pw_buf1[2] = pws[gid].i[ 6];
287   pw_buf1[3] = pws[gid].i[ 7];
288
289   const u32 pw_len = pws[gid].pw_len;
290
291   /**
292    * salt
293    */
294
295   u32 salt_buf0[4];
296
297   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
298   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
299   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
300   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
301
302   u32 salt_buf1[4];
303
304   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
305   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
306   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6];
307   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7];
308
309   const u32 salt_len = salt_bufs[salt_pos].salt_len;
310
311   /**
312    * digest
313    */
314
315   const u32 search[4] =
316   {
317     digests_buf[digests_offset].digest_buf[DGST_R0],
318     digests_buf[digests_offset].digest_buf[DGST_R1],
319     digests_buf[digests_offset].digest_buf[DGST_R2],
320     digests_buf[digests_offset].digest_buf[DGST_R3]
321   };
322
323   /**
324    * loop
325    */
326
327   for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
328   {
329     u32x w0[4];
330
331     w0[0] = pw_buf0[0];
332     w0[1] = pw_buf0[1];
333     w0[2] = pw_buf0[2];
334     w0[3] = pw_buf0[3];
335
336     u32x w1[4];
337
338     w1[0] = pw_buf1[0];
339     w1[1] = pw_buf1[1];
340     w1[2] = pw_buf1[2];
341     w1[3] = pw_buf1[3];
342
343     u32x w2[4];
344
345     w2[0] = 0;
346     w2[1] = 0;
347     w2[2] = 0;
348     w2[3] = 0;
349
350     u32x w3[4];
351
352     w3[0] = 0;
353     w3[1] = 0;
354     w3[2] = 0;
355     w3[3] = 0;
356
357     const u32 out_len = apply_rules (c_rules[il_pos].cmds, w0, w1, pw_len);
358
359     /**
360      * prepend salt
361      */
362
363     const u32 out_salt_len = (out_len * 2) + salt_len;
364
365     u32x w0_t[4];
366     u32x w1_t[4];
367     u32x w2_t[4];
368     u32x w3_t[4];
369
370     make_unicode (w0, w0_t, w1_t);
371     make_unicode (w1, w2_t, w3_t);
372
373     switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
374
375     w0_t[0] |= salt_buf0[0];
376     w0_t[1] |= salt_buf0[1];
377     w0_t[2] |= salt_buf0[2];
378     w0_t[3] |= salt_buf0[3];
379     w1_t[0] |= salt_buf1[0];
380     w1_t[1] |= salt_buf1[1];
381     w1_t[2] |= salt_buf1[2];
382     w1_t[3] |= salt_buf1[3];
383
384     append_0x80_4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
385
386     w3_t[2] = out_salt_len * 8;
387
388     /**
389      * md5
390      */
391
392     u32x a = MD5M_A;
393     u32x b = MD5M_B;
394     u32x c = MD5M_C;
395     u32x d = MD5M_D;
396
397     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
398     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
399     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
400     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
401     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
402     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
403     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
404     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
405     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
406     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
407     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
408     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
409     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
410     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
411     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
412     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
413
414     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
415     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
416     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
417     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
418     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
419     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
420     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
421     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
422     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
423     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
424     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
425     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
426     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
427     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
428     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
429     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
430
431     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
432     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
433     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
434     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
435     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
436     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
437     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
438     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
439     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
440     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
441     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
442     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
443     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
444     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
445     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
446     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
447
448     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
449     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
450     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
451     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
452     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
453     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
454     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
455     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
456     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
457     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
458     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
459     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
460     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
461
462     bool q_cond = (search[0] != a);
463
464     if (q_cond) continue;
465
466     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
467     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
468     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
469
470
471     const u32x r0 = a;
472     const u32x r1 = d;
473     const u32x r2 = c;
474     const u32x r3 = b;
475
476     #include VECT_COMPARE_S
477   }
478 }
479
480 extern "C" __global__ void __launch_bounds__ (256, 1) m00040_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)
481 {
482 }
483
484 extern "C" __global__ void __launch_bounds__ (256, 1) m00040_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)
485 {
486 }