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