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