Converted to new SIMD: -m 3710 -a 0
[hashcat.git] / OpenCL / m03710_a0.cl
1 /**
2  * Author......: Jens Steube <jens.steube@gmail.com>
3  * License.....: MIT
4  */
5
6 #define _MD5_
7
8 #define NEW_SIMD_CODE
9
10 #include "include/constants.h"
11 #include "include/kernel_vendor.h"
12
13 #define DGST_R0 0
14 #define DGST_R1 3
15 #define DGST_R2 2
16 #define DGST_R3 1
17
18 #include "include/kernel_functions.c"
19 #include "OpenCL/types_ocl.c"
20 #include "OpenCL/common.c"
21 #include "include/rp_kernel.h"
22 #include "OpenCL/rp.c"
23 #include "OpenCL/simd.c"
24
25 #if   VECT_SIZE == 1
26 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
27 #elif VECT_SIZE == 2
28 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
29 #elif VECT_SIZE == 4
30 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
31 #elif VECT_SIZE == 8
32 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
33 #endif
34
35 __kernel void m03710_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global 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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
36 {
37   /**
38    * modifier
39    */
40
41   const u32 gid = get_global_id (0);
42   const u32 lid = get_local_id (0);
43   const u32 lsz = get_local_size (0);
44
45   /**
46    * bin2asc table
47    */
48
49   __local u32 l_bin2asc[256];
50
51   for (u32 i = lid; i < 256; i += lsz)
52   {
53     const u32 i0 = (i >> 0) & 15;
54     const u32 i1 = (i >> 4) & 15;
55
56     l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
57                  | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
58   }
59
60   barrier (CLK_LOCAL_MEM_FENCE);
61
62   if (gid >= gid_max) return;
63
64   /**
65    * base
66    */
67
68   u32 pw_buf0[4];
69
70   pw_buf0[0] = pws[gid].i[ 0];
71   pw_buf0[1] = pws[gid].i[ 1];
72   pw_buf0[2] = pws[gid].i[ 2];
73   pw_buf0[3] = pws[gid].i[ 3];
74
75   u32 pw_buf1[4];
76
77   pw_buf1[0] = pws[gid].i[ 4];
78   pw_buf1[1] = pws[gid].i[ 5];
79   pw_buf1[2] = pws[gid].i[ 6];
80   pw_buf1[3] = pws[gid].i[ 7];
81
82   const u32 pw_len = pws[gid].pw_len;
83
84   /**
85    * salt
86    */
87
88   u32 salt_buf0[4];
89
90   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
91   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
92   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
93   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
94
95   u32 salt_buf1[4];
96
97   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
98   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
99   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
100   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
101
102   u32 salt_buf2[4];
103
104   salt_buf2[0] = 0;
105   salt_buf2[1] = 0;
106   salt_buf2[2] = 0;
107   salt_buf2[3] = 0;
108
109   u32 salt_buf3[4];
110
111   salt_buf3[0] = 0;
112   salt_buf3[1] = 0;
113   salt_buf3[2] = 0;
114   salt_buf3[3] = 0;
115
116   const u32 salt_len = salt_bufs[salt_pos].salt_len;
117
118   const u32 pw_salt_len = 32 + salt_len;
119
120   /**
121    * loop
122    */
123
124   for (u32 il_pos = 0; il_pos < rules_cnt; il_pos += VECT_SIZE)
125   {
126     u32x w0[4] = { 0 };
127     u32x w1[4] = { 0 };
128     u32x w2[4] = { 0 };
129     u32x w3[4] = { 0 };
130
131     const u32 out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
132
133     append_0x80_2x4 (w0, w1, out_len);
134
135     w3[2] = out_len * 8;
136
137     u32x a = MD5M_A;
138     u32x b = MD5M_B;
139     u32x c = MD5M_C;
140     u32x d = MD5M_D;
141
142     MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
143     MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
144     MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
145     MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
146     MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
147     MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
148     MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
149     MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
150     MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
151     MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
152     MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
153     MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
154     MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
155     MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
156     MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
157     MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
158
159     MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
160     MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
161     MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
162     MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
163     MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
164     MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
165     MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
166     MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
167     MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
168     MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
169     MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
170     MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
171     MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
172     MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
173     MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
174     MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
175
176     MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
177     MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
178     MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
179     MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
180     MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
181     MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
182     MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
183     MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
184     MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
185     MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
186     MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
187     MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
188     MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
189     MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
190     MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
191     MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
192
193     MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
194     MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
195     MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
196     MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
197     MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
198     MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
199     MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
200     MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
201     MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
202     MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
203     MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
204     MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
205     MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
206     MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
207     MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
208     MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
209
210     a += MD5M_A;
211     b += MD5M_B;
212     c += MD5M_C;
213     d += MD5M_D;
214
215     u32x w0_t[4];
216     u32x w1_t[4];
217     u32x w2_t[4];
218     u32x w3_t[4];
219
220     w0_t[0] = uint_to_hex_lower8 ((a >>  0) & 255) <<  0
221             | uint_to_hex_lower8 ((a >>  8) & 255) << 16;
222     w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) <<  0
223             | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
224     w0_t[2] = uint_to_hex_lower8 ((b >>  0) & 255) <<  0
225             | uint_to_hex_lower8 ((b >>  8) & 255) << 16;
226     w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) <<  0
227             | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
228     w1_t[0] = uint_to_hex_lower8 ((c >>  0) & 255) <<  0
229             | uint_to_hex_lower8 ((c >>  8) & 255) << 16;
230     w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) <<  0
231             | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
232     w1_t[2] = uint_to_hex_lower8 ((d >>  0) & 255) <<  0
233             | uint_to_hex_lower8 ((d >>  8) & 255) << 16;
234     w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) <<  0
235             | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
236
237     w2_t[0] = 0x00000080;
238     w2_t[1] = 0;
239     w2_t[2] = 0;
240     w2_t[3] = 0;
241
242     w3_t[0] = 0;
243     w3_t[1] = 0;
244     w3_t[2] = 0;
245     w3_t[3] = 0;
246
247     /**
248      * prepend salt
249      */
250
251     switch_buffer_by_offset_le (w0_t, w1_t, w2_t, w3_t, salt_len);
252
253     w3_t[2] = pw_salt_len * 8;
254
255     w0_t[0] |= salt_buf0[0];
256     w0_t[1] |= salt_buf0[1];
257     w0_t[2] |= salt_buf0[2];
258     w0_t[3] |= salt_buf0[3];
259     w1_t[0] |= salt_buf1[0];
260     w1_t[1] |= salt_buf1[1];
261     w1_t[2] |= salt_buf1[2];
262     w1_t[3] |= salt_buf1[3];
263     w2_t[0] |= salt_buf2[0];
264     w2_t[1] |= salt_buf2[1];
265     w2_t[2] |= salt_buf2[2];
266     w2_t[3] |= salt_buf2[3];
267     w3_t[0] |= salt_buf3[0];
268     w3_t[1] |= salt_buf3[1];
269     w3_t[2] |= salt_buf3[2];
270     w3_t[3] |= salt_buf3[3];
271
272     /**
273      * md5
274      */
275
276     a = MD5M_A;
277     b = MD5M_B;
278     c = MD5M_C;
279     d = MD5M_D;
280
281     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
282     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
283     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
284     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
285     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
286     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
287     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
288     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
289     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
290     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
291     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
292     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
293     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
294     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
295     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
296     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
297
298     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
299     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
300     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
301     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
302     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
303     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
304     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
305     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
306     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
307     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
308     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
309     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
310     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
311     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
312     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
313     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
314
315     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
316     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
317     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
318     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
319     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
320     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
321     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
322     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
323     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
324     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
325     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
326     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
327     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
328     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
329     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
330     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
331
332     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
333     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
334     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
335     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
336     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
337     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
338     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
339     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
340     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
341     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
342     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
343     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
344     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
345     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
346     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
347     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
348
349     COMPARE_M_SIMD (a, d, c, b);
350   }
351 }
352
353 __kernel void m03710_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global 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)
354 {
355 }
356
357 __kernel void m03710_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global 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)
358 {
359 }
360
361 __kernel void m03710_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global 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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
362 {
363   /**
364    * modifier
365    */
366
367   const u32 gid = get_global_id (0);
368   const u32 lid = get_local_id (0);
369   const u32 lsz = get_local_size (0);
370
371   /**
372    * bin2asc table
373    */
374
375   __local u32 l_bin2asc[256];
376
377   for (u32 i = lid; i < 256; i += lsz)
378   {
379     const u32 i0 = (i >> 0) & 15;
380     const u32 i1 = (i >> 4) & 15;
381
382     l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
383                  | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
384   }
385
386   barrier (CLK_LOCAL_MEM_FENCE);
387
388   if (gid >= gid_max) return;
389
390   /**
391    * base
392    */
393
394   u32 pw_buf0[4];
395
396   pw_buf0[0] = pws[gid].i[ 0];
397   pw_buf0[1] = pws[gid].i[ 1];
398   pw_buf0[2] = pws[gid].i[ 2];
399   pw_buf0[3] = pws[gid].i[ 3];
400
401   u32 pw_buf1[4];
402
403   pw_buf1[0] = pws[gid].i[ 4];
404   pw_buf1[1] = pws[gid].i[ 5];
405   pw_buf1[2] = pws[gid].i[ 6];
406   pw_buf1[3] = pws[gid].i[ 7];
407
408   const u32 pw_len = pws[gid].pw_len;
409
410   /**
411    * salt
412    */
413
414   u32 salt_buf0[4];
415
416   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
417   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
418   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
419   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
420
421   u32 salt_buf1[4];
422
423   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
424   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
425   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
426   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
427
428   u32 salt_buf2[4];
429
430   salt_buf2[0] = 0;
431   salt_buf2[1] = 0;
432   salt_buf2[2] = 0;
433   salt_buf2[3] = 0;
434
435   u32 salt_buf3[4];
436
437   salt_buf3[0] = 0;
438   salt_buf3[1] = 0;
439   salt_buf3[2] = 0;
440   salt_buf3[3] = 0;
441
442   const u32 salt_len = salt_bufs[salt_pos].salt_len;
443
444   const u32 pw_salt_len = 32 + salt_len;
445
446   /**
447    * digest
448    */
449
450   const u32 search[4] =
451   {
452     digests_buf[digests_offset].digest_buf[DGST_R0],
453     digests_buf[digests_offset].digest_buf[DGST_R1],
454     digests_buf[digests_offset].digest_buf[DGST_R2],
455     digests_buf[digests_offset].digest_buf[DGST_R3]
456   };
457
458   /**
459    * loop
460    */
461
462   for (u32 il_pos = 0; il_pos < rules_cnt; il_pos += VECT_SIZE)
463   {
464     u32x w0[4] = { 0 };
465     u32x w1[4] = { 0 };
466     u32x w2[4] = { 0 };
467     u32x w3[4] = { 0 };
468
469     const u32 out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
470
471     append_0x80_2x4 (w0, w1, out_len);
472
473     w3[2] = out_len * 8;
474
475     u32x a = MD5M_A;
476     u32x b = MD5M_B;
477     u32x c = MD5M_C;
478     u32x d = MD5M_D;
479
480     MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
481     MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
482     MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
483     MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
484     MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
485     MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
486     MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
487     MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
488     MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
489     MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
490     MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
491     MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
492     MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
493     MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
494     MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
495     MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
496
497     MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
498     MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
499     MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
500     MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
501     MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
502     MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
503     MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
504     MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
505     MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
506     MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
507     MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
508     MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
509     MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
510     MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
511     MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
512     MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
513
514     MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
515     MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
516     MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
517     MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
518     MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
519     MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
520     MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
521     MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
522     MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
523     MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
524     MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
525     MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
526     MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
527     MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
528     MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
529     MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
530
531     MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
532     MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
533     MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
534     MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
535     MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
536     MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
537     MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
538     MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
539     MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
540     MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
541     MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
542     MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
543     MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
544     MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
545     MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
546     MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
547
548     a += MD5M_A;
549     b += MD5M_B;
550     c += MD5M_C;
551     d += MD5M_D;
552
553     u32x w0_t[4];
554     u32x w1_t[4];
555     u32x w2_t[4];
556     u32x w3_t[4];
557
558     w0_t[0] = uint_to_hex_lower8 ((a >>  0) & 255) <<  0
559             | uint_to_hex_lower8 ((a >>  8) & 255) << 16;
560     w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) <<  0
561             | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
562     w0_t[2] = uint_to_hex_lower8 ((b >>  0) & 255) <<  0
563             | uint_to_hex_lower8 ((b >>  8) & 255) << 16;
564     w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) <<  0
565             | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
566     w1_t[0] = uint_to_hex_lower8 ((c >>  0) & 255) <<  0
567             | uint_to_hex_lower8 ((c >>  8) & 255) << 16;
568     w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) <<  0
569             | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
570     w1_t[2] = uint_to_hex_lower8 ((d >>  0) & 255) <<  0
571             | uint_to_hex_lower8 ((d >>  8) & 255) << 16;
572     w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) <<  0
573             | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
574
575     w2_t[0] = 0x00000080;
576     w2_t[1] = 0;
577     w2_t[2] = 0;
578     w2_t[3] = 0;
579
580     w3_t[0] = 0;
581     w3_t[1] = 0;
582     w3_t[2] = 0;
583     w3_t[3] = 0;
584
585     /**
586      * prepend salt
587      */
588
589     switch_buffer_by_offset_le (w0_t, w1_t, w2_t, w3_t, salt_len);
590
591     w3_t[2] = pw_salt_len * 8;
592
593     w0_t[0] |= salt_buf0[0];
594     w0_t[1] |= salt_buf0[1];
595     w0_t[2] |= salt_buf0[2];
596     w0_t[3] |= salt_buf0[3];
597     w1_t[0] |= salt_buf1[0];
598     w1_t[1] |= salt_buf1[1];
599     w1_t[2] |= salt_buf1[2];
600     w1_t[3] |= salt_buf1[3];
601     w2_t[0] |= salt_buf2[0];
602     w2_t[1] |= salt_buf2[1];
603     w2_t[2] |= salt_buf2[2];
604     w2_t[3] |= salt_buf2[3];
605     w3_t[0] |= salt_buf3[0];
606     w3_t[1] |= salt_buf3[1];
607     w3_t[2] |= salt_buf3[2];
608     w3_t[3] |= salt_buf3[3];
609
610     /**
611      * md5
612      */
613
614     a = MD5M_A;
615     b = MD5M_B;
616     c = MD5M_C;
617     d = MD5M_D;
618
619     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
620     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
621     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
622     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
623     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
624     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
625     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
626     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
627     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
628     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
629     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
630     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
631     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
632     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
633     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
634     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
635
636     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
637     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
638     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
639     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
640     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
641     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
642     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
643     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
644     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
645     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
646     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
647     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
648     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
649     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
650     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
651     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
652
653     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
654     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
655     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
656     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
657     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
658     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
659     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
660     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
661     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
662     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
663     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
664     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
665     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
666     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
667     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
668     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
669
670     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
671     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
672     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
673     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
674     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
675     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
676     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
677     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
678     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
679     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
680     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
681     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
682     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
683     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
684     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
685     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
686
687     COMPARE_S_SIMD (a, d, c, b);
688   }
689 }
690
691 __kernel void m03710_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global 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)
692 {
693 }
694
695 __kernel void m03710_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global 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)
696 {
697 }