Initial commit
[hashcat.git] / nv / m00190_a3.cu
1 /**
2  * Author......: Jens Steube <jens.steube@gmail.com>
3  * License.....: MIT
4  */
5
6 #define _SHA1_
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_SIZE4
18 #endif
19
20 #define DGST_R0 0
21 #define DGST_R1 4
22 #define DGST_R2 3
23 #define DGST_R3 2
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__ static void m00190m (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)
47 {
48   /**
49    * modifier
50    */
51
52   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
53   const u32 lid = threadIdx.x;
54
55   /**
56    * base
57    */
58
59   const u32 c_16s = rotl32 ((w[13] ^ w[ 8] ^ w[ 2]        ), 1u);
60   const u32 c_17s = rotl32 ((w[14] ^ w[ 9] ^ w[ 3] ^ w[ 1]), 1u);
61   const u32 c_18s = rotl32 ((w[15] ^ w[10] ^ w[ 4] ^ w[ 2]), 1u);
62   const u32 c_19s = rotl32 ((c_16s ^ w[11] ^ w[ 5] ^ w[ 3]), 1u);
63   const u32 c_20s = rotl32 ((c_17s ^ w[12] ^ w[ 6] ^ w[ 4]), 1u);
64   const u32 c_21s = rotl32 ((c_18s ^ w[13] ^ w[ 7] ^ w[ 5]), 1u);
65   const u32 c_22s = rotl32 ((c_19s ^ w[14] ^ w[ 8] ^ w[ 6]), 1u);
66   const u32 c_23s = rotl32 ((c_20s ^ w[15] ^ w[ 9] ^ w[ 7]), 1u);
67   const u32 c_24s = rotl32 ((c_21s ^ c_16s ^ w[10] ^ w[ 8]), 1u);
68   const u32 c_25s = rotl32 ((c_22s ^ c_17s ^ w[11] ^ w[ 9]), 1u);
69   const u32 c_26s = rotl32 ((c_23s ^ c_18s ^ w[12] ^ w[10]), 1u);
70   const u32 c_27s = rotl32 ((c_24s ^ c_19s ^ w[13] ^ w[11]), 1u);
71   const u32 c_28s = rotl32 ((c_25s ^ c_20s ^ w[14] ^ w[12]), 1u);
72   const u32 c_29s = rotl32 ((c_26s ^ c_21s ^ w[15] ^ w[13]), 1u);
73   const u32 c_30s = rotl32 ((c_27s ^ c_22s ^ c_16s ^ w[14]), 1u);
74   const u32 c_31s = rotl32 ((c_28s ^ c_23s ^ c_17s ^ w[15]), 1u);
75   const u32 c_32s = rotl32 ((c_29s ^ c_24s ^ c_18s ^ c_16s), 1u);
76   const u32 c_33s = rotl32 ((c_30s ^ c_25s ^ c_19s ^ c_17s), 1u);
77   const u32 c_34s = rotl32 ((c_31s ^ c_26s ^ c_20s ^ c_18s), 1u);
78   const u32 c_35s = rotl32 ((c_32s ^ c_27s ^ c_21s ^ c_19s), 1u);
79   const u32 c_36s = rotl32 ((c_33s ^ c_28s ^ c_22s ^ c_20s), 1u);
80   const u32 c_37s = rotl32 ((c_34s ^ c_29s ^ c_23s ^ c_21s), 1u);
81   const u32 c_38s = rotl32 ((c_35s ^ c_30s ^ c_24s ^ c_22s), 1u);
82   const u32 c_39s = rotl32 ((c_36s ^ c_31s ^ c_25s ^ c_23s), 1u);
83   const u32 c_40s = rotl32 ((c_37s ^ c_32s ^ c_26s ^ c_24s), 1u);
84   const u32 c_41s = rotl32 ((c_38s ^ c_33s ^ c_27s ^ c_25s), 1u);
85   const u32 c_42s = rotl32 ((c_39s ^ c_34s ^ c_28s ^ c_26s), 1u);
86   const u32 c_43s = rotl32 ((c_40s ^ c_35s ^ c_29s ^ c_27s), 1u);
87   const u32 c_44s = rotl32 ((c_41s ^ c_36s ^ c_30s ^ c_28s), 1u);
88   const u32 c_45s = rotl32 ((c_42s ^ c_37s ^ c_31s ^ c_29s), 1u);
89   const u32 c_46s = rotl32 ((c_43s ^ c_38s ^ c_32s ^ c_30s), 1u);
90   const u32 c_47s = rotl32 ((c_44s ^ c_39s ^ c_33s ^ c_31s), 1u);
91   const u32 c_48s = rotl32 ((c_45s ^ c_40s ^ c_34s ^ c_32s), 1u);
92   const u32 c_49s = rotl32 ((c_46s ^ c_41s ^ c_35s ^ c_33s), 1u);
93   const u32 c_50s = rotl32 ((c_47s ^ c_42s ^ c_36s ^ c_34s), 1u);
94   const u32 c_51s = rotl32 ((c_48s ^ c_43s ^ c_37s ^ c_35s), 1u);
95   const u32 c_52s = rotl32 ((c_49s ^ c_44s ^ c_38s ^ c_36s), 1u);
96   const u32 c_53s = rotl32 ((c_50s ^ c_45s ^ c_39s ^ c_37s), 1u);
97   const u32 c_54s = rotl32 ((c_51s ^ c_46s ^ c_40s ^ c_38s), 1u);
98   const u32 c_55s = rotl32 ((c_52s ^ c_47s ^ c_41s ^ c_39s), 1u);
99   const u32 c_56s = rotl32 ((c_53s ^ c_48s ^ c_42s ^ c_40s), 1u);
100   const u32 c_57s = rotl32 ((c_54s ^ c_49s ^ c_43s ^ c_41s), 1u);
101   const u32 c_58s = rotl32 ((c_55s ^ c_50s ^ c_44s ^ c_42s), 1u);
102   const u32 c_59s = rotl32 ((c_56s ^ c_51s ^ c_45s ^ c_43s), 1u);
103   const u32 c_60s = rotl32 ((c_57s ^ c_52s ^ c_46s ^ c_44s), 1u);
104   const u32 c_61s = rotl32 ((c_58s ^ c_53s ^ c_47s ^ c_45s), 1u);
105   const u32 c_62s = rotl32 ((c_59s ^ c_54s ^ c_48s ^ c_46s), 1u);
106   const u32 c_63s = rotl32 ((c_60s ^ c_55s ^ c_49s ^ c_47s), 1u);
107   const u32 c_64s = rotl32 ((c_61s ^ c_56s ^ c_50s ^ c_48s), 1u);
108   const u32 c_65s = rotl32 ((c_62s ^ c_57s ^ c_51s ^ c_49s), 1u);
109   const u32 c_66s = rotl32 ((c_63s ^ c_58s ^ c_52s ^ c_50s), 1u);
110   const u32 c_67s = rotl32 ((c_64s ^ c_59s ^ c_53s ^ c_51s), 1u);
111   const u32 c_68s = rotl32 ((c_65s ^ c_60s ^ c_54s ^ c_52s), 1u);
112   const u32 c_69s = rotl32 ((c_66s ^ c_61s ^ c_55s ^ c_53s), 1u);
113   const u32 c_70s = rotl32 ((c_67s ^ c_62s ^ c_56s ^ c_54s), 1u);
114   const u32 c_71s = rotl32 ((c_68s ^ c_63s ^ c_57s ^ c_55s), 1u);
115   const u32 c_72s = rotl32 ((c_69s ^ c_64s ^ c_58s ^ c_56s), 1u);
116   const u32 c_73s = rotl32 ((c_70s ^ c_65s ^ c_59s ^ c_57s), 1u);
117   const u32 c_74s = rotl32 ((c_71s ^ c_66s ^ c_60s ^ c_58s), 1u);
118   const u32 c_75s = rotl32 ((c_72s ^ c_67s ^ c_61s ^ c_59s), 1u);
119   const u32 c_76s = rotl32 ((c_73s ^ c_68s ^ c_62s ^ c_60s), 1u);
120   const u32 c_77s = rotl32 ((c_74s ^ c_69s ^ c_63s ^ c_61s), 1u);
121   const u32 c_78s = rotl32 ((c_75s ^ c_70s ^ c_64s ^ c_62s), 1u);
122   const u32 c_79s = rotl32 ((c_76s ^ c_71s ^ c_65s ^ c_63s), 1u);
123
124   const u32 c_17sK = c_17s + SHA1C00;
125   const u32 c_18sK = c_18s + SHA1C00;
126   const u32 c_20sK = c_20s + SHA1C01;
127   const u32 c_21sK = c_21s + SHA1C01;
128   const u32 c_23sK = c_23s + SHA1C01;
129   const u32 c_26sK = c_26s + SHA1C01;
130   const u32 c_27sK = c_27s + SHA1C01;
131   const u32 c_29sK = c_29s + SHA1C01;
132   const u32 c_33sK = c_33s + SHA1C01;
133   const u32 c_39sK = c_39s + SHA1C01;
134   const u32 c_41sK = c_41s + SHA1C02;
135   const u32 c_45sK = c_45s + SHA1C02;
136   const u32 c_53sK = c_53s + SHA1C02;
137   const u32 c_65sK = c_65s + SHA1C03;
138   const u32 c_69sK = c_69s + SHA1C03;
139
140   const u32 w1 = w[ 1] + SHA1C00;
141   const u32 w2 = w[ 2] + SHA1C00;
142   const u32 w3 = w[ 3] + SHA1C00;
143   const u32 w4 = w[ 4] + SHA1C00;
144   const u32 w5 = w[ 5] + SHA1C00;
145   const u32 w6 = w[ 6] + SHA1C00;
146   const u32 w7 = w[ 7] + SHA1C00;
147   const u32 w8 = w[ 8] + SHA1C00;
148   const u32 w9 = w[ 9] + SHA1C00;
149   const u32 wa = w[10] + SHA1C00;
150   const u32 wb = w[11] + SHA1C00;
151   const u32 wc = w[12] + SHA1C00;
152   const u32 wd = w[13] + SHA1C00;
153   const u32 we = w[14] + SHA1C00;
154   const u32 wf = w[15] + SHA1C00;
155
156  /**
157    * loop
158    */
159
160   const u32 bf_loops = ceil ((float) bfs_cnt / VECT_DIV);
161
162   u32x w0l = w[0];
163
164   for (u32 il_pos = 0; il_pos < bf_loops; il_pos++)
165   {
166     const u32x w0r = c_bfs[il_pos];
167
168     const u32x w0 = w0l | w0r;
169
170     const u32x w0s01 = rotl32 (w0, 1u);
171     const u32x w0s02 = rotl32 (w0, 2u);
172     const u32x w0s03 = rotl32 (w0, 3u);
173     const u32x w0s04 = rotl32 (w0, 4u);
174     const u32x w0s05 = rotl32 (w0, 5u);
175     const u32x w0s06 = rotl32 (w0, 6u);
176     const u32x w0s07 = rotl32 (w0, 7u);
177     const u32x w0s08 = rotl32 (w0, 8u);
178     const u32x w0s09 = rotl32 (w0, 9u);
179     const u32x w0s10 = rotl32 (w0, 10u);
180     const u32x w0s11 = rotl32 (w0, 11u);
181     const u32x w0s12 = rotl32 (w0, 12u);
182     const u32x w0s13 = rotl32 (w0, 13u);
183     const u32x w0s14 = rotl32 (w0, 14u);
184     const u32x w0s15 = rotl32 (w0, 15u);
185     const u32x w0s16 = rotl32 (w0, 16u);
186     const u32x w0s17 = rotl32 (w0, 17u);
187     const u32x w0s18 = rotl32 (w0, 18u);
188     const u32x w0s19 = rotl32 (w0, 19u);
189     const u32x w0s20 = rotl32 (w0, 20u);
190     const u32x w0s21 = rotl32 (w0, 21u);
191     const u32x w0s22 = rotl32 (w0, 22U);
192
193     const u32x w0s04___w0s06 = w0s04 ^ w0s06;
194     const u32x w0s04___w0s08 = w0s04 ^ w0s08;
195     const u32x w0s08___w0s12 = w0s08 ^ w0s12;
196     const u32x w0s04___w0s06___w0s07 = w0s04___w0s06 ^ w0s07;
197
198     u32x a = SHA1M_A;
199     u32x b = SHA1M_B;
200     u32x c = SHA1M_C;
201     u32x d = SHA1M_D;
202     u32x e = SHA1M_E;
203
204     #undef K
205     #define K SHA1C00
206
207     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0);
208     SHA1_STEPX(SHA1_F0o, e, a, b, c, d, w1);
209     SHA1_STEPX(SHA1_F0o, d, e, a, b, c, w2);
210     SHA1_STEPX(SHA1_F0o, c, d, e, a, b, w3);
211     SHA1_STEPX(SHA1_F0o, b, c, d, e, a, w4);
212     SHA1_STEPX(SHA1_F0o, a, b, c, d, e, w5);
213     SHA1_STEPX(SHA1_F0o, e, a, b, c, d, w6);
214     SHA1_STEPX(SHA1_F0o, d, e, a, b, c, w7);
215     SHA1_STEPX(SHA1_F0o, c, d, e, a, b, w8);
216     SHA1_STEPX(SHA1_F0o, b, c, d, e, a, w9);
217     SHA1_STEPX(SHA1_F0o, a, b, c, d, e, wa);
218     SHA1_STEPX(SHA1_F0o, e, a, b, c, d, wb);
219     SHA1_STEPX(SHA1_F0o, d, e, a, b, c, wc);
220     SHA1_STEPX(SHA1_F0o, c, d, e, a, b, wd);
221     SHA1_STEPX(SHA1_F0o, b, c, d, e, a, we);
222     SHA1_STEPX(SHA1_F0o, a, b, c, d, e, wf);
223
224     SHA1_STEP (SHA1_F0o, e, a, b, c, d, (c_16s ^ w0s01));
225     SHA1_STEPX(SHA1_F0o, d, e, a, b, c, (c_17sK));
226     SHA1_STEPX(SHA1_F0o, c, d, e, a, b, (c_18sK));
227     SHA1_STEP (SHA1_F0o, b, c, d, e, a, (c_19s ^ w0s02));
228
229     #undef K
230     #define K SHA1C01
231
232     SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_20sK));
233     SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_21sK));
234     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_22s ^ w0s03));
235     SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_23sK));
236     SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_24s ^ w0s02));
237     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_25s ^ w0s04));
238     SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_26sK));
239     SHA1_STEPX(SHA1_F1 , d, e, a, b, c, (c_27sK));
240     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_28s ^ w0s05));
241     SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_29sK));
242     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_30s ^ w0s02 ^ w0s04));
243     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_31s ^ w0s06));
244     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_32s ^ w0s02 ^ w0s03));
245     SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_33sK));
246     SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_34s ^ w0s07));
247     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_35s ^ w0s04));
248     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_36s ^ w0s04___w0s06));
249     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_37s ^ w0s08));
250     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_38s ^ w0s04));
251     SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_39sK));
252
253     #undef K
254     #define K SHA1C02
255
256     SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_40s ^ w0s04 ^ w0s09));
257     SHA1_STEPX(SHA1_F2o, e, a, b, c, d, (c_41sK));
258     SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_42s ^ w0s06 ^ w0s08));
259     SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_43s ^ w0s10));
260     SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_44s ^ w0s03 ^ w0s06 ^ w0s07));
261     SHA1_STEPX(SHA1_F2o, a, b, c, d, e, (c_45sK));
262     SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_46s ^ w0s04 ^ w0s11));
263     SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_47s ^ w0s04___w0s08));
264     SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_48s ^ w0s03 ^ w0s04___w0s08 ^ w0s05 ^ w0s10));
265     SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_49s ^ w0s12));
266     SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_50s ^ w0s08));
267     SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_51s ^ w0s04___w0s06));
268     SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_52s ^ w0s04___w0s08 ^ w0s13));
269     SHA1_STEPX(SHA1_F2o, c, d, e, a, b, (c_53sK));
270     SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_54s ^ w0s07 ^ w0s10 ^ w0s12));
271     SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_55s ^ w0s14));
272     SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_56s ^ w0s04___w0s06___w0s07 ^ w0s10 ^ w0s11));
273     SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_57s ^ w0s08));
274     SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_58s ^ w0s04___w0s08 ^ w0s15));
275     SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_59s ^ w0s08___w0s12));
276
277     #undef K
278     #define K SHA1C03
279
280     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_60s ^ w0s04 ^ w0s08___w0s12 ^ w0s07 ^ w0s14));
281     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_61s ^ w0s16));
282     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_62s ^ w0s04___w0s06 ^ w0s08___w0s12));
283     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_63s ^ w0s08));
284     SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_64s ^ w0s04___w0s06___w0s07 ^ w0s08___w0s12 ^ w0s17));
285     SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_65sK));
286     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_66s ^ w0s14 ^ w0s16));
287     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_67s ^ w0s08 ^ w0s18));
288     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_68s ^ w0s11 ^ w0s14 ^ w0s15));
289     SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_69sK));
290     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_70s ^ w0s12 ^ w0s19));
291     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_71s ^ w0s12 ^ w0s16));
292     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_72s ^ w0s05 ^ w0s11 ^ w0s12 ^ w0s13 ^ w0s16 ^ w0s18));
293     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_73s ^ w0s20));
294     SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_74s ^ w0s08 ^ w0s16));
295     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_75s ^ w0s06 ^ w0s12 ^ w0s14));
296     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_76s ^ w0s07 ^ w0s08___w0s12 ^ w0s16 ^ w0s21));
297     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_77s));
298     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_78s ^ w0s07 ^ w0s08 ^ w0s15 ^ w0s18 ^ w0s20));
299     SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_79s ^ w0s08 ^ w0s22));
300
301     a += SHA1M_A;
302     e += SHA1M_E;
303     d += SHA1M_D;
304     c += SHA1M_C;
305
306     {
307       const u32x r0 = a;
308       const u32x r1 = e;
309       const u32x r2 = d;
310       const u32x r3 = c;
311
312       #include VECT_COMPARE_M
313     }
314
315     a &= 0x00000fff;
316
317     {
318       const u32x r0 = a;
319       const u32x r1 = e;
320       const u32x r2 = d;
321       const u32x r3 = c;
322
323       #include VECT_COMPARE_M
324     }
325   }
326 }
327
328 __device__ static void m00190s (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)
329 {
330   /**
331    * modifier
332    */
333
334   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
335   const u32 lid = threadIdx.x;
336
337   /**
338    * base
339    */
340
341   const u32 c_16s = rotl32 ((w[13] ^ w[ 8] ^ w[ 2]        ), 1u);
342   const u32 c_17s = rotl32 ((w[14] ^ w[ 9] ^ w[ 3] ^ w[ 1]), 1u);
343   const u32 c_18s = rotl32 ((w[15] ^ w[10] ^ w[ 4] ^ w[ 2]), 1u);
344   const u32 c_19s = rotl32 ((c_16s ^ w[11] ^ w[ 5] ^ w[ 3]), 1u);
345   const u32 c_20s = rotl32 ((c_17s ^ w[12] ^ w[ 6] ^ w[ 4]), 1u);
346   const u32 c_21s = rotl32 ((c_18s ^ w[13] ^ w[ 7] ^ w[ 5]), 1u);
347   const u32 c_22s = rotl32 ((c_19s ^ w[14] ^ w[ 8] ^ w[ 6]), 1u);
348   const u32 c_23s = rotl32 ((c_20s ^ w[15] ^ w[ 9] ^ w[ 7]), 1u);
349   const u32 c_24s = rotl32 ((c_21s ^ c_16s ^ w[10] ^ w[ 8]), 1u);
350   const u32 c_25s = rotl32 ((c_22s ^ c_17s ^ w[11] ^ w[ 9]), 1u);
351   const u32 c_26s = rotl32 ((c_23s ^ c_18s ^ w[12] ^ w[10]), 1u);
352   const u32 c_27s = rotl32 ((c_24s ^ c_19s ^ w[13] ^ w[11]), 1u);
353   const u32 c_28s = rotl32 ((c_25s ^ c_20s ^ w[14] ^ w[12]), 1u);
354   const u32 c_29s = rotl32 ((c_26s ^ c_21s ^ w[15] ^ w[13]), 1u);
355   const u32 c_30s = rotl32 ((c_27s ^ c_22s ^ c_16s ^ w[14]), 1u);
356   const u32 c_31s = rotl32 ((c_28s ^ c_23s ^ c_17s ^ w[15]), 1u);
357   const u32 c_32s = rotl32 ((c_29s ^ c_24s ^ c_18s ^ c_16s), 1u);
358   const u32 c_33s = rotl32 ((c_30s ^ c_25s ^ c_19s ^ c_17s), 1u);
359   const u32 c_34s = rotl32 ((c_31s ^ c_26s ^ c_20s ^ c_18s), 1u);
360   const u32 c_35s = rotl32 ((c_32s ^ c_27s ^ c_21s ^ c_19s), 1u);
361   const u32 c_36s = rotl32 ((c_33s ^ c_28s ^ c_22s ^ c_20s), 1u);
362   const u32 c_37s = rotl32 ((c_34s ^ c_29s ^ c_23s ^ c_21s), 1u);
363   const u32 c_38s = rotl32 ((c_35s ^ c_30s ^ c_24s ^ c_22s), 1u);
364   const u32 c_39s = rotl32 ((c_36s ^ c_31s ^ c_25s ^ c_23s), 1u);
365   const u32 c_40s = rotl32 ((c_37s ^ c_32s ^ c_26s ^ c_24s), 1u);
366   const u32 c_41s = rotl32 ((c_38s ^ c_33s ^ c_27s ^ c_25s), 1u);
367   const u32 c_42s = rotl32 ((c_39s ^ c_34s ^ c_28s ^ c_26s), 1u);
368   const u32 c_43s = rotl32 ((c_40s ^ c_35s ^ c_29s ^ c_27s), 1u);
369   const u32 c_44s = rotl32 ((c_41s ^ c_36s ^ c_30s ^ c_28s), 1u);
370   const u32 c_45s = rotl32 ((c_42s ^ c_37s ^ c_31s ^ c_29s), 1u);
371   const u32 c_46s = rotl32 ((c_43s ^ c_38s ^ c_32s ^ c_30s), 1u);
372   const u32 c_47s = rotl32 ((c_44s ^ c_39s ^ c_33s ^ c_31s), 1u);
373   const u32 c_48s = rotl32 ((c_45s ^ c_40s ^ c_34s ^ c_32s), 1u);
374   const u32 c_49s = rotl32 ((c_46s ^ c_41s ^ c_35s ^ c_33s), 1u);
375   const u32 c_50s = rotl32 ((c_47s ^ c_42s ^ c_36s ^ c_34s), 1u);
376   const u32 c_51s = rotl32 ((c_48s ^ c_43s ^ c_37s ^ c_35s), 1u);
377   const u32 c_52s = rotl32 ((c_49s ^ c_44s ^ c_38s ^ c_36s), 1u);
378   const u32 c_53s = rotl32 ((c_50s ^ c_45s ^ c_39s ^ c_37s), 1u);
379   const u32 c_54s = rotl32 ((c_51s ^ c_46s ^ c_40s ^ c_38s), 1u);
380   const u32 c_55s = rotl32 ((c_52s ^ c_47s ^ c_41s ^ c_39s), 1u);
381   const u32 c_56s = rotl32 ((c_53s ^ c_48s ^ c_42s ^ c_40s), 1u);
382   const u32 c_57s = rotl32 ((c_54s ^ c_49s ^ c_43s ^ c_41s), 1u);
383   const u32 c_58s = rotl32 ((c_55s ^ c_50s ^ c_44s ^ c_42s), 1u);
384   const u32 c_59s = rotl32 ((c_56s ^ c_51s ^ c_45s ^ c_43s), 1u);
385   const u32 c_60s = rotl32 ((c_57s ^ c_52s ^ c_46s ^ c_44s), 1u);
386   const u32 c_61s = rotl32 ((c_58s ^ c_53s ^ c_47s ^ c_45s), 1u);
387   const u32 c_62s = rotl32 ((c_59s ^ c_54s ^ c_48s ^ c_46s), 1u);
388   const u32 c_63s = rotl32 ((c_60s ^ c_55s ^ c_49s ^ c_47s), 1u);
389   const u32 c_64s = rotl32 ((c_61s ^ c_56s ^ c_50s ^ c_48s), 1u);
390   const u32 c_65s = rotl32 ((c_62s ^ c_57s ^ c_51s ^ c_49s), 1u);
391   const u32 c_66s = rotl32 ((c_63s ^ c_58s ^ c_52s ^ c_50s), 1u);
392   const u32 c_67s = rotl32 ((c_64s ^ c_59s ^ c_53s ^ c_51s), 1u);
393   const u32 c_68s = rotl32 ((c_65s ^ c_60s ^ c_54s ^ c_52s), 1u);
394   const u32 c_69s = rotl32 ((c_66s ^ c_61s ^ c_55s ^ c_53s), 1u);
395   const u32 c_70s = rotl32 ((c_67s ^ c_62s ^ c_56s ^ c_54s), 1u);
396   const u32 c_71s = rotl32 ((c_68s ^ c_63s ^ c_57s ^ c_55s), 1u);
397   const u32 c_72s = rotl32 ((c_69s ^ c_64s ^ c_58s ^ c_56s), 1u);
398   const u32 c_73s = rotl32 ((c_70s ^ c_65s ^ c_59s ^ c_57s), 1u);
399   const u32 c_74s = rotl32 ((c_71s ^ c_66s ^ c_60s ^ c_58s), 1u);
400   const u32 c_75s = rotl32 ((c_72s ^ c_67s ^ c_61s ^ c_59s), 1u);
401
402   const u32 c_17sK = c_17s + SHA1C00;
403   const u32 c_18sK = c_18s + SHA1C00;
404   const u32 c_20sK = c_20s + SHA1C01;
405   const u32 c_21sK = c_21s + SHA1C01;
406   const u32 c_23sK = c_23s + SHA1C01;
407   const u32 c_26sK = c_26s + SHA1C01;
408   const u32 c_27sK = c_27s + SHA1C01;
409   const u32 c_29sK = c_29s + SHA1C01;
410   const u32 c_33sK = c_33s + SHA1C01;
411   const u32 c_39sK = c_39s + SHA1C01;
412   const u32 c_41sK = c_41s + SHA1C02;
413   const u32 c_45sK = c_45s + SHA1C02;
414   const u32 c_53sK = c_53s + SHA1C02;
415   const u32 c_65sK = c_65s + SHA1C03;
416   const u32 c_69sK = c_69s + SHA1C03;
417
418   const u32 w1 = w[ 1] + SHA1C00;
419   const u32 w2 = w[ 2] + SHA1C00;
420   const u32 w3 = w[ 3] + SHA1C00;
421   const u32 w4 = w[ 4] + SHA1C00;
422   const u32 w5 = w[ 5] + SHA1C00;
423   const u32 w6 = w[ 6] + SHA1C00;
424   const u32 w7 = w[ 7] + SHA1C00;
425   const u32 w8 = w[ 8] + SHA1C00;
426   const u32 w9 = w[ 9] + SHA1C00;
427   const u32 wa = w[10] + SHA1C00;
428   const u32 wb = w[11] + SHA1C00;
429   const u32 wc = w[12] + SHA1C00;
430   const u32 wd = w[13] + SHA1C00;
431   const u32 we = w[14] + SHA1C00;
432   const u32 wf = w[15] + SHA1C00;
433
434   /**
435    * digest
436    */
437
438   const u32 search[4] =
439   {
440     digests_buf[digests_offset].digest_buf[DGST_R0],
441     digests_buf[digests_offset].digest_buf[DGST_R1],
442     digests_buf[digests_offset].digest_buf[DGST_R2],
443     digests_buf[digests_offset].digest_buf[DGST_R3],
444   };
445
446  /**
447    * loop
448    */
449
450   const u32 bf_loops = ceil ((float) bfs_cnt / VECT_DIV);
451
452   u32x w0l = w[0];
453
454   for (u32 il_pos = 0; il_pos < bf_loops; il_pos++)
455   {
456     const u32x w0r = c_bfs[il_pos];
457
458     const u32x w0 = w0l | w0r;
459
460     const u32x w0s01 = rotl32 (w0, 1u);
461     const u32x w0s02 = rotl32 (w0, 2u);
462     const u32x w0s03 = rotl32 (w0, 3u);
463     const u32x w0s04 = rotl32 (w0, 4u);
464     const u32x w0s05 = rotl32 (w0, 5u);
465     const u32x w0s06 = rotl32 (w0, 6u);
466     const u32x w0s07 = rotl32 (w0, 7u);
467     const u32x w0s08 = rotl32 (w0, 8u);
468     const u32x w0s09 = rotl32 (w0, 9u);
469     const u32x w0s10 = rotl32 (w0, 10u);
470     const u32x w0s11 = rotl32 (w0, 11u);
471     const u32x w0s12 = rotl32 (w0, 12u);
472     const u32x w0s13 = rotl32 (w0, 13u);
473     const u32x w0s14 = rotl32 (w0, 14u);
474     const u32x w0s15 = rotl32 (w0, 15u);
475     const u32x w0s16 = rotl32 (w0, 16u);
476     const u32x w0s17 = rotl32 (w0, 17u);
477     const u32x w0s18 = rotl32 (w0, 18u);
478     const u32x w0s19 = rotl32 (w0, 19u);
479     const u32x w0s20 = rotl32 (w0, 20u);
480
481     const u32x w0s04___w0s06 = w0s04 ^ w0s06;
482     const u32x w0s04___w0s08 = w0s04 ^ w0s08;
483     const u32x w0s08___w0s12 = w0s08 ^ w0s12;
484     const u32x w0s04___w0s06___w0s07 = w0s04___w0s06 ^ w0s07;
485
486     u32x a = SHA1M_A;
487     u32x b = SHA1M_B;
488     u32x c = SHA1M_C;
489     u32x d = SHA1M_D;
490     u32x e = SHA1M_E;
491
492     #undef K
493     #define K SHA1C00
494
495     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0);
496     SHA1_STEPX(SHA1_F0o, e, a, b, c, d, w1);
497     SHA1_STEPX(SHA1_F0o, d, e, a, b, c, w2);
498     SHA1_STEPX(SHA1_F0o, c, d, e, a, b, w3);
499     SHA1_STEPX(SHA1_F0o, b, c, d, e, a, w4);
500     SHA1_STEPX(SHA1_F0o, a, b, c, d, e, w5);
501     SHA1_STEPX(SHA1_F0o, e, a, b, c, d, w6);
502     SHA1_STEPX(SHA1_F0o, d, e, a, b, c, w7);
503     SHA1_STEPX(SHA1_F0o, c, d, e, a, b, w8);
504     SHA1_STEPX(SHA1_F0o, b, c, d, e, a, w9);
505     SHA1_STEPX(SHA1_F0o, a, b, c, d, e, wa);
506     SHA1_STEPX(SHA1_F0o, e, a, b, c, d, wb);
507     SHA1_STEPX(SHA1_F0o, d, e, a, b, c, wc);
508     SHA1_STEPX(SHA1_F0o, c, d, e, a, b, wd);
509     SHA1_STEPX(SHA1_F0o, b, c, d, e, a, we);
510     SHA1_STEPX(SHA1_F0o, a, b, c, d, e, wf);
511
512     SHA1_STEP (SHA1_F0o, e, a, b, c, d, (c_16s ^ w0s01));
513     SHA1_STEPX(SHA1_F0o, d, e, a, b, c, (c_17sK));
514     SHA1_STEPX(SHA1_F0o, c, d, e, a, b, (c_18sK));
515     SHA1_STEP (SHA1_F0o, b, c, d, e, a, (c_19s ^ w0s02));
516
517     #undef K
518     #define K SHA1C01
519
520     SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_20sK));
521     SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_21sK));
522     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_22s ^ w0s03));
523     SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_23sK));
524     SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_24s ^ w0s02));
525     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_25s ^ w0s04));
526     SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_26sK));
527     SHA1_STEPX(SHA1_F1 , d, e, a, b, c, (c_27sK));
528     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_28s ^ w0s05));
529     SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_29sK));
530     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_30s ^ w0s02 ^ w0s04));
531     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_31s ^ w0s06));
532     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_32s ^ w0s02 ^ w0s03));
533     SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_33sK));
534     SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_34s ^ w0s07));
535     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_35s ^ w0s04));
536     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_36s ^ w0s04___w0s06));
537     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_37s ^ w0s08));
538     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_38s ^ w0s04));
539     SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_39sK));
540
541     #undef K
542     #define K SHA1C02
543
544     SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_40s ^ w0s04 ^ w0s09));
545     SHA1_STEPX(SHA1_F2o, e, a, b, c, d, (c_41sK));
546     SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_42s ^ w0s06 ^ w0s08));
547     SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_43s ^ w0s10));
548     SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_44s ^ w0s03 ^ w0s06 ^ w0s07));
549     SHA1_STEPX(SHA1_F2o, a, b, c, d, e, (c_45sK));
550     SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_46s ^ w0s04 ^ w0s11));
551     SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_47s ^ w0s04___w0s08));
552     SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_48s ^ w0s03 ^ w0s04___w0s08 ^ w0s05 ^ w0s10));
553     SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_49s ^ w0s12));
554     SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_50s ^ w0s08));
555     SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_51s ^ w0s04___w0s06));
556     SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_52s ^ w0s04___w0s08 ^ w0s13));
557     SHA1_STEPX(SHA1_F2o, c, d, e, a, b, (c_53sK));
558     SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_54s ^ w0s07 ^ w0s10 ^ w0s12));
559     SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_55s ^ w0s14));
560     SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_56s ^ w0s04___w0s06___w0s07 ^ w0s10 ^ w0s11));
561     SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_57s ^ w0s08));
562     SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_58s ^ w0s04___w0s08 ^ w0s15));
563     SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_59s ^ w0s08___w0s12));
564
565     #undef K
566     #define K SHA1C03
567
568     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_60s ^ w0s04 ^ w0s08___w0s12 ^ w0s07 ^ w0s14));
569     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_61s ^ w0s16));
570     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_62s ^ w0s04___w0s06 ^ w0s08___w0s12));
571     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_63s ^ w0s08));
572     SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_64s ^ w0s04___w0s06___w0s07 ^ w0s08___w0s12 ^ w0s17));
573     SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_65sK));
574     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_66s ^ w0s14 ^ w0s16));
575     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_67s ^ w0s08 ^ w0s18));
576     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_68s ^ w0s11 ^ w0s14 ^ w0s15));
577     SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_69sK));
578     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_70s ^ w0s12 ^ w0s19));
579     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_71s ^ w0s12 ^ w0s16));
580     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_72s ^ w0s05 ^ w0s11 ^ w0s12 ^ w0s13 ^ w0s16 ^ w0s18));
581     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_73s ^ w0s20));
582     SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_74s ^ w0s08 ^ w0s16));
583     SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_75s ^ w0s06 ^ w0s12 ^ w0s14));
584
585     const u32 c_76s = rotl32 ((c_73s ^ c_68s ^ c_62s ^ c_60s), 1u);
586     const u32 c_77s = rotl32 ((c_74s ^ c_69s ^ c_63s ^ c_61s), 1u);
587     const u32 c_78s = rotl32 ((c_75s ^ c_70s ^ c_64s ^ c_62s), 1u);
588     const u32 c_79s = rotl32 ((c_76s ^ c_71s ^ c_65s ^ c_63s), 1u);
589
590     const u32x w0s21 = rotl32 (w0, 21u);
591     const u32x w0s22 = rotl32 (w0, 22U);
592
593     SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_76s ^ w0s07 ^ w0s08___w0s12 ^ w0s16 ^ w0s21));
594     SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_77s));
595     SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_78s ^ w0s07 ^ w0s08 ^ w0s15 ^ w0s18 ^ w0s20));
596     SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_79s ^ w0s08 ^ w0s22));
597
598     a += SHA1M_A;
599     e += SHA1M_E;
600     d += SHA1M_D;
601     c += SHA1M_C;
602
603     {
604       const u32x r0 = a;
605       const u32x r1 = e;
606       const u32x r2 = d;
607       const u32x r3 = c;
608
609       #include VECT_COMPARE_S
610     }
611
612     a &= 0x00000fff;
613
614     {
615       const u32x r0 = a;
616       const u32x r1 = e;
617       const u32x r2 = d;
618       const u32x r3 = c;
619
620       #include VECT_COMPARE_S
621     }
622   }
623 }
624
625 extern "C" __global__ void __launch_bounds__ (256, 1) m00190_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)
626 {
627   /**
628    * base
629    */
630
631   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
632
633   if (gid >= gid_max) return;
634
635   u32 w[16];
636
637   w[ 0] = pws[gid].i[ 0];
638   w[ 1] = pws[gid].i[ 1];
639   w[ 2] = pws[gid].i[ 2];
640   w[ 3] = pws[gid].i[ 3];
641   w[ 4] = 0;
642   w[ 5] = 0;
643   w[ 6] = 0;
644   w[ 7] = 0;
645   w[ 8] = 0;
646   w[ 9] = 0;
647   w[10] = 0;
648   w[11] = 0;
649   w[12] = 0;
650   w[13] = 0;
651   w[14] = 0;
652   w[15] = pws[gid].i[15];
653
654   const u32 pw_len = pws[gid].pw_len;
655
656   /**
657    * main
658    */
659
660   m00190m (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);
661 }
662
663 extern "C" __global__ void __launch_bounds__ (256, 1) m00190_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)
664 {
665   /**
666    * base
667    */
668
669   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
670
671   if (gid >= gid_max) return;
672
673   u32 w[16];
674
675   w[ 0] = pws[gid].i[ 0];
676   w[ 1] = pws[gid].i[ 1];
677   w[ 2] = pws[gid].i[ 2];
678   w[ 3] = pws[gid].i[ 3];
679   w[ 4] = pws[gid].i[ 4];
680   w[ 5] = pws[gid].i[ 5];
681   w[ 6] = pws[gid].i[ 6];
682   w[ 7] = pws[gid].i[ 7];
683   w[ 8] = 0;
684   w[ 9] = 0;
685   w[10] = 0;
686   w[11] = 0;
687   w[12] = 0;
688   w[13] = 0;
689   w[14] = 0;
690   w[15] = pws[gid].i[15];
691
692   const u32 pw_len = pws[gid].pw_len;
693
694   /**
695    * main
696    */
697
698   m00190m (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);
699 }
700
701 extern "C" __global__ void __launch_bounds__ (256, 1) m00190_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)
702 {
703   /**
704    * base
705    */
706
707   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
708
709   if (gid >= gid_max) return;
710
711   u32 w[16];
712
713   w[ 0] = pws[gid].i[ 0];
714   w[ 1] = pws[gid].i[ 1];
715   w[ 2] = pws[gid].i[ 2];
716   w[ 3] = pws[gid].i[ 3];
717   w[ 4] = pws[gid].i[ 4];
718   w[ 5] = pws[gid].i[ 5];
719   w[ 6] = pws[gid].i[ 6];
720   w[ 7] = pws[gid].i[ 7];
721   w[ 8] = pws[gid].i[ 8];
722   w[ 9] = pws[gid].i[ 9];
723   w[10] = pws[gid].i[10];
724   w[11] = pws[gid].i[11];
725   w[12] = pws[gid].i[12];
726   w[13] = pws[gid].i[13];
727   w[14] = pws[gid].i[14];
728   w[15] = pws[gid].i[15];
729
730   const u32 pw_len = pws[gid].pw_len;
731
732   /**
733    * main
734    */
735
736   m00190m (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);
737 }
738
739 extern "C" __global__ void __launch_bounds__ (256, 1) m00190_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)
740 {
741   /**
742    * base
743    */
744
745   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
746
747   if (gid >= gid_max) return;
748
749   u32 w[16];
750
751   w[ 0] = pws[gid].i[ 0];
752   w[ 1] = pws[gid].i[ 1];
753   w[ 2] = pws[gid].i[ 2];
754   w[ 3] = pws[gid].i[ 3];
755   w[ 4] = 0;
756   w[ 5] = 0;
757   w[ 6] = 0;
758   w[ 7] = 0;
759   w[ 8] = 0;
760   w[ 9] = 0;
761   w[10] = 0;
762   w[11] = 0;
763   w[12] = 0;
764   w[13] = 0;
765   w[14] = 0;
766   w[15] = pws[gid].i[15];
767
768   const u32 pw_len = pws[gid].pw_len;
769
770   /**
771    * main
772    */
773
774   m00190s (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);
775 }
776
777 extern "C" __global__ void __launch_bounds__ (256, 1) m00190_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)
778 {
779   /**
780    * base
781    */
782
783   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
784
785   if (gid >= gid_max) return;
786
787   u32 w[16];
788
789   w[ 0] = pws[gid].i[ 0];
790   w[ 1] = pws[gid].i[ 1];
791   w[ 2] = pws[gid].i[ 2];
792   w[ 3] = pws[gid].i[ 3];
793   w[ 4] = pws[gid].i[ 4];
794   w[ 5] = pws[gid].i[ 5];
795   w[ 6] = pws[gid].i[ 6];
796   w[ 7] = pws[gid].i[ 7];
797   w[ 8] = 0;
798   w[ 9] = 0;
799   w[10] = 0;
800   w[11] = 0;
801   w[12] = 0;
802   w[13] = 0;
803   w[14] = 0;
804   w[15] = pws[gid].i[15];
805
806   const u32 pw_len = pws[gid].pw_len;
807
808   /**
809    * main
810    */
811
812   m00190s (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);
813 }
814
815 extern "C" __global__ void __launch_bounds__ (256, 1) m00190_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)
816 {
817   /**
818    * base
819    */
820
821   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
822
823   if (gid >= gid_max) return;
824
825   u32 w[16];
826
827   w[ 0] = pws[gid].i[ 0];
828   w[ 1] = pws[gid].i[ 1];
829   w[ 2] = pws[gid].i[ 2];
830   w[ 3] = pws[gid].i[ 3];
831   w[ 4] = pws[gid].i[ 4];
832   w[ 5] = pws[gid].i[ 5];
833   w[ 6] = pws[gid].i[ 6];
834   w[ 7] = pws[gid].i[ 7];
835   w[ 8] = pws[gid].i[ 8];
836   w[ 9] = pws[gid].i[ 9];
837   w[10] = pws[gid].i[10];
838   w[11] = pws[gid].i[11];
839   w[12] = pws[gid].i[12];
840   w[13] = pws[gid].i[13];
841   w[14] = pws[gid].i[14];
842   w[15] = pws[gid].i[15];
843
844   const u32 pw_len = pws[gid].pw_len;
845
846   /**
847    * main
848    */
849
850   m00190s (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);
851 }