Initial commit
[hashcat.git] / nv / m01730_a3.cu
1 /**
2  * Author......: Jens Steube <jens.steube@gmail.com>
3  * License.....: MIT
4  */
5
6 #define _SHA512_
7 #define _SCALAR_
8
9 #include "include/constants.h"
10 #include "include/kernel_vendor.h"
11
12 #ifdef  VLIW1
13 #define VECT_SIZE1
14 #endif
15
16 #ifdef  VLIW2
17 #define VECT_SIZE1
18 #endif
19
20 #define DGST_R0 14
21 #define DGST_R1 15
22 #define DGST_R2 6
23 #define DGST_R3 7
24
25 #include "include/kernel_functions.c"
26 #include "types_nv.c"
27 #include "common_nv.c"
28
29 #ifdef  VECT_SIZE1
30 #define VECT_COMPARE_S "check_single_vect1_comp4_warp.c"
31 #define VECT_COMPARE_M "check_multi_vect1_comp4_warp.c"
32 #endif
33
34 #ifdef  VECT_SIZE2
35 #define VECT_COMPARE_S "check_single_vect2_comp4_warp.c"
36 #define VECT_COMPARE_M "check_multi_vect2_comp4_warp.c"
37 #endif
38
39 #ifdef  VECT_SIZE4
40 #define VECT_COMPARE_S "check_single_vect4_comp4_warp.c"
41 #define VECT_COMPARE_M "check_multi_vect4_comp4_warp.c"
42 #endif
43
44 __device__ __constant__ u32x c_bfs[1024];
45
46 __device__ __constant__ u64 k_sha512[80] =
47 {
48   SHA512C00, SHA512C01, SHA512C02, SHA512C03,
49   SHA512C04, SHA512C05, SHA512C06, SHA512C07,
50   SHA512C08, SHA512C09, SHA512C0a, SHA512C0b,
51   SHA512C0c, SHA512C0d, SHA512C0e, SHA512C0f,
52   SHA512C10, SHA512C11, SHA512C12, SHA512C13,
53   SHA512C14, SHA512C15, SHA512C16, SHA512C17,
54   SHA512C18, SHA512C19, SHA512C1a, SHA512C1b,
55   SHA512C1c, SHA512C1d, SHA512C1e, SHA512C1f,
56   SHA512C20, SHA512C21, SHA512C22, SHA512C23,
57   SHA512C24, SHA512C25, SHA512C26, SHA512C27,
58   SHA512C28, SHA512C29, SHA512C2a, SHA512C2b,
59   SHA512C2c, SHA512C2d, SHA512C2e, SHA512C2f,
60   SHA512C30, SHA512C31, SHA512C32, SHA512C33,
61   SHA512C34, SHA512C35, SHA512C36, SHA512C37,
62   SHA512C38, SHA512C39, SHA512C3a, SHA512C3b,
63   SHA512C3c, SHA512C3d, SHA512C3e, SHA512C3f,
64   SHA512C40, SHA512C41, SHA512C42, SHA512C43,
65   SHA512C44, SHA512C45, SHA512C46, SHA512C47,
66   SHA512C48, SHA512C49, SHA512C4a, SHA512C4b,
67   SHA512C4c, SHA512C4d, SHA512C4e, SHA512C4f,
68 };
69
70 __device__ static void sha512_transform (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u64x digest[8])
71 {
72   u64x w0_t = hl32_to_64 (w0[0], w0[1]);
73   u64x w1_t = hl32_to_64 (w0[2], w0[3]);
74   u64x w2_t = hl32_to_64 (w1[0], w1[1]);
75   u64x w3_t = hl32_to_64 (w1[2], w1[3]);
76   u64x w4_t = hl32_to_64 (w2[0], w2[1]);
77   u64x w5_t = hl32_to_64 (w2[2], w2[3]);
78   u64x w6_t = hl32_to_64 (w3[0], w3[1]);
79   u64x w7_t = 0;
80   u64x w8_t = 0;
81   u64x w9_t = 0;
82   u64x wa_t = 0;
83   u64x wb_t = 0;
84   u64x wc_t = 0;
85   u64x wd_t = 0;
86   u64x we_t = 0;
87   u64x wf_t = hl32_to_64 (w3[2], w3[3]);
88
89   u64x a = digest[0];
90   u64x b = digest[1];
91   u64x c = digest[2];
92   u64x d = digest[3];
93   u64x e = digest[4];
94   u64x f = digest[5];
95   u64x g = digest[6];
96   u64x h = digest[7];
97
98   #define ROUND_EXPAND()                            \
99   {                                                 \
100     w0_t = SHA512_EXPAND (we_t, w9_t, w1_t, w0_t);  \
101     w1_t = SHA512_EXPAND (wf_t, wa_t, w2_t, w1_t);  \
102     w2_t = SHA512_EXPAND (w0_t, wb_t, w3_t, w2_t);  \
103     w3_t = SHA512_EXPAND (w1_t, wc_t, w4_t, w3_t);  \
104     w4_t = SHA512_EXPAND (w2_t, wd_t, w5_t, w4_t);  \
105     w5_t = SHA512_EXPAND (w3_t, we_t, w6_t, w5_t);  \
106     w6_t = SHA512_EXPAND (w4_t, wf_t, w7_t, w6_t);  \
107     w7_t = SHA512_EXPAND (w5_t, w0_t, w8_t, w7_t);  \
108     w8_t = SHA512_EXPAND (w6_t, w1_t, w9_t, w8_t);  \
109     w9_t = SHA512_EXPAND (w7_t, w2_t, wa_t, w9_t);  \
110     wa_t = SHA512_EXPAND (w8_t, w3_t, wb_t, wa_t);  \
111     wb_t = SHA512_EXPAND (w9_t, w4_t, wc_t, wb_t);  \
112     wc_t = SHA512_EXPAND (wa_t, w5_t, wd_t, wc_t);  \
113     wd_t = SHA512_EXPAND (wb_t, w6_t, we_t, wd_t);  \
114     we_t = SHA512_EXPAND (wc_t, w7_t, wf_t, we_t);  \
115     wf_t = SHA512_EXPAND (wd_t, w8_t, w0_t, wf_t);  \
116   }
117
118   #define ROUND_STEP(i)                                                                   \
119   {                                                                                       \
120     SHA512_STEP (SHA512_F0o, SHA512_F1o, a, b, c, d, e, f, g, h, w0_t, k_sha512[i +  0]); \
121     SHA512_STEP (SHA512_F0o, SHA512_F1o, h, a, b, c, d, e, f, g, w1_t, k_sha512[i +  1]); \
122     SHA512_STEP (SHA512_F0o, SHA512_F1o, g, h, a, b, c, d, e, f, w2_t, k_sha512[i +  2]); \
123     SHA512_STEP (SHA512_F0o, SHA512_F1o, f, g, h, a, b, c, d, e, w3_t, k_sha512[i +  3]); \
124     SHA512_STEP (SHA512_F0o, SHA512_F1o, e, f, g, h, a, b, c, d, w4_t, k_sha512[i +  4]); \
125     SHA512_STEP (SHA512_F0o, SHA512_F1o, d, e, f, g, h, a, b, c, w5_t, k_sha512[i +  5]); \
126     SHA512_STEP (SHA512_F0o, SHA512_F1o, c, d, e, f, g, h, a, b, w6_t, k_sha512[i +  6]); \
127     SHA512_STEP (SHA512_F0o, SHA512_F1o, b, c, d, e, f, g, h, a, w7_t, k_sha512[i +  7]); \
128     SHA512_STEP (SHA512_F0o, SHA512_F1o, a, b, c, d, e, f, g, h, w8_t, k_sha512[i +  8]); \
129     SHA512_STEP (SHA512_F0o, SHA512_F1o, h, a, b, c, d, e, f, g, w9_t, k_sha512[i +  9]); \
130     SHA512_STEP (SHA512_F0o, SHA512_F1o, g, h, a, b, c, d, e, f, wa_t, k_sha512[i + 10]); \
131     SHA512_STEP (SHA512_F0o, SHA512_F1o, f, g, h, a, b, c, d, e, wb_t, k_sha512[i + 11]); \
132     SHA512_STEP (SHA512_F0o, SHA512_F1o, e, f, g, h, a, b, c, d, wc_t, k_sha512[i + 12]); \
133     SHA512_STEP (SHA512_F0o, SHA512_F1o, d, e, f, g, h, a, b, c, wd_t, k_sha512[i + 13]); \
134     SHA512_STEP (SHA512_F0o, SHA512_F1o, c, d, e, f, g, h, a, b, we_t, k_sha512[i + 14]); \
135     SHA512_STEP (SHA512_F0o, SHA512_F1o, b, c, d, e, f, g, h, a, wf_t, k_sha512[i + 15]); \
136   }
137
138   ROUND_STEP (0);
139
140   for (int i = 16; i < 80; i += 16)
141   {
142     ROUND_EXPAND (); ROUND_STEP (i);
143   }
144
145   /* rev
146   digest[0] += a;
147   digest[1] += b;
148   digest[2] += c;
149   digest[3] += d;
150   digest[4] += e;
151   digest[5] += f;
152   digest[6] += g;
153   digest[7] += h;
154   */
155
156   digest[0] = a;
157   digest[1] = b;
158   digest[2] = c;
159   digest[3] = d;
160   digest[4] = e;
161   digest[5] = f;
162   digest[6] = g;
163   digest[7] = h;
164 }
165
166 __device__ static void m01730m (u32 w[16], const u32 pw_len, const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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)
167 {
168   /**
169    * modifier
170    */
171
172   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
173   const u32 lid = threadIdx.x;
174
175   /**
176    * salt
177    */
178
179   u32 salt_buf0[4];
180
181   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
182   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
183   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
184   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
185
186   u32 salt_buf1[4];
187
188   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
189   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
190   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
191   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
192
193   u32 salt_buf2[4];
194
195   salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
196   salt_buf2[1] = 0;
197   salt_buf2[2] = 0;
198   salt_buf2[3] = 0;
199
200   u32 salt_buf3[4];
201
202   salt_buf3[0] = 0;
203   salt_buf3[1] = 0;
204   salt_buf3[2] = 0;
205   salt_buf3[3] = 0;
206
207   switch_buffer_by_offset (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len);
208
209   w[ 0] |= swap_workaround (salt_buf0[0]);
210   w[ 1] |= swap_workaround (salt_buf0[1]);
211   w[ 2] |= swap_workaround (salt_buf0[2]);
212   w[ 3] |= swap_workaround (salt_buf0[3]);
213   w[ 4] |= swap_workaround (salt_buf1[0]);
214   w[ 5] |= swap_workaround (salt_buf1[1]);
215   w[ 6] |= swap_workaround (salt_buf1[2]);
216   w[ 7] |= swap_workaround (salt_buf1[3]);
217   w[ 8] |= swap_workaround (salt_buf2[0]);
218   w[ 9] |= swap_workaround (salt_buf2[1]);
219   w[10] |= swap_workaround (salt_buf2[2]);
220   w[11] |= swap_workaround (salt_buf2[3]);
221   w[12] |= swap_workaround (salt_buf3[0]);
222   w[13] |= swap_workaround (salt_buf3[1]);
223   w[14] |= swap_workaround (salt_buf3[2]);
224   w[15] |= swap_workaround (salt_buf3[3]);
225
226   const u32 salt_len = salt_bufs[salt_pos].salt_len;
227
228   const u32 pw_salt_len = pw_len + salt_len;
229
230   w[15] = pw_salt_len * 8;
231
232  /**
233    * loop
234    */
235
236   const u32 bf_loops = ceil ((float) bfs_cnt / VECT_DIV);
237
238   u32x w0l = w[0];
239
240   for (u32 il_pos = 0; il_pos < bf_loops; il_pos++)
241   {
242     const u32x w0r = c_bfs[il_pos];
243
244     const u32x w0 = w0l | w0r;
245
246
247     u32x w0_t[4];
248     u32x w1_t[4];
249     u32x w2_t[4];
250     u32x w3_t[4];
251
252     w0_t[0] = w0;
253     w0_t[1] = w[ 1];
254     w0_t[2] = w[ 2];
255     w0_t[3] = w[ 3];
256     w1_t[0] = w[ 4];
257     w1_t[1] = w[ 5];
258     w1_t[2] = w[ 6];
259     w1_t[3] = w[ 7];
260     w2_t[0] = w[ 8];
261     w2_t[1] = w[ 9];
262     w2_t[2] = w[10];
263     w2_t[3] = w[11];
264     w3_t[0] = w[12];
265     w3_t[1] = w[13];
266     w3_t[2] = w[14];
267     w3_t[3] = w[15];
268
269     u64x digest[8];
270
271     digest[0] = SHA512M_A;
272     digest[1] = SHA512M_B;
273     digest[2] = SHA512M_C;
274     digest[3] = SHA512M_D;
275     digest[4] = SHA512M_E;
276     digest[5] = SHA512M_F;
277     digest[6] = SHA512M_G;
278     digest[7] = SHA512M_H;
279
280     sha512_transform (w0_t, w1_t, w2_t, w3_t, digest);
281
282
283     const u32x r0 = l32_from_64 (digest[7]);
284     const u32x r1 = h32_from_64 (digest[7]);
285     const u32x r2 = l32_from_64 (digest[3]);
286     const u32x r3 = h32_from_64 (digest[3]);
287
288     #include VECT_COMPARE_M
289   }
290 }
291
292 __device__ static void m01730s (u32 w[16], const u32 pw_len, const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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)
293 {
294   /**
295    * modifier
296    */
297
298   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
299   const u32 lid = threadIdx.x;
300
301   /**
302    * digest
303    */
304
305   const u32 search[4] =
306   {
307     digests_buf[digests_offset].digest_buf[DGST_R0],
308     digests_buf[digests_offset].digest_buf[DGST_R1],
309     digests_buf[digests_offset].digest_buf[DGST_R2],
310     digests_buf[digests_offset].digest_buf[DGST_R3]
311   };
312
313   /**
314    * loop
315    */
316
317   const u32 bf_loops = ceil ((float) bfs_cnt / VECT_DIV);
318
319   u32x w0l = w[0];
320
321   for (u32 il_pos = 0; il_pos < bf_loops; il_pos++)
322   {
323     const u32x w0r = c_bfs[il_pos];
324
325     const u32x w0 = w0l | w0r;
326
327     u32x w0_t[4];
328     u32x w1_t[4];
329     u32x w2_t[4];
330     u32x w3_t[4];
331
332     w0_t[0] = w0;
333     w0_t[1] = w[ 1];
334     w0_t[2] = w[ 2];
335     w0_t[3] = w[ 3];
336     w1_t[0] = w[ 4];
337     w1_t[1] = w[ 5];
338     w1_t[2] = w[ 6];
339     w1_t[3] = w[ 7];
340     w2_t[0] = w[ 8];
341     w2_t[1] = w[ 9];
342     w2_t[2] = w[10];
343     w2_t[3] = w[11];
344     w3_t[0] = w[12];
345     w3_t[1] = w[13];
346     w3_t[2] = w[14];
347     w3_t[3] = w[15];
348
349     u64x digest[8];
350
351     digest[0] = SHA512M_A;
352     digest[1] = SHA512M_B;
353     digest[2] = SHA512M_C;
354     digest[3] = SHA512M_D;
355     digest[4] = SHA512M_E;
356     digest[5] = SHA512M_F;
357     digest[6] = SHA512M_G;
358     digest[7] = SHA512M_H;
359
360     sha512_transform (w0_t, w1_t, w2_t, w3_t, digest);
361
362
363     const u32x r0 = l32_from_64 (digest[7]);
364     const u32x r1 = h32_from_64 (digest[7]);
365     const u32x r2 = l32_from_64 (digest[3]);
366     const u32x r3 = h32_from_64 (digest[3]);
367
368     #include VECT_COMPARE_S
369   }
370 }
371
372 extern "C" __global__ void __launch_bounds__ (256, 1) m01730_m04 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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   u32 w[16];
383
384   w[ 0] = pws[gid].i[ 0];
385   w[ 1] = pws[gid].i[ 1];
386   w[ 2] = pws[gid].i[ 2];
387   w[ 3] = pws[gid].i[ 3];
388   w[ 4] = 0;
389   w[ 5] = 0;
390   w[ 6] = 0;
391   w[ 7] = 0;
392   w[ 8] = 0;
393   w[ 9] = 0;
394   w[10] = 0;
395   w[11] = 0;
396   w[12] = 0;
397   w[13] = 0;
398   w[14] = 0;
399   w[15] = pws[gid].i[15];
400
401   const u32 pw_len = pws[gid].pw_len;
402
403   /**
404    * main
405    */
406
407   m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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);
408 }
409
410 extern "C" __global__ void __launch_bounds__ (256, 1) m01730_m08 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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)
411 {
412   /**
413    * base
414    */
415
416   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
417
418   if (gid >= gid_max) return;
419
420   u32 w[16];
421
422   w[ 0] = pws[gid].i[ 0];
423   w[ 1] = pws[gid].i[ 1];
424   w[ 2] = pws[gid].i[ 2];
425   w[ 3] = pws[gid].i[ 3];
426   w[ 4] = pws[gid].i[ 4];
427   w[ 5] = pws[gid].i[ 5];
428   w[ 6] = pws[gid].i[ 6];
429   w[ 7] = pws[gid].i[ 7];
430   w[ 8] = 0;
431   w[ 9] = 0;
432   w[10] = 0;
433   w[11] = 0;
434   w[12] = 0;
435   w[13] = 0;
436   w[14] = 0;
437   w[15] = pws[gid].i[15];
438
439   const u32 pw_len = pws[gid].pw_len;
440
441   /**
442    * main
443    */
444
445   m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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);
446 }
447
448 extern "C" __global__ void __launch_bounds__ (256, 1) m01730_m16 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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)
449 {
450   /**
451    * base
452    */
453
454   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
455
456   if (gid >= gid_max) return;
457
458   u32 w[16];
459
460   w[ 0] = pws[gid].i[ 0];
461   w[ 1] = pws[gid].i[ 1];
462   w[ 2] = pws[gid].i[ 2];
463   w[ 3] = pws[gid].i[ 3];
464   w[ 4] = pws[gid].i[ 4];
465   w[ 5] = pws[gid].i[ 5];
466   w[ 6] = pws[gid].i[ 6];
467   w[ 7] = pws[gid].i[ 7];
468   w[ 8] = pws[gid].i[ 8];
469   w[ 9] = pws[gid].i[ 9];
470   w[10] = pws[gid].i[10];
471   w[11] = pws[gid].i[11];
472   w[12] = pws[gid].i[12];
473   w[13] = pws[gid].i[13];
474   w[14] = pws[gid].i[14];
475   w[15] = pws[gid].i[15];
476
477   const u32 pw_len = pws[gid].pw_len;
478
479   /**
480    * main
481    */
482
483   m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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);
484 }
485
486 extern "C" __global__ void __launch_bounds__ (256, 1) m01730_s04 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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)
487 {
488   /**
489    * base
490    */
491
492   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
493
494   if (gid >= gid_max) return;
495
496   u32 w[16];
497
498   w[ 0] = pws[gid].i[ 0];
499   w[ 1] = pws[gid].i[ 1];
500   w[ 2] = pws[gid].i[ 2];
501   w[ 3] = pws[gid].i[ 3];
502   w[ 4] = 0;
503   w[ 5] = 0;
504   w[ 6] = 0;
505   w[ 7] = 0;
506   w[ 8] = 0;
507   w[ 9] = 0;
508   w[10] = 0;
509   w[11] = 0;
510   w[12] = 0;
511   w[13] = 0;
512   w[14] = 0;
513   w[15] = pws[gid].i[15];
514
515   const u32 pw_len = pws[gid].pw_len;
516
517   /**
518    * main
519    */
520
521   m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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);
522 }
523
524 extern "C" __global__ void __launch_bounds__ (256, 1) m01730_s08 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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)
525 {
526   /**
527    * base
528    */
529
530   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
531
532   if (gid >= gid_max) return;
533
534   u32 w[16];
535
536   w[ 0] = pws[gid].i[ 0];
537   w[ 1] = pws[gid].i[ 1];
538   w[ 2] = pws[gid].i[ 2];
539   w[ 3] = pws[gid].i[ 3];
540   w[ 4] = pws[gid].i[ 4];
541   w[ 5] = pws[gid].i[ 5];
542   w[ 6] = pws[gid].i[ 6];
543   w[ 7] = pws[gid].i[ 7];
544   w[ 8] = 0;
545   w[ 9] = 0;
546   w[10] = 0;
547   w[11] = 0;
548   w[12] = 0;
549   w[13] = 0;
550   w[14] = 0;
551   w[15] = pws[gid].i[15];
552
553   const u32 pw_len = pws[gid].pw_len;
554
555   /**
556    * main
557    */
558
559   m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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);
560 }
561
562 extern "C" __global__ void __launch_bounds__ (256, 1) m01730_s16 (const pw_t *pws, const gpu_rule_t *rules_buf, const comb_t *combs_buf, const u32x *words_buf_r, 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)
563 {
564   /**
565    * base
566    */
567
568   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
569
570   if (gid >= gid_max) return;
571
572   u32 w[16];
573
574   w[ 0] = pws[gid].i[ 0];
575   w[ 1] = pws[gid].i[ 1];
576   w[ 2] = pws[gid].i[ 2];
577   w[ 3] = pws[gid].i[ 3];
578   w[ 4] = pws[gid].i[ 4];
579   w[ 5] = pws[gid].i[ 5];
580   w[ 6] = pws[gid].i[ 6];
581   w[ 7] = pws[gid].i[ 7];
582   w[ 8] = pws[gid].i[ 8];
583   w[ 9] = pws[gid].i[ 9];
584   w[10] = pws[gid].i[10];
585   w[11] = pws[gid].i[11];
586   w[12] = pws[gid].i[12];
587   w[13] = pws[gid].i[13];
588   w[14] = pws[gid].i[14];
589   w[15] = pws[gid].i[15];
590
591   const u32 pw_len = pws[gid].pw_len;
592
593   /**
594    * main
595    */
596
597   m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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);
598 }