Initial commit
[hashcat.git] / nv / m00140_a1.cu
1 /**
2  * Author......: Jens Steube <jens.steube@gmail.com>
3  * License.....: MIT
4  */
5
6 #define _SHA1_
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 3
20 #define DGST_R1 4
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__ comb_t c_combs[1024];
44
45 extern "C" __global__ void __launch_bounds__ (256, 1) m00140_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
46 {
47   /**
48    * modifier
49    */
50
51   const u32 lid = threadIdx.x;
52
53   /**
54    * base
55    */
56
57   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
58
59   if (gid >= gid_max) return;
60
61   u32x wordl0[4];
62
63   wordl0[0] = pws[gid].i[ 0];
64   wordl0[1] = pws[gid].i[ 1];
65   wordl0[2] = pws[gid].i[ 2];
66   wordl0[3] = pws[gid].i[ 3];
67
68   u32x wordl1[4];
69
70   wordl1[0] = pws[gid].i[ 4];
71   wordl1[1] = pws[gid].i[ 5];
72   wordl1[2] = pws[gid].i[ 6];
73   wordl1[3] = pws[gid].i[ 7];
74
75   u32x wordl2[4];
76
77   wordl2[0] = 0;
78   wordl2[1] = 0;
79   wordl2[2] = 0;
80   wordl2[3] = 0;
81
82   u32x wordl3[4];
83
84   wordl3[0] = 0;
85   wordl3[1] = 0;
86   wordl3[2] = 0;
87   wordl3[3] = 0;
88
89   const u32 pw_l_len = pws[gid].pw_len;
90
91   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
92   {
93     switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
94   }
95
96   /**
97    * salt
98    */
99
100   u32 salt_buf0[4];
101
102   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
103   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
104   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
105   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
106
107   u32 salt_buf1[4];
108
109   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
110   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
111   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6];
112   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7];
113
114   const u32 salt_len = salt_bufs[salt_pos].salt_len;
115
116   /**
117    * loop
118    */
119
120   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
121   {
122     const u32 pw_r_len = c_combs[il_pos].pw_len;
123
124     const u32 pw_len = pw_l_len + pw_r_len;
125
126     u32 wordr0[4];
127
128     wordr0[0] = c_combs[il_pos].i[0];
129     wordr0[1] = c_combs[il_pos].i[1];
130     wordr0[2] = c_combs[il_pos].i[2];
131     wordr0[3] = c_combs[il_pos].i[3];
132
133     u32 wordr1[4];
134
135     wordr1[0] = c_combs[il_pos].i[4];
136     wordr1[1] = c_combs[il_pos].i[5];
137     wordr1[2] = c_combs[il_pos].i[6];
138     wordr1[3] = c_combs[il_pos].i[7];
139
140     u32 wordr2[4];
141
142     wordr2[0] = 0;
143     wordr2[1] = 0;
144     wordr2[2] = 0;
145     wordr2[3] = 0;
146
147     u32 wordr3[4];
148
149     wordr3[0] = 0;
150     wordr3[1] = 0;
151     wordr3[2] = 0;
152     wordr3[3] = 0;
153
154     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
155     {
156       switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
157     }
158
159     /**
160      * prepend salt
161      */
162
163     const u32 pw_salt_len = (pw_len * 2) + salt_len;
164
165     u32x w0[4];
166     u32x w1[4];
167     u32x w2[4];
168     u32x w3[4];
169
170     w0[0] = wordl0[0] | wordr0[0];
171     w0[1] = wordl0[1] | wordr0[1];
172     w0[2] = wordl0[2] | wordr0[2];
173     w0[3] = wordl0[3] | wordr0[3];
174     w1[0] = wordl1[0] | wordr1[0];
175     w1[1] = wordl1[1] | wordr1[1];
176     w1[2] = wordl1[2] | wordr1[2];
177     w1[3] = wordl1[3] | wordr1[3];
178     w2[0] = 0;
179     w2[1] = 0;
180     w2[2] = 0;
181     w2[3] = 0;
182     w3[0] = 0;
183     w3[1] = 0;
184     w3[2] = 0;
185     w3[3] = 0;
186
187     u32x w0_t[4];
188     u32x w1_t[4];
189     u32x w2_t[4];
190     u32x w3_t[4];
191
192     make_unicode (w0, w0_t, w1_t);
193     make_unicode (w1, w2_t, w3_t);
194
195     switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
196
197     w0_t[0] |= salt_buf0[0];
198     w0_t[1] |= salt_buf0[1];
199     w0_t[2] |= salt_buf0[2];
200     w0_t[3] |= salt_buf0[3];
201     w1_t[0] |= salt_buf1[0];
202     w1_t[1] |= salt_buf1[1];
203     w1_t[2] |= salt_buf1[2];
204     w1_t[3] |= salt_buf1[3];
205
206     append_0x80_4 (w0_t, w1_t, w2_t, w3_t, pw_salt_len);
207
208     w3_t[3] = pw_salt_len * 8;
209
210     /**
211      * sha1
212      */
213
214     w0_t[0] = swap_workaround (w0_t[0]);
215     w0_t[1] = swap_workaround (w0_t[1]);
216     w0_t[2] = swap_workaround (w0_t[2]);
217     w0_t[3] = swap_workaround (w0_t[3]);
218     w1_t[0] = swap_workaround (w1_t[0]);
219     w1_t[1] = swap_workaround (w1_t[1]);
220     w1_t[2] = swap_workaround (w1_t[2]);
221     w1_t[3] = swap_workaround (w1_t[3]);
222     w2_t[0] = swap_workaround (w2_t[0]);
223     w2_t[1] = swap_workaround (w2_t[1]);
224     w2_t[2] = swap_workaround (w2_t[2]);
225     w2_t[3] = swap_workaround (w2_t[3]);
226     w3_t[0] = swap_workaround (w3_t[0]);
227     w3_t[1] = swap_workaround (w3_t[1]);
228     //w3_t[2] = swap_workaround (w3_t[2]);
229     //w3_t[3] = swap_workaround (w3_t[3]);
230
231     u32x a = SHA1M_A;
232     u32x b = SHA1M_B;
233     u32x c = SHA1M_C;
234     u32x d = SHA1M_D;
235     u32x e = SHA1M_E;
236
237     #undef K
238     #define K SHA1C00
239
240     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t[0]);
241     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t[1]);
242     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w0_t[2]);
243     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w0_t[3]);
244     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w1_t[0]);
245     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w1_t[1]);
246     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t[2]);
247     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t[3]);
248     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t[0]);
249     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w2_t[1]);
250     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w2_t[2]);
251     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w2_t[3]);
252     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w3_t[0]);
253     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t[1]);
254     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t[2]);
255     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w3_t[3]);
256     w0_t[0] = rotl32 ((w3_t[1] ^ w2_t[0] ^ w0_t[2] ^ w0_t[0]), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t[0]);
257     w0_t[1] = rotl32 ((w3_t[2] ^ w2_t[1] ^ w0_t[3] ^ w0_t[1]), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w0_t[1]);
258     w0_t[2] = rotl32 ((w3_t[3] ^ w2_t[2] ^ w1_t[0] ^ w0_t[2]), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w0_t[2]);
259     w0_t[3] = rotl32 ((w0_t[0] ^ w2_t[3] ^ w1_t[1] ^ w0_t[3]), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w0_t[3]);
260
261     #undef K
262     #define K SHA1C01
263
264     w1_t[0] = rotl32 ((w0_t[1] ^ w3_t[0] ^ w1_t[2] ^ w1_t[0]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t[0]);
265     w1_t[1] = rotl32 ((w0_t[2] ^ w3_t[1] ^ w1_t[3] ^ w1_t[1]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w1_t[1]);
266     w1_t[2] = rotl32 ((w0_t[3] ^ w3_t[2] ^ w2_t[0] ^ w1_t[2]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w1_t[2]);
267     w1_t[3] = rotl32 ((w1_t[0] ^ w3_t[3] ^ w2_t[1] ^ w1_t[3]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t[3]);
268     w2_t[0] = rotl32 ((w1_t[1] ^ w0_t[0] ^ w2_t[2] ^ w2_t[0]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t[0]);
269     w2_t[1] = rotl32 ((w1_t[2] ^ w0_t[1] ^ w2_t[3] ^ w2_t[1]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w2_t[1]);
270     w2_t[2] = rotl32 ((w1_t[3] ^ w0_t[2] ^ w3_t[0] ^ w2_t[2]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t[2]);
271     w2_t[3] = rotl32 ((w2_t[0] ^ w0_t[3] ^ w3_t[1] ^ w2_t[3]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w2_t[3]);
272     w3_t[0] = rotl32 ((w2_t[1] ^ w1_t[0] ^ w3_t[2] ^ w3_t[0]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w3_t[0]);
273     w3_t[1] = rotl32 ((w2_t[2] ^ w1_t[1] ^ w3_t[3] ^ w3_t[1]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w3_t[1]);
274     w3_t[2] = rotl32 ((w2_t[3] ^ w1_t[2] ^ w0_t[0] ^ w3_t[2]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t[2]);
275     w3_t[3] = rotl32 ((w3_t[0] ^ w1_t[3] ^ w0_t[1] ^ w3_t[3]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w3_t[3]);
276     w0_t[0] = rotl32 ((w3_t[1] ^ w2_t[0] ^ w0_t[2] ^ w0_t[0]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t[0]);
277     w0_t[1] = rotl32 ((w3_t[2] ^ w2_t[1] ^ w0_t[3] ^ w0_t[1]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w0_t[1]);
278     w0_t[2] = rotl32 ((w3_t[3] ^ w2_t[2] ^ w1_t[0] ^ w0_t[2]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t[2]);
279     w0_t[3] = rotl32 ((w0_t[0] ^ w2_t[3] ^ w1_t[1] ^ w0_t[3]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w0_t[3]);
280     w1_t[0] = rotl32 ((w0_t[1] ^ w3_t[0] ^ w1_t[2] ^ w1_t[0]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w1_t[0]);
281     w1_t[1] = rotl32 ((w0_t[2] ^ w3_t[1] ^ w1_t[3] ^ w1_t[1]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w1_t[1]);
282     w1_t[2] = rotl32 ((w0_t[3] ^ w3_t[2] ^ w2_t[0] ^ w1_t[2]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t[2]);
283     w1_t[3] = rotl32 ((w1_t[0] ^ w3_t[3] ^ w2_t[1] ^ w1_t[3]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w1_t[3]);
284
285     #undef K
286     #define K SHA1C02
287
288     w2_t[0] = rotl32 ((w1_t[1] ^ w0_t[0] ^ w2_t[2] ^ w2_t[0]), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t[0]);
289     w2_t[1] = rotl32 ((w1_t[2] ^ w0_t[1] ^ w2_t[3] ^ w2_t[1]), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w2_t[1]);
290     w2_t[2] = rotl32 ((w1_t[3] ^ w0_t[2] ^ w3_t[0] ^ w2_t[2]), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w2_t[2]);
291     w2_t[3] = rotl32 ((w2_t[0] ^ w0_t[3] ^ w3_t[1] ^ w2_t[3]), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w2_t[3]);
292     w3_t[0] = rotl32 ((w2_t[1] ^ w1_t[0] ^ w3_t[2] ^ w3_t[0]), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w3_t[0]);
293     w3_t[1] = rotl32 ((w2_t[2] ^ w1_t[1] ^ w3_t[3] ^ w3_t[1]), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w3_t[1]);
294     w3_t[2] = rotl32 ((w2_t[3] ^ w1_t[2] ^ w0_t[0] ^ w3_t[2]), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t[2]);
295     w3_t[3] = rotl32 ((w3_t[0] ^ w1_t[3] ^ w0_t[1] ^ w3_t[3]), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w3_t[3]);
296     w0_t[0] = rotl32 ((w3_t[1] ^ w2_t[0] ^ w0_t[2] ^ w0_t[0]), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t[0]);
297     w0_t[1] = rotl32 ((w3_t[2] ^ w2_t[1] ^ w0_t[3] ^ w0_t[1]), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w0_t[1]);
298     w0_t[2] = rotl32 ((w3_t[3] ^ w2_t[2] ^ w1_t[0] ^ w0_t[2]), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w0_t[2]);
299     w0_t[3] = rotl32 ((w0_t[0] ^ w2_t[3] ^ w1_t[1] ^ w0_t[3]), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w0_t[3]);
300     w1_t[0] = rotl32 ((w0_t[1] ^ w3_t[0] ^ w1_t[2] ^ w1_t[0]), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w1_t[0]);
301     w1_t[1] = rotl32 ((w0_t[2] ^ w3_t[1] ^ w1_t[3] ^ w1_t[1]), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w1_t[1]);
302     w1_t[2] = rotl32 ((w0_t[3] ^ w3_t[2] ^ w2_t[0] ^ w1_t[2]), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t[2]);
303     w1_t[3] = rotl32 ((w1_t[0] ^ w3_t[3] ^ w2_t[1] ^ w1_t[3]), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w1_t[3]);
304     w2_t[0] = rotl32 ((w1_t[1] ^ w0_t[0] ^ w2_t[2] ^ w2_t[0]), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w2_t[0]);
305     w2_t[1] = rotl32 ((w1_t[2] ^ w0_t[1] ^ w2_t[3] ^ w2_t[1]), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w2_t[1]);
306     w2_t[2] = rotl32 ((w1_t[3] ^ w0_t[2] ^ w3_t[0] ^ w2_t[2]), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w2_t[2]);
307     w2_t[3] = rotl32 ((w2_t[0] ^ w0_t[3] ^ w3_t[1] ^ w2_t[3]), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w2_t[3]);
308
309     #undef K
310     #define K SHA1C03
311
312     w3_t[0] = rotl32 ((w2_t[1] ^ w1_t[0] ^ w3_t[2] ^ w3_t[0]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t[0]);
313     w3_t[1] = rotl32 ((w2_t[2] ^ w1_t[1] ^ w3_t[3] ^ w3_t[1]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w3_t[1]);
314     w3_t[2] = rotl32 ((w2_t[3] ^ w1_t[2] ^ w0_t[0] ^ w3_t[2]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t[2]);
315     w3_t[3] = rotl32 ((w3_t[0] ^ w1_t[3] ^ w0_t[1] ^ w3_t[3]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w3_t[3]);
316     w0_t[0] = rotl32 ((w3_t[1] ^ w2_t[0] ^ w0_t[2] ^ w0_t[0]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t[0]);
317     w0_t[1] = rotl32 ((w3_t[2] ^ w2_t[1] ^ w0_t[3] ^ w0_t[1]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w0_t[1]);
318     w0_t[2] = rotl32 ((w3_t[3] ^ w2_t[2] ^ w1_t[0] ^ w0_t[2]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w0_t[2]);
319     w0_t[3] = rotl32 ((w0_t[0] ^ w2_t[3] ^ w1_t[1] ^ w0_t[3]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t[3]);
320     w1_t[0] = rotl32 ((w0_t[1] ^ w3_t[0] ^ w1_t[2] ^ w1_t[0]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t[0]);
321     w1_t[1] = rotl32 ((w0_t[2] ^ w3_t[1] ^ w1_t[3] ^ w1_t[1]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w1_t[1]);
322     w1_t[2] = rotl32 ((w0_t[3] ^ w3_t[2] ^ w2_t[0] ^ w1_t[2]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t[2]);
323     w1_t[3] = rotl32 ((w1_t[0] ^ w3_t[3] ^ w2_t[1] ^ w1_t[3]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w1_t[3]);
324     w2_t[0] = rotl32 ((w1_t[1] ^ w0_t[0] ^ w2_t[2] ^ w2_t[0]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w2_t[0]);
325     w2_t[1] = rotl32 ((w1_t[2] ^ w0_t[1] ^ w2_t[3] ^ w2_t[1]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w2_t[1]);
326     w2_t[2] = rotl32 ((w1_t[3] ^ w0_t[2] ^ w3_t[0] ^ w2_t[2]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t[2]);
327     w2_t[3] = rotl32 ((w2_t[0] ^ w0_t[3] ^ w3_t[1] ^ w2_t[3]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w2_t[3]);
328     w3_t[0] = rotl32 ((w2_t[1] ^ w1_t[0] ^ w3_t[2] ^ w3_t[0]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w3_t[0]);
329     w3_t[1] = rotl32 ((w2_t[2] ^ w1_t[1] ^ w3_t[3] ^ w3_t[1]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t[1]);
330     w3_t[2] = rotl32 ((w2_t[3] ^ w1_t[2] ^ w0_t[0] ^ w3_t[2]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w3_t[2]);
331     w3_t[3] = rotl32 ((w3_t[0] ^ w1_t[3] ^ w0_t[1] ^ w3_t[3]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w3_t[3]);
332
333
334     const u32x r0 = d;
335     const u32x r1 = e;
336     const u32x r2 = c;
337     const u32x r3 = b;
338
339     #include VECT_COMPARE_M
340   }
341 }
342
343 extern "C" __global__ void __launch_bounds__ (256, 1) m00140_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
344 {
345 }
346
347 extern "C" __global__ void __launch_bounds__ (256, 1) m00140_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
348 {
349 }
350
351 extern "C" __global__ void __launch_bounds__ (256, 1) m00140_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
352 {
353   /**
354    * modifier
355    */
356
357   const u32 lid = threadIdx.x;
358
359   /**
360    * base
361    */
362
363   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
364
365   if (gid >= gid_max) return;
366
367   u32x wordl0[4];
368
369   wordl0[0] = pws[gid].i[ 0];
370   wordl0[1] = pws[gid].i[ 1];
371   wordl0[2] = pws[gid].i[ 2];
372   wordl0[3] = pws[gid].i[ 3];
373
374   u32x wordl1[4];
375
376   wordl1[0] = pws[gid].i[ 4];
377   wordl1[1] = pws[gid].i[ 5];
378   wordl1[2] = pws[gid].i[ 6];
379   wordl1[3] = pws[gid].i[ 7];
380
381   u32x wordl2[4];
382
383   wordl2[0] = 0;
384   wordl2[1] = 0;
385   wordl2[2] = 0;
386   wordl2[3] = 0;
387
388   u32x wordl3[4];
389
390   wordl3[0] = 0;
391   wordl3[1] = 0;
392   wordl3[2] = 0;
393   wordl3[3] = 0;
394
395   const u32 pw_l_len = pws[gid].pw_len;
396
397   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
398   {
399     switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
400   }
401
402   /**
403    * salt
404    */
405
406   u32 salt_buf0[4];
407
408   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
409   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
410   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
411   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
412
413   u32 salt_buf1[4];
414
415   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
416   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
417   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6];
418   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7];
419
420   const u32 salt_len = salt_bufs[salt_pos].salt_len;
421
422   /**
423    * digest
424    */
425
426   const u32 search[4] =
427   {
428     digests_buf[digests_offset].digest_buf[DGST_R0],
429     digests_buf[digests_offset].digest_buf[DGST_R1],
430     digests_buf[digests_offset].digest_buf[DGST_R2],
431     digests_buf[digests_offset].digest_buf[DGST_R3]
432   };
433
434   /**
435    * reverse
436    */
437
438   const u32 e_rev = rotl32 (search[1], 2u);
439
440   /**
441    * loop
442    */
443
444   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
445   {
446     const u32 pw_r_len = c_combs[il_pos].pw_len;
447
448     const u32 pw_len = pw_l_len + pw_r_len;
449
450     u32 wordr0[4];
451
452     wordr0[0] = c_combs[il_pos].i[0];
453     wordr0[1] = c_combs[il_pos].i[1];
454     wordr0[2] = c_combs[il_pos].i[2];
455     wordr0[3] = c_combs[il_pos].i[3];
456
457     u32 wordr1[4];
458
459     wordr1[0] = c_combs[il_pos].i[4];
460     wordr1[1] = c_combs[il_pos].i[5];
461     wordr1[2] = c_combs[il_pos].i[6];
462     wordr1[3] = c_combs[il_pos].i[7];
463
464     u32 wordr2[4];
465
466     wordr2[0] = 0;
467     wordr2[1] = 0;
468     wordr2[2] = 0;
469     wordr2[3] = 0;
470
471     u32 wordr3[4];
472
473     wordr3[0] = 0;
474     wordr3[1] = 0;
475     wordr3[2] = 0;
476     wordr3[3] = 0;
477
478     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
479     {
480       switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
481     }
482
483     /**
484      * prepend salt
485      */
486
487     const u32 pw_salt_len = (pw_len * 2) + salt_len;
488
489     u32x w0[4];
490     u32x w1[4];
491     u32x w2[4];
492     u32x w3[4];
493
494     w0[0] = wordl0[0] | wordr0[0];
495     w0[1] = wordl0[1] | wordr0[1];
496     w0[2] = wordl0[2] | wordr0[2];
497     w0[3] = wordl0[3] | wordr0[3];
498     w1[0] = wordl1[0] | wordr1[0];
499     w1[1] = wordl1[1] | wordr1[1];
500     w1[2] = wordl1[2] | wordr1[2];
501     w1[3] = wordl1[3] | wordr1[3];
502     w2[0] = 0;
503     w2[1] = 0;
504     w2[2] = 0;
505     w2[3] = 0;
506     w3[0] = 0;
507     w3[1] = 0;
508     w3[2] = 0;
509     w3[3] = 0;
510
511     u32x w0_t[4];
512     u32x w1_t[4];
513     u32x w2_t[4];
514     u32x w3_t[4];
515
516     make_unicode (w0, w0_t, w1_t);
517     make_unicode (w1, w2_t, w3_t);
518
519     switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
520
521     w0_t[0] |= salt_buf0[0];
522     w0_t[1] |= salt_buf0[1];
523     w0_t[2] |= salt_buf0[2];
524     w0_t[3] |= salt_buf0[3];
525     w1_t[0] |= salt_buf1[0];
526     w1_t[1] |= salt_buf1[1];
527     w1_t[2] |= salt_buf1[2];
528     w1_t[3] |= salt_buf1[3];
529
530     append_0x80_4 (w0_t, w1_t, w2_t, w3_t, pw_salt_len);
531
532     w3_t[3] = pw_salt_len * 8;
533
534     /**
535      * sha1
536      */
537
538     w0_t[0] = swap_workaround (w0_t[0]);
539     w0_t[1] = swap_workaround (w0_t[1]);
540     w0_t[2] = swap_workaround (w0_t[2]);
541     w0_t[3] = swap_workaround (w0_t[3]);
542     w1_t[0] = swap_workaround (w1_t[0]);
543     w1_t[1] = swap_workaround (w1_t[1]);
544     w1_t[2] = swap_workaround (w1_t[2]);
545     w1_t[3] = swap_workaround (w1_t[3]);
546     w2_t[0] = swap_workaround (w2_t[0]);
547     w2_t[1] = swap_workaround (w2_t[1]);
548     w2_t[2] = swap_workaround (w2_t[2]);
549     w2_t[3] = swap_workaround (w2_t[3]);
550     w3_t[0] = swap_workaround (w3_t[0]);
551     w3_t[1] = swap_workaround (w3_t[1]);
552     //w3_t[2] = swap_workaround (w3_t[2]);
553     //w3_t[3] = swap_workaround (w3_t[3]);
554
555     u32x a = SHA1M_A;
556     u32x b = SHA1M_B;
557     u32x c = SHA1M_C;
558     u32x d = SHA1M_D;
559     u32x e = SHA1M_E;
560
561     #undef K
562     #define K SHA1C00
563
564     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t[0]);
565     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t[1]);
566     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w0_t[2]);
567     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w0_t[3]);
568     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w1_t[0]);
569     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w1_t[1]);
570     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t[2]);
571     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t[3]);
572     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t[0]);
573     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w2_t[1]);
574     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w2_t[2]);
575     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w2_t[3]);
576     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w3_t[0]);
577     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t[1]);
578     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t[2]);
579     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w3_t[3]);
580     w0_t[0] = rotl32 ((w3_t[1] ^ w2_t[0] ^ w0_t[2] ^ w0_t[0]), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t[0]);
581     w0_t[1] = rotl32 ((w3_t[2] ^ w2_t[1] ^ w0_t[3] ^ w0_t[1]), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w0_t[1]);
582     w0_t[2] = rotl32 ((w3_t[3] ^ w2_t[2] ^ w1_t[0] ^ w0_t[2]), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w0_t[2]);
583     w0_t[3] = rotl32 ((w0_t[0] ^ w2_t[3] ^ w1_t[1] ^ w0_t[3]), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w0_t[3]);
584
585     #undef K
586     #define K SHA1C01
587
588     w1_t[0] = rotl32 ((w0_t[1] ^ w3_t[0] ^ w1_t[2] ^ w1_t[0]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t[0]);
589     w1_t[1] = rotl32 ((w0_t[2] ^ w3_t[1] ^ w1_t[3] ^ w1_t[1]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w1_t[1]);
590     w1_t[2] = rotl32 ((w0_t[3] ^ w3_t[2] ^ w2_t[0] ^ w1_t[2]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w1_t[2]);
591     w1_t[3] = rotl32 ((w1_t[0] ^ w3_t[3] ^ w2_t[1] ^ w1_t[3]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t[3]);
592     w2_t[0] = rotl32 ((w1_t[1] ^ w0_t[0] ^ w2_t[2] ^ w2_t[0]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t[0]);
593     w2_t[1] = rotl32 ((w1_t[2] ^ w0_t[1] ^ w2_t[3] ^ w2_t[1]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w2_t[1]);
594     w2_t[2] = rotl32 ((w1_t[3] ^ w0_t[2] ^ w3_t[0] ^ w2_t[2]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t[2]);
595     w2_t[3] = rotl32 ((w2_t[0] ^ w0_t[3] ^ w3_t[1] ^ w2_t[3]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w2_t[3]);
596     w3_t[0] = rotl32 ((w2_t[1] ^ w1_t[0] ^ w3_t[2] ^ w3_t[0]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w3_t[0]);
597     w3_t[1] = rotl32 ((w2_t[2] ^ w1_t[1] ^ w3_t[3] ^ w3_t[1]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w3_t[1]);
598     w3_t[2] = rotl32 ((w2_t[3] ^ w1_t[2] ^ w0_t[0] ^ w3_t[2]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t[2]);
599     w3_t[3] = rotl32 ((w3_t[0] ^ w1_t[3] ^ w0_t[1] ^ w3_t[3]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w3_t[3]);
600     w0_t[0] = rotl32 ((w3_t[1] ^ w2_t[0] ^ w0_t[2] ^ w0_t[0]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t[0]);
601     w0_t[1] = rotl32 ((w3_t[2] ^ w2_t[1] ^ w0_t[3] ^ w0_t[1]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w0_t[1]);
602     w0_t[2] = rotl32 ((w3_t[3] ^ w2_t[2] ^ w1_t[0] ^ w0_t[2]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t[2]);
603     w0_t[3] = rotl32 ((w0_t[0] ^ w2_t[3] ^ w1_t[1] ^ w0_t[3]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w0_t[3]);
604     w1_t[0] = rotl32 ((w0_t[1] ^ w3_t[0] ^ w1_t[2] ^ w1_t[0]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w1_t[0]);
605     w1_t[1] = rotl32 ((w0_t[2] ^ w3_t[1] ^ w1_t[3] ^ w1_t[1]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w1_t[1]);
606     w1_t[2] = rotl32 ((w0_t[3] ^ w3_t[2] ^ w2_t[0] ^ w1_t[2]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t[2]);
607     w1_t[3] = rotl32 ((w1_t[0] ^ w3_t[3] ^ w2_t[1] ^ w1_t[3]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w1_t[3]);
608
609     #undef K
610     #define K SHA1C02
611
612     w2_t[0] = rotl32 ((w1_t[1] ^ w0_t[0] ^ w2_t[2] ^ w2_t[0]), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t[0]);
613     w2_t[1] = rotl32 ((w1_t[2] ^ w0_t[1] ^ w2_t[3] ^ w2_t[1]), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w2_t[1]);
614     w2_t[2] = rotl32 ((w1_t[3] ^ w0_t[2] ^ w3_t[0] ^ w2_t[2]), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w2_t[2]);
615     w2_t[3] = rotl32 ((w2_t[0] ^ w0_t[3] ^ w3_t[1] ^ w2_t[3]), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w2_t[3]);
616     w3_t[0] = rotl32 ((w2_t[1] ^ w1_t[0] ^ w3_t[2] ^ w3_t[0]), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w3_t[0]);
617     w3_t[1] = rotl32 ((w2_t[2] ^ w1_t[1] ^ w3_t[3] ^ w3_t[1]), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w3_t[1]);
618     w3_t[2] = rotl32 ((w2_t[3] ^ w1_t[2] ^ w0_t[0] ^ w3_t[2]), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t[2]);
619     w3_t[3] = rotl32 ((w3_t[0] ^ w1_t[3] ^ w0_t[1] ^ w3_t[3]), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w3_t[3]);
620     w0_t[0] = rotl32 ((w3_t[1] ^ w2_t[0] ^ w0_t[2] ^ w0_t[0]), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t[0]);
621     w0_t[1] = rotl32 ((w3_t[2] ^ w2_t[1] ^ w0_t[3] ^ w0_t[1]), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w0_t[1]);
622     w0_t[2] = rotl32 ((w3_t[3] ^ w2_t[2] ^ w1_t[0] ^ w0_t[2]), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w0_t[2]);
623     w0_t[3] = rotl32 ((w0_t[0] ^ w2_t[3] ^ w1_t[1] ^ w0_t[3]), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w0_t[3]);
624     w1_t[0] = rotl32 ((w0_t[1] ^ w3_t[0] ^ w1_t[2] ^ w1_t[0]), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w1_t[0]);
625     w1_t[1] = rotl32 ((w0_t[2] ^ w3_t[1] ^ w1_t[3] ^ w1_t[1]), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w1_t[1]);
626     w1_t[2] = rotl32 ((w0_t[3] ^ w3_t[2] ^ w2_t[0] ^ w1_t[2]), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t[2]);
627     w1_t[3] = rotl32 ((w1_t[0] ^ w3_t[3] ^ w2_t[1] ^ w1_t[3]), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w1_t[3]);
628     w2_t[0] = rotl32 ((w1_t[1] ^ w0_t[0] ^ w2_t[2] ^ w2_t[0]), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w2_t[0]);
629     w2_t[1] = rotl32 ((w1_t[2] ^ w0_t[1] ^ w2_t[3] ^ w2_t[1]), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w2_t[1]);
630     w2_t[2] = rotl32 ((w1_t[3] ^ w0_t[2] ^ w3_t[0] ^ w2_t[2]), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w2_t[2]);
631     w2_t[3] = rotl32 ((w2_t[0] ^ w0_t[3] ^ w3_t[1] ^ w2_t[3]), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w2_t[3]);
632
633     #undef K
634     #define K SHA1C03
635
636     w3_t[0] = rotl32 ((w2_t[1] ^ w1_t[0] ^ w3_t[2] ^ w3_t[0]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t[0]);
637     w3_t[1] = rotl32 ((w2_t[2] ^ w1_t[1] ^ w3_t[3] ^ w3_t[1]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w3_t[1]);
638     w3_t[2] = rotl32 ((w2_t[3] ^ w1_t[2] ^ w0_t[0] ^ w3_t[2]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t[2]);
639     w3_t[3] = rotl32 ((w3_t[0] ^ w1_t[3] ^ w0_t[1] ^ w3_t[3]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w3_t[3]);
640     w0_t[0] = rotl32 ((w3_t[1] ^ w2_t[0] ^ w0_t[2] ^ w0_t[0]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t[0]);
641     w0_t[1] = rotl32 ((w3_t[2] ^ w2_t[1] ^ w0_t[3] ^ w0_t[1]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w0_t[1]);
642     w0_t[2] = rotl32 ((w3_t[3] ^ w2_t[2] ^ w1_t[0] ^ w0_t[2]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w0_t[2]);
643     w0_t[3] = rotl32 ((w0_t[0] ^ w2_t[3] ^ w1_t[1] ^ w0_t[3]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t[3]);
644     w1_t[0] = rotl32 ((w0_t[1] ^ w3_t[0] ^ w1_t[2] ^ w1_t[0]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t[0]);
645     w1_t[1] = rotl32 ((w0_t[2] ^ w3_t[1] ^ w1_t[3] ^ w1_t[1]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w1_t[1]);
646     w1_t[2] = rotl32 ((w0_t[3] ^ w3_t[2] ^ w2_t[0] ^ w1_t[2]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t[2]);
647     w1_t[3] = rotl32 ((w1_t[0] ^ w3_t[3] ^ w2_t[1] ^ w1_t[3]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w1_t[3]);
648     w2_t[0] = rotl32 ((w1_t[1] ^ w0_t[0] ^ w2_t[2] ^ w2_t[0]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w2_t[0]);
649     w2_t[1] = rotl32 ((w1_t[2] ^ w0_t[1] ^ w2_t[3] ^ w2_t[1]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w2_t[1]);
650     w2_t[2] = rotl32 ((w1_t[3] ^ w0_t[2] ^ w3_t[0] ^ w2_t[2]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t[2]);
651     w2_t[3] = rotl32 ((w2_t[0] ^ w0_t[3] ^ w3_t[1] ^ w2_t[3]), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w2_t[3]);
652     w3_t[0] = rotl32 ((w2_t[1] ^ w1_t[0] ^ w3_t[2] ^ w3_t[0]), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w3_t[0]);
653
654     if (e != e_rev) continue;
655
656     w3_t[1] = rotl32 ((w2_t[2] ^ w1_t[1] ^ w3_t[3] ^ w3_t[1]), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t[1]);
657     w3_t[2] = rotl32 ((w2_t[3] ^ w1_t[2] ^ w0_t[0] ^ w3_t[2]), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w3_t[2]);
658     w3_t[3] = rotl32 ((w3_t[0] ^ w1_t[3] ^ w0_t[1] ^ w3_t[3]), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w3_t[3]);
659
660
661     const u32x r0 = d;
662     const u32x r1 = e;
663     const u32x r2 = c;
664     const u32x r3 = b;
665
666     #include VECT_COMPARE_S
667   }
668 }
669
670 extern "C" __global__ void __launch_bounds__ (256, 1) m00140_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
671 {
672 }
673
674 extern "C" __global__ void __launch_bounds__ (256, 1) m00140_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
675 {
676 }