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