Initial commit
[hashcat.git] / nv / m03710_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 #ifdef VECT_SIZE1
44 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
45 #endif
46
47 #ifdef VECT_SIZE2
48 #define uint_to_hex_lower8(i) u32x (l_bin2asc[(i).x], l_bin2asc[(i).y])
49 #endif
50
51 #ifdef VECT_SIZE4
52 #define uint_to_hex_lower8(i) u32x (l_bin2asc[(i).x], l_bin2asc[(i).y], l_bin2asc[(i).z], l_bin2asc[(i).w])
53 #endif
54
55 __device__ __constant__ char c_bin2asc[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
56
57 __device__ __shared__ short l_bin2asc[256];
58
59 __device__ __constant__ comb_t c_combs[1024];
60
61 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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)
62 {
63   /**
64    * modifier
65    */
66
67   const u32 lid = threadIdx.x;
68
69   /**
70    * base
71    */
72
73   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
74
75   u32x wordl0[4];
76
77   wordl0[0] = pws[gid].i[ 0];
78   wordl0[1] = pws[gid].i[ 1];
79   wordl0[2] = pws[gid].i[ 2];
80   wordl0[3] = pws[gid].i[ 3];
81
82   u32x wordl1[4];
83
84   wordl1[0] = pws[gid].i[ 4];
85   wordl1[1] = pws[gid].i[ 5];
86   wordl1[2] = pws[gid].i[ 6];
87   wordl1[3] = pws[gid].i[ 7];
88
89   u32x wordl2[4];
90
91   wordl2[0] = 0;
92   wordl2[1] = 0;
93   wordl2[2] = 0;
94   wordl2[3] = 0;
95
96   u32x wordl3[4];
97
98   wordl3[0] = 0;
99   wordl3[1] = 0;
100   wordl3[2] = 0;
101   wordl3[3] = 0;
102
103   const u32 pw_l_len = pws[gid].pw_len;
104
105   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
106   {
107     append_0x80_2 (wordl0, wordl1, pw_l_len);
108
109     switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
110   }
111
112   /**
113    * salt
114    */
115
116   u32 salt_buf0[4];
117
118   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
119   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
120   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
121   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
122
123   u32 salt_buf1[4];
124
125   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
126   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
127   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
128   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
129
130   u32 salt_buf2[4];
131
132   salt_buf2[0] = 0;
133   salt_buf2[1] = 0;
134   salt_buf2[2] = 0;
135   salt_buf2[3] = 0;
136
137   u32 salt_buf3[4];
138
139   salt_buf3[0] = 0;
140   salt_buf3[1] = 0;
141   salt_buf3[2] = 0;
142   salt_buf3[3] = 0;
143
144   const u32 salt_len = salt_bufs[salt_pos].salt_len;
145
146   const u32 pw_salt_len = 32 + salt_len;
147
148   /**
149    * bin2asc table
150    */
151
152   l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
153                  | c_bin2asc[(lid >> 4) & 15] << 0;
154
155   __syncthreads ();
156
157   if (gid >= gid_max) return;
158
159   /**
160    * loop
161    */
162
163   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
164   {
165     const u32 pw_r_len = c_combs[il_pos].pw_len;
166
167     const u32 pw_len = pw_l_len + pw_r_len;
168
169     u32 wordr0[4];
170
171     wordr0[0] = c_combs[il_pos].i[0];
172     wordr0[1] = c_combs[il_pos].i[1];
173     wordr0[2] = c_combs[il_pos].i[2];
174     wordr0[3] = c_combs[il_pos].i[3];
175
176     u32 wordr1[4];
177
178     wordr1[0] = c_combs[il_pos].i[4];
179     wordr1[1] = c_combs[il_pos].i[5];
180     wordr1[2] = c_combs[il_pos].i[6];
181     wordr1[3] = c_combs[il_pos].i[7];
182
183     u32 wordr2[4];
184
185     wordr2[0] = 0;
186     wordr2[1] = 0;
187     wordr2[2] = 0;
188     wordr2[3] = 0;
189
190     u32 wordr3[4];
191
192     wordr3[0] = 0;
193     wordr3[1] = 0;
194     wordr3[2] = 0;
195     wordr3[3] = 0;
196
197     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
198     {
199       switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
200     }
201
202     u32x w0[4];
203
204     w0[0] = wordl0[0] | wordr0[0];
205     w0[1] = wordl0[1] | wordr0[1];
206     w0[2] = wordl0[2] | wordr0[2];
207     w0[3] = wordl0[3] | wordr0[3];
208
209     u32x w1[4];
210
211     w1[0] = wordl1[0] | wordr1[0];
212     w1[1] = wordl1[1] | wordr1[1];
213     w1[2] = wordl1[2] | wordr1[2];
214     w1[3] = wordl1[3] | wordr1[3];
215
216     u32x w2[4];
217
218     w2[0] = wordl2[0] | wordr2[0];
219     w2[1] = wordl2[1] | wordr2[1];
220     w2[2] = wordl2[2] | wordr2[2];
221     w2[3] = wordl2[3] | wordr2[3];
222
223     u32x w3[4];
224
225     w3[0] = wordl3[0] | wordr3[0];
226     w3[1] = wordl3[1] | wordr3[1];
227     w3[2] = pw_len * 8;
228     w3[3] = 0;
229
230     u32x a = MD5M_A;
231     u32x b = MD5M_B;
232     u32x c = MD5M_C;
233     u32x d = MD5M_D;
234
235     MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
236     MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
237     MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
238     MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
239     MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
240     MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
241     MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
242     MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
243     MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
244     MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
245     MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
246     MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
247     MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
248     MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
249     MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
250     MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
251
252     MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
253     MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
254     MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
255     MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
256     MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
257     MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
258     MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
259     MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
260     MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
261     MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
262     MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
263     MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
264     MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
265     MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
266     MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
267     MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
268
269     MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
270     MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
271     MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
272     MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
273     MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
274     MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
275     MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
276     MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
277     MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
278     MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
279     MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
280     MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
281     MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
282     MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
283     MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
284     MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
285
286     MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
287     MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
288     MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
289     MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
290     MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
291     MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
292     MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
293     MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
294     MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
295     MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
296     MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
297     MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
298     MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
299     MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
300     MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
301     MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
302
303     a += MD5M_A;
304     b += MD5M_B;
305     c += MD5M_C;
306     d += MD5M_D;
307
308     u32x w0_t[4];
309     u32x w1_t[4];
310     u32x w2_t[4];
311     u32x w3_t[4];
312
313     w0_t[0] = uint_to_hex_lower8 ((a >>  0) & 255) <<  0
314             | uint_to_hex_lower8 ((a >>  8) & 255) << 16;
315     w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) <<  0
316             | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
317     w0_t[2] = uint_to_hex_lower8 ((b >>  0) & 255) <<  0
318             | uint_to_hex_lower8 ((b >>  8) & 255) << 16;
319     w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) <<  0
320             | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
321     w1_t[0] = uint_to_hex_lower8 ((c >>  0) & 255) <<  0
322             | uint_to_hex_lower8 ((c >>  8) & 255) << 16;
323     w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) <<  0
324             | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
325     w1_t[2] = uint_to_hex_lower8 ((d >>  0) & 255) <<  0
326             | uint_to_hex_lower8 ((d >>  8) & 255) << 16;
327     w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) <<  0
328             | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
329
330     w2_t[0] = 0x00000080;
331     w2_t[1] = 0;
332     w2_t[2] = 0;
333     w2_t[3] = 0;
334
335     w3_t[0] = 0;
336     w3_t[1] = 0;
337     w3_t[2] = 0;
338     w3_t[3] = 0;
339
340     /**
341      * prepend salt
342      */
343
344     switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
345
346     w3_t[2] = pw_salt_len * 8;
347
348     w0_t[0] |= salt_buf0[0];
349     w0_t[1] |= salt_buf0[1];
350     w0_t[2] |= salt_buf0[2];
351     w0_t[3] |= salt_buf0[3];
352     w1_t[0] |= salt_buf1[0];
353     w1_t[1] |= salt_buf1[1];
354     w1_t[2] |= salt_buf1[2];
355     w1_t[3] |= salt_buf1[3];
356     w2_t[0] |= salt_buf2[0];
357     w2_t[1] |= salt_buf2[1];
358     w2_t[2] |= salt_buf2[2];
359     w2_t[3] |= salt_buf2[3];
360     w3_t[0] |= salt_buf3[0];
361     w3_t[1] |= salt_buf3[1];
362     w3_t[2] |= salt_buf3[2];
363     w3_t[3] |= salt_buf3[3];
364
365     /**
366      * md5
367      */
368
369     a = MD5M_A;
370     b = MD5M_B;
371     c = MD5M_C;
372     d = MD5M_D;
373
374     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
375     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
376     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
377     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
378     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
379     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
380     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
381     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
382     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
383     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
384     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
385     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
386     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
387     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
388     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
389     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
390
391     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
392     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
393     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
394     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
395     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
396     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
397     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
398     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
399     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
400     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
401     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
402     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
403     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
404     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
405     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
406     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
407
408     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
409     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
410     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
411     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
412     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
413     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
414     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
415     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
416     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
417     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
418     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
419     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
420     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
421     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
422     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
423     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
424
425     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
426     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
427     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
428     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
429     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
430     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
431     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
432     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
433     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
434     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
435     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
436     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
437     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
438     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
439     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
440     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
441
442     const u32x r0 = a;
443     const u32x r1 = d;
444     const u32x r2 = c;
445     const u32x r3 = b;
446
447     #include VECT_COMPARE_M
448   }
449 }
450
451 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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)
452 {
453 }
454
455 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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)
456 {
457 }
458
459 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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)
460 {
461   /**
462    * modifier
463    */
464
465   const u32 lid = threadIdx.x;
466
467   /**
468    * base
469    */
470
471   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
472
473   u32x wordl0[4];
474
475   wordl0[0] = pws[gid].i[ 0];
476   wordl0[1] = pws[gid].i[ 1];
477   wordl0[2] = pws[gid].i[ 2];
478   wordl0[3] = pws[gid].i[ 3];
479
480   u32x wordl1[4];
481
482   wordl1[0] = pws[gid].i[ 4];
483   wordl1[1] = pws[gid].i[ 5];
484   wordl1[2] = pws[gid].i[ 6];
485   wordl1[3] = pws[gid].i[ 7];
486
487   u32x wordl2[4];
488
489   wordl2[0] = 0;
490   wordl2[1] = 0;
491   wordl2[2] = 0;
492   wordl2[3] = 0;
493
494   u32x wordl3[4];
495
496   wordl3[0] = 0;
497   wordl3[1] = 0;
498   wordl3[2] = 0;
499   wordl3[3] = 0;
500
501   const u32 pw_l_len = pws[gid].pw_len;
502
503   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
504   {
505     append_0x80_2 (wordl0, wordl1, pw_l_len);
506
507     switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
508   }
509
510   /**
511    * salt
512    */
513
514   u32 salt_buf0[4];
515
516   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
517   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
518   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
519   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
520
521   u32 salt_buf1[4];
522
523   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
524   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
525   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
526   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
527
528   u32 salt_buf2[4];
529
530   salt_buf2[0] = 0;
531   salt_buf2[1] = 0;
532   salt_buf2[2] = 0;
533   salt_buf2[3] = 0;
534
535   u32 salt_buf3[4];
536
537   salt_buf3[0] = 0;
538   salt_buf3[1] = 0;
539   salt_buf3[2] = 0;
540   salt_buf3[3] = 0;
541
542   const u32 salt_len = salt_bufs[salt_pos].salt_len;
543
544   const u32 pw_salt_len = 32 + salt_len;
545
546   /**
547    * digest
548    */
549
550   const u32 search[4] =
551   {
552     digests_buf[digests_offset].digest_buf[DGST_R0],
553     digests_buf[digests_offset].digest_buf[DGST_R1],
554     digests_buf[digests_offset].digest_buf[DGST_R2],
555     digests_buf[digests_offset].digest_buf[DGST_R3]
556   };
557
558   /**
559    * bin2asc table
560    */
561
562   l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
563                  | c_bin2asc[(lid >> 4) & 15] << 0;
564
565   __syncthreads ();
566
567   if (gid >= gid_max) return;
568
569   /**
570    * loop
571    */
572
573   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
574   {
575     const u32 pw_r_len = c_combs[il_pos].pw_len;
576
577     const u32 pw_len = pw_l_len + pw_r_len;
578
579     u32 wordr0[4];
580
581     wordr0[0] = c_combs[il_pos].i[0];
582     wordr0[1] = c_combs[il_pos].i[1];
583     wordr0[2] = c_combs[il_pos].i[2];
584     wordr0[3] = c_combs[il_pos].i[3];
585
586     u32 wordr1[4];
587
588     wordr1[0] = c_combs[il_pos].i[4];
589     wordr1[1] = c_combs[il_pos].i[5];
590     wordr1[2] = c_combs[il_pos].i[6];
591     wordr1[3] = c_combs[il_pos].i[7];
592
593     u32 wordr2[4];
594
595     wordr2[0] = 0;
596     wordr2[1] = 0;
597     wordr2[2] = 0;
598     wordr2[3] = 0;
599
600     u32 wordr3[4];
601
602     wordr3[0] = 0;
603     wordr3[1] = 0;
604     wordr3[2] = 0;
605     wordr3[3] = 0;
606
607     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
608     {
609       switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
610     }
611
612     u32x w0[4];
613
614     w0[0] = wordl0[0] | wordr0[0];
615     w0[1] = wordl0[1] | wordr0[1];
616     w0[2] = wordl0[2] | wordr0[2];
617     w0[3] = wordl0[3] | wordr0[3];
618
619     u32x w1[4];
620
621     w1[0] = wordl1[0] | wordr1[0];
622     w1[1] = wordl1[1] | wordr1[1];
623     w1[2] = wordl1[2] | wordr1[2];
624     w1[3] = wordl1[3] | wordr1[3];
625
626     u32x w2[4];
627
628     w2[0] = wordl2[0] | wordr2[0];
629     w2[1] = wordl2[1] | wordr2[1];
630     w2[2] = wordl2[2] | wordr2[2];
631     w2[3] = wordl2[3] | wordr2[3];
632
633     u32x w3[4];
634
635     w3[0] = wordl3[0] | wordr3[0];
636     w3[1] = wordl3[1] | wordr3[1];
637     w3[2] = pw_len * 8;
638     w3[3] = 0;
639
640     u32x a = MD5M_A;
641     u32x b = MD5M_B;
642     u32x c = MD5M_C;
643     u32x d = MD5M_D;
644
645     MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
646     MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
647     MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
648     MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
649     MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
650     MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
651     MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
652     MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
653     MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
654     MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
655     MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
656     MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
657     MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
658     MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
659     MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
660     MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
661
662     MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
663     MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
664     MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
665     MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
666     MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
667     MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
668     MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
669     MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
670     MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
671     MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
672     MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
673     MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
674     MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
675     MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
676     MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
677     MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
678
679     MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
680     MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
681     MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
682     MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
683     MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
684     MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
685     MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
686     MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
687     MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
688     MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
689     MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
690     MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
691     MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
692     MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
693     MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
694     MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
695
696     MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
697     MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
698     MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
699     MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
700     MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
701     MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
702     MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
703     MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
704     MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
705     MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
706     MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
707     MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
708     MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
709     MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
710     MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
711     MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
712
713     a += MD5M_A;
714     b += MD5M_B;
715     c += MD5M_C;
716     d += MD5M_D;
717
718     u32x w0_t[4];
719     u32x w1_t[4];
720     u32x w2_t[4];
721     u32x w3_t[4];
722
723     w0_t[0] = uint_to_hex_lower8 ((a >>  0) & 255) <<  0
724             | uint_to_hex_lower8 ((a >>  8) & 255) << 16;
725     w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) <<  0
726             | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
727     w0_t[2] = uint_to_hex_lower8 ((b >>  0) & 255) <<  0
728             | uint_to_hex_lower8 ((b >>  8) & 255) << 16;
729     w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) <<  0
730             | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
731     w1_t[0] = uint_to_hex_lower8 ((c >>  0) & 255) <<  0
732             | uint_to_hex_lower8 ((c >>  8) & 255) << 16;
733     w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) <<  0
734             | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
735     w1_t[2] = uint_to_hex_lower8 ((d >>  0) & 255) <<  0
736             | uint_to_hex_lower8 ((d >>  8) & 255) << 16;
737     w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) <<  0
738             | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
739
740     w2_t[0] = 0x00000080;
741     w2_t[1] = 0;
742     w2_t[2] = 0;
743     w2_t[3] = 0;
744
745     w3_t[0] = 0;
746     w3_t[1] = 0;
747     w3_t[2] = 0;
748     w3_t[3] = 0;
749
750     /**
751      * prepend salt
752      */
753
754     switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
755
756     w3_t[2] = pw_salt_len * 8;
757
758     w0_t[0] |= salt_buf0[0];
759     w0_t[1] |= salt_buf0[1];
760     w0_t[2] |= salt_buf0[2];
761     w0_t[3] |= salt_buf0[3];
762     w1_t[0] |= salt_buf1[0];
763     w1_t[1] |= salt_buf1[1];
764     w1_t[2] |= salt_buf1[2];
765     w1_t[3] |= salt_buf1[3];
766     w2_t[0] |= salt_buf2[0];
767     w2_t[1] |= salt_buf2[1];
768     w2_t[2] |= salt_buf2[2];
769     w2_t[3] |= salt_buf2[3];
770     w3_t[0] |= salt_buf3[0];
771     w3_t[1] |= salt_buf3[1];
772     w3_t[2] |= salt_buf3[2];
773     w3_t[3] |= salt_buf3[3];
774
775     /**
776      * md5
777      */
778
779     a = MD5M_A;
780     b = MD5M_B;
781     c = MD5M_C;
782     d = MD5M_D;
783
784     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
785     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
786     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
787     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
788     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
789     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
790     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
791     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
792     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
793     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
794     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
795     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
796     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
797     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
798     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
799     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
800
801     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
802     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
803     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
804     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
805     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
806     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
807     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
808     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
809     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
810     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
811     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
812     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
813     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
814     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
815     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
816     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
817
818     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
819     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
820     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
821     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
822     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
823     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
824     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
825     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
826     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
827     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
828     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
829     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
830     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
831     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
832     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
833     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
834
835     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
836     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
837     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
838     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
839     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
840     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
841     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
842     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
843     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
844     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
845     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
846     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
847     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
848     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
849     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
850     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
851
852     const u32x r0 = a;
853     const u32x r1 = d;
854     const u32x r2 = c;
855     const u32x r3 = b;
856
857     #include VECT_COMPARE_S
858   }
859 }
860
861 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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)
862 {
863 }
864
865 extern "C" __global__ void __launch_bounds__ (256, 1) m03710_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)
866 {
867 }