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