Initial commit
[hashcat.git] / nv / m00130_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) m00130_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      * append salt
161      */
162
163     u32 s0[4];
164
165     s0[0] = salt_buf0[0];
166     s0[1] = salt_buf0[1];
167     s0[2] = salt_buf0[2];
168     s0[3] = salt_buf0[3];
169
170     u32 s1[4];
171
172     s1[0] = salt_buf1[0];
173     s1[1] = salt_buf1[1];
174     s1[2] = salt_buf1[2];
175     s1[3] = salt_buf1[3];
176
177     u32 s2[4];
178
179     s2[0] = 0;
180     s2[1] = 0;
181     s2[2] = 0;
182     s2[3] = 0;
183
184     u32 s3[4];
185
186     s3[0] = 0;
187     s3[1] = 0;
188     s3[2] = 0;
189     s3[3] = 0;
190
191     switch_buffer_by_offset (s0, s1, s2, s3, (pw_len * 2));
192
193     const u32 pw_salt_len = (pw_len * 2) + salt_len;
194
195     u32x w0[4];
196     u32x w1[4];
197     u32x w2[4];
198     u32x w3[4];
199
200     w0[0] = wordl0[0] | wordr0[0];
201     w0[1] = wordl0[1] | wordr0[1];
202     w0[2] = wordl0[2] | wordr0[2];
203     w0[3] = wordl0[3] | wordr0[3];
204     w1[0] = wordl1[0] | wordr1[0];
205     w1[1] = wordl1[1] | wordr1[1];
206     w1[2] = wordl1[2] | wordr1[2];
207     w1[3] = wordl1[3] | wordr1[3];
208     w2[0] = 0;
209     w2[1] = 0;
210     w2[2] = 0;
211     w2[3] = 0;
212     w3[0] = 0;
213     w3[1] = 0;
214     w3[2] = 0;
215     w3[3] = 0;
216
217     u32x w0_t[4];
218     u32x w1_t[4];
219     u32x w2_t[4];
220     u32x w3_t[4];
221
222     make_unicode (w0, w0_t, w1_t);
223     make_unicode (w1, w2_t, w3_t);
224
225     w0_t[0] |= s0[0];
226     w0_t[1] |= s0[1];
227     w0_t[2] |= s0[2];
228     w0_t[3] |= s0[3];
229     w1_t[0] |= s1[0];
230     w1_t[1] |= s1[1];
231     w1_t[2] |= s1[2];
232     w1_t[3] |= s1[3];
233     w2_t[0] |= s2[0];
234     w2_t[1] |= s2[1];
235     w2_t[2] |= s2[2];
236     w2_t[3] |= s2[3];
237     w3_t[0] |= s3[0];
238     w3_t[1] |= s3[1];
239     w3_t[2] |= s3[2];
240     w3_t[3] |= s3[3];
241
242     append_0x80_4 (w0_t, w1_t, w2_t, w3_t, pw_salt_len);
243
244     w3_t[3] = pw_salt_len * 8;
245
246     /**
247      * sha1
248      */
249
250     w0_t[0] = swap_workaround (w0_t[0]);
251     w0_t[1] = swap_workaround (w0_t[1]);
252     w0_t[2] = swap_workaround (w0_t[2]);
253     w0_t[3] = swap_workaround (w0_t[3]);
254     w1_t[0] = swap_workaround (w1_t[0]);
255     w1_t[1] = swap_workaround (w1_t[1]);
256     w1_t[2] = swap_workaround (w1_t[2]);
257     w1_t[3] = swap_workaround (w1_t[3]);
258     w2_t[0] = swap_workaround (w2_t[0]);
259     w2_t[1] = swap_workaround (w2_t[1]);
260     w2_t[2] = swap_workaround (w2_t[2]);
261     w2_t[3] = swap_workaround (w2_t[3]);
262     w3_t[0] = swap_workaround (w3_t[0]);
263     w3_t[1] = swap_workaround (w3_t[1]);
264     //w3_t[2] = swap_workaround (w3_t[2]);
265     //w3_t[3] = swap_workaround (w3_t[3]);
266
267     u32x a = SHA1M_A;
268     u32x b = SHA1M_B;
269     u32x c = SHA1M_C;
270     u32x d = SHA1M_D;
271     u32x e = SHA1M_E;
272
273     #undef K
274     #define K SHA1C00
275
276     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t[0]);
277     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t[1]);
278     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w0_t[2]);
279     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w0_t[3]);
280     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w1_t[0]);
281     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w1_t[1]);
282     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t[2]);
283     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t[3]);
284     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t[0]);
285     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w2_t[1]);
286     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w2_t[2]);
287     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w2_t[3]);
288     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w3_t[0]);
289     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t[1]);
290     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t[2]);
291     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w3_t[3]);
292     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]);
293     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]);
294     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]);
295     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]);
296
297     #undef K
298     #define K SHA1C01
299
300     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]);
301     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]);
302     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]);
303     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]);
304     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]);
305     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]);
306     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]);
307     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]);
308     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]);
309     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]);
310     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]);
311     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]);
312     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]);
313     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]);
314     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]);
315     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]);
316     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]);
317     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]);
318     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]);
319     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]);
320
321     #undef K
322     #define K SHA1C02
323
324     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]);
325     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]);
326     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]);
327     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]);
328     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]);
329     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]);
330     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]);
331     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]);
332     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]);
333     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]);
334     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]);
335     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]);
336     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]);
337     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]);
338     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]);
339     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]);
340     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]);
341     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]);
342     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]);
343     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]);
344
345     #undef K
346     #define K SHA1C03
347
348     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]);
349     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]);
350     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]);
351     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]);
352     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]);
353     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]);
354     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]);
355     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]);
356     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]);
357     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]);
358     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]);
359     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]);
360     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]);
361     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]);
362     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]);
363     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]);
364     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]);
365     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]);
366     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]);
367     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]);
368
369
370     const u32x r0 = d;
371     const u32x r1 = e;
372     const u32x r2 = c;
373     const u32x r3 = b;
374
375     #include VECT_COMPARE_M
376   }
377 }
378
379 extern "C" __global__ void __launch_bounds__ (256, 1) m00130_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)
380 {
381 }
382
383 extern "C" __global__ void __launch_bounds__ (256, 1) m00130_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)
384 {
385 }
386
387 extern "C" __global__ void __launch_bounds__ (256, 1) m00130_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)
388 {
389   /**
390    * modifier
391    */
392
393   const u32 lid = threadIdx.x;
394
395   /**
396    * base
397    */
398
399   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
400
401   if (gid >= gid_max) return;
402
403   u32x wordl0[4];
404
405   wordl0[0] = pws[gid].i[ 0];
406   wordl0[1] = pws[gid].i[ 1];
407   wordl0[2] = pws[gid].i[ 2];
408   wordl0[3] = pws[gid].i[ 3];
409
410   u32x wordl1[4];
411
412   wordl1[0] = pws[gid].i[ 4];
413   wordl1[1] = pws[gid].i[ 5];
414   wordl1[2] = pws[gid].i[ 6];
415   wordl1[3] = pws[gid].i[ 7];
416
417   u32x wordl2[4];
418
419   wordl2[0] = 0;
420   wordl2[1] = 0;
421   wordl2[2] = 0;
422   wordl2[3] = 0;
423
424   u32x wordl3[4];
425
426   wordl3[0] = 0;
427   wordl3[1] = 0;
428   wordl3[2] = 0;
429   wordl3[3] = 0;
430
431   const u32 pw_l_len = pws[gid].pw_len;
432
433   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
434   {
435     switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
436   }
437
438   /**
439    * salt
440    */
441
442   u32 salt_buf0[4];
443
444   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
445   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
446   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
447   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
448
449   u32 salt_buf1[4];
450
451   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
452   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
453   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6];
454   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7];
455
456   const u32 salt_len = salt_bufs[salt_pos].salt_len;
457
458   /**
459    * digest
460    */
461
462   const u32 search[4] =
463   {
464     digests_buf[digests_offset].digest_buf[DGST_R0],
465     digests_buf[digests_offset].digest_buf[DGST_R1],
466     digests_buf[digests_offset].digest_buf[DGST_R2],
467     digests_buf[digests_offset].digest_buf[DGST_R3]
468   };
469
470   /**
471    * reverse
472    */
473
474   const u32 e_rev = rotl32 (search[1], 2u);
475
476   /**
477    * loop
478    */
479
480   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
481   {
482     const u32 pw_r_len = c_combs[il_pos].pw_len;
483
484     const u32 pw_len = pw_l_len + pw_r_len;
485
486     u32 wordr0[4];
487
488     wordr0[0] = c_combs[il_pos].i[0];
489     wordr0[1] = c_combs[il_pos].i[1];
490     wordr0[2] = c_combs[il_pos].i[2];
491     wordr0[3] = c_combs[il_pos].i[3];
492
493     u32 wordr1[4];
494
495     wordr1[0] = c_combs[il_pos].i[4];
496     wordr1[1] = c_combs[il_pos].i[5];
497     wordr1[2] = c_combs[il_pos].i[6];
498     wordr1[3] = c_combs[il_pos].i[7];
499
500     u32 wordr2[4];
501
502     wordr2[0] = 0;
503     wordr2[1] = 0;
504     wordr2[2] = 0;
505     wordr2[3] = 0;
506
507     u32 wordr3[4];
508
509     wordr3[0] = 0;
510     wordr3[1] = 0;
511     wordr3[2] = 0;
512     wordr3[3] = 0;
513
514     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
515     {
516       switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
517     }
518
519     /**
520      * append salt
521      */
522
523     u32 s0[4];
524
525     s0[0] = salt_buf0[0];
526     s0[1] = salt_buf0[1];
527     s0[2] = salt_buf0[2];
528     s0[3] = salt_buf0[3];
529
530     u32 s1[4];
531
532     s1[0] = salt_buf1[0];
533     s1[1] = salt_buf1[1];
534     s1[2] = salt_buf1[2];
535     s1[3] = salt_buf1[3];
536
537     u32 s2[4];
538
539     s2[0] = 0;
540     s2[1] = 0;
541     s2[2] = 0;
542     s2[3] = 0;
543
544     u32 s3[4];
545
546     s3[0] = 0;
547     s3[1] = 0;
548     s3[2] = 0;
549     s3[3] = 0;
550
551     switch_buffer_by_offset (s0, s1, s2, s3, (pw_len * 2));
552
553     const u32 pw_salt_len = (pw_len * 2) + salt_len;
554
555     u32x w0[4];
556     u32x w1[4];
557     u32x w2[4];
558     u32x w3[4];
559
560     w0[0] = wordl0[0] | wordr0[0];
561     w0[1] = wordl0[1] | wordr0[1];
562     w0[2] = wordl0[2] | wordr0[2];
563     w0[3] = wordl0[3] | wordr0[3];
564     w1[0] = wordl1[0] | wordr1[0];
565     w1[1] = wordl1[1] | wordr1[1];
566     w1[2] = wordl1[2] | wordr1[2];
567     w1[3] = wordl1[3] | wordr1[3];
568     w2[0] = 0;
569     w2[1] = 0;
570     w2[2] = 0;
571     w2[3] = 0;
572     w3[0] = 0;
573     w3[1] = 0;
574     w3[2] = 0;
575     w3[3] = 0;
576
577     u32x w0_t[4];
578     u32x w1_t[4];
579     u32x w2_t[4];
580     u32x w3_t[4];
581
582     make_unicode (w0, w0_t, w1_t);
583     make_unicode (w1, w2_t, w3_t);
584
585     w0_t[0] |= s0[0];
586     w0_t[1] |= s0[1];
587     w0_t[2] |= s0[2];
588     w0_t[3] |= s0[3];
589     w1_t[0] |= s1[0];
590     w1_t[1] |= s1[1];
591     w1_t[2] |= s1[2];
592     w1_t[3] |= s1[3];
593     w2_t[0] |= s2[0];
594     w2_t[1] |= s2[1];
595     w2_t[2] |= s2[2];
596     w2_t[3] |= s2[3];
597     w3_t[0] |= s3[0];
598     w3_t[1] |= s3[1];
599     w3_t[2] |= s3[2];
600     w3_t[3] |= s3[3];
601
602     append_0x80_4 (w0_t, w1_t, w2_t, w3_t, pw_salt_len);
603
604     w3_t[3] = pw_salt_len * 8;
605
606     /**
607      * sha1
608      */
609
610     w0_t[0] = swap_workaround (w0_t[0]);
611     w0_t[1] = swap_workaround (w0_t[1]);
612     w0_t[2] = swap_workaround (w0_t[2]);
613     w0_t[3] = swap_workaround (w0_t[3]);
614     w1_t[0] = swap_workaround (w1_t[0]);
615     w1_t[1] = swap_workaround (w1_t[1]);
616     w1_t[2] = swap_workaround (w1_t[2]);
617     w1_t[3] = swap_workaround (w1_t[3]);
618     w2_t[0] = swap_workaround (w2_t[0]);
619     w2_t[1] = swap_workaround (w2_t[1]);
620     w2_t[2] = swap_workaround (w2_t[2]);
621     w2_t[3] = swap_workaround (w2_t[3]);
622     w3_t[0] = swap_workaround (w3_t[0]);
623     w3_t[1] = swap_workaround (w3_t[1]);
624     //w3_t[2] = swap_workaround (w3_t[2]);
625     //w3_t[3] = swap_workaround (w3_t[3]);
626
627     u32x a = SHA1M_A;
628     u32x b = SHA1M_B;
629     u32x c = SHA1M_C;
630     u32x d = SHA1M_D;
631     u32x e = SHA1M_E;
632
633     #undef K
634     #define K SHA1C00
635
636     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t[0]);
637     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t[1]);
638     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w0_t[2]);
639     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w0_t[3]);
640     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w1_t[0]);
641     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w1_t[1]);
642     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t[2]);
643     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t[3]);
644     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t[0]);
645     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w2_t[1]);
646     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w2_t[2]);
647     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w2_t[3]);
648     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w3_t[0]);
649     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t[1]);
650     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t[2]);
651     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w3_t[3]);
652     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]);
653     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]);
654     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]);
655     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]);
656
657     #undef K
658     #define K SHA1C01
659
660     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]);
661     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]);
662     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]);
663     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]);
664     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]);
665     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]);
666     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]);
667     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]);
668     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]);
669     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]);
670     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]);
671     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]);
672     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]);
673     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]);
674     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]);
675     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]);
676     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]);
677     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]);
678     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]);
679     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]);
680
681     #undef K
682     #define K SHA1C02
683
684     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]);
685     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]);
686     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]);
687     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]);
688     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]);
689     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]);
690     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]);
691     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]);
692     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]);
693     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]);
694     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]);
695     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]);
696     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]);
697     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]);
698     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]);
699     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]);
700     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]);
701     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]);
702     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]);
703     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]);
704
705     #undef K
706     #define K SHA1C03
707
708     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]);
709     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]);
710     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]);
711     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]);
712     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]);
713     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]);
714     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]);
715     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]);
716     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]);
717     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]);
718     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]);
719     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]);
720     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]);
721     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]);
722     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]);
723     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]);
724
725     if (e != e_rev) continue;
726
727     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]);
728     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]);
729     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]);
730     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]);
731
732
733     const u32x r0 = d;
734     const u32x r1 = e;
735     const u32x r2 = c;
736     const u32x r3 = b;
737
738     #include VECT_COMPARE_S
739   }
740 }
741
742 extern "C" __global__ void __launch_bounds__ (256, 1) m00130_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)
743 {
744 }
745
746 extern "C" __global__ void __launch_bounds__ (256, 1) m00130_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)
747 {
748 }