Fix m 60 a 0 by making modified variable non-const
[hashcat.git] / OpenCL / m05600_a1.cl
1 /**
2  * Author......: Jens Steube <jens.steube@gmail.com>
3  * License.....: MIT
4  */
5
6 #define _NETNTLMV2_
7
8 #define NEW_SIMD_CODE
9
10 #include "inc_vendor.cl"
11 #include "inc_hash_constants.h"
12 #include "inc_hash_functions.cl"
13 #include "inc_types.cl"
14 #include "inc_common.cl"
15 #include "inc_simd.cl"
16
17 void md4_transform (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[4])
18 {
19   u32x a = digest[0];
20   u32x b = digest[1];
21   u32x c = digest[2];
22   u32x d = digest[3];
23
24   u32x w0_t = w0[0];
25   u32x w1_t = w0[1];
26   u32x w2_t = w0[2];
27   u32x w3_t = w0[3];
28   u32x w4_t = w1[0];
29   u32x w5_t = w1[1];
30   u32x w6_t = w1[2];
31   u32x w7_t = w1[3];
32   u32x w8_t = w2[0];
33   u32x w9_t = w2[1];
34   u32x wa_t = w2[2];
35   u32x wb_t = w2[3];
36   u32x wc_t = w3[0];
37   u32x wd_t = w3[1];
38   u32x we_t = w3[2];
39   u32x wf_t = w3[3];
40
41   MD4_STEP (MD4_Fo, a, b, c, d, w0_t, MD4C00, MD4S00);
42   MD4_STEP (MD4_Fo, d, a, b, c, w1_t, MD4C00, MD4S01);
43   MD4_STEP (MD4_Fo, c, d, a, b, w2_t, MD4C00, MD4S02);
44   MD4_STEP (MD4_Fo, b, c, d, a, w3_t, MD4C00, MD4S03);
45   MD4_STEP (MD4_Fo, a, b, c, d, w4_t, MD4C00, MD4S00);
46   MD4_STEP (MD4_Fo, d, a, b, c, w5_t, MD4C00, MD4S01);
47   MD4_STEP (MD4_Fo, c, d, a, b, w6_t, MD4C00, MD4S02);
48   MD4_STEP (MD4_Fo, b, c, d, a, w7_t, MD4C00, MD4S03);
49   MD4_STEP (MD4_Fo, a, b, c, d, w8_t, MD4C00, MD4S00);
50   MD4_STEP (MD4_Fo, d, a, b, c, w9_t, MD4C00, MD4S01);
51   MD4_STEP (MD4_Fo, c, d, a, b, wa_t, MD4C00, MD4S02);
52   MD4_STEP (MD4_Fo, b, c, d, a, wb_t, MD4C00, MD4S03);
53   MD4_STEP (MD4_Fo, a, b, c, d, wc_t, MD4C00, MD4S00);
54   MD4_STEP (MD4_Fo, d, a, b, c, wd_t, MD4C00, MD4S01);
55   MD4_STEP (MD4_Fo, c, d, a, b, we_t, MD4C00, MD4S02);
56   MD4_STEP (MD4_Fo, b, c, d, a, wf_t, MD4C00, MD4S03);
57
58   MD4_STEP (MD4_Go, a, b, c, d, w0_t, MD4C01, MD4S10);
59   MD4_STEP (MD4_Go, d, a, b, c, w4_t, MD4C01, MD4S11);
60   MD4_STEP (MD4_Go, c, d, a, b, w8_t, MD4C01, MD4S12);
61   MD4_STEP (MD4_Go, b, c, d, a, wc_t, MD4C01, MD4S13);
62   MD4_STEP (MD4_Go, a, b, c, d, w1_t, MD4C01, MD4S10);
63   MD4_STEP (MD4_Go, d, a, b, c, w5_t, MD4C01, MD4S11);
64   MD4_STEP (MD4_Go, c, d, a, b, w9_t, MD4C01, MD4S12);
65   MD4_STEP (MD4_Go, b, c, d, a, wd_t, MD4C01, MD4S13);
66   MD4_STEP (MD4_Go, a, b, c, d, w2_t, MD4C01, MD4S10);
67   MD4_STEP (MD4_Go, d, a, b, c, w6_t, MD4C01, MD4S11);
68   MD4_STEP (MD4_Go, c, d, a, b, wa_t, MD4C01, MD4S12);
69   MD4_STEP (MD4_Go, b, c, d, a, we_t, MD4C01, MD4S13);
70   MD4_STEP (MD4_Go, a, b, c, d, w3_t, MD4C01, MD4S10);
71   MD4_STEP (MD4_Go, d, a, b, c, w7_t, MD4C01, MD4S11);
72   MD4_STEP (MD4_Go, c, d, a, b, wb_t, MD4C01, MD4S12);
73   MD4_STEP (MD4_Go, b, c, d, a, wf_t, MD4C01, MD4S13);
74
75   MD4_STEP (MD4_H , a, b, c, d, w0_t, MD4C02, MD4S20);
76   MD4_STEP (MD4_H , d, a, b, c, w8_t, MD4C02, MD4S21);
77   MD4_STEP (MD4_H , c, d, a, b, w4_t, MD4C02, MD4S22);
78   MD4_STEP (MD4_H , b, c, d, a, wc_t, MD4C02, MD4S23);
79   MD4_STEP (MD4_H , a, b, c, d, w2_t, MD4C02, MD4S20);
80   MD4_STEP (MD4_H , d, a, b, c, wa_t, MD4C02, MD4S21);
81   MD4_STEP (MD4_H , c, d, a, b, w6_t, MD4C02, MD4S22);
82   MD4_STEP (MD4_H , b, c, d, a, we_t, MD4C02, MD4S23);
83   MD4_STEP (MD4_H , a, b, c, d, w1_t, MD4C02, MD4S20);
84   MD4_STEP (MD4_H , d, a, b, c, w9_t, MD4C02, MD4S21);
85   MD4_STEP (MD4_H , c, d, a, b, w5_t, MD4C02, MD4S22);
86   MD4_STEP (MD4_H , b, c, d, a, wd_t, MD4C02, MD4S23);
87   MD4_STEP (MD4_H , a, b, c, d, w3_t, MD4C02, MD4S20);
88   MD4_STEP (MD4_H , d, a, b, c, wb_t, MD4C02, MD4S21);
89   MD4_STEP (MD4_H , c, d, a, b, w7_t, MD4C02, MD4S22);
90   MD4_STEP (MD4_H , b, c, d, a, wf_t, MD4C02, MD4S23);
91
92   digest[0] += a;
93   digest[1] += b;
94   digest[2] += c;
95   digest[3] += d;
96 }
97
98 void md5_transform (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[4])
99 {
100   u32x a = digest[0];
101   u32x b = digest[1];
102   u32x c = digest[2];
103   u32x d = digest[3];
104
105   u32x w0_t = w0[0];
106   u32x w1_t = w0[1];
107   u32x w2_t = w0[2];
108   u32x w3_t = w0[3];
109   u32x w4_t = w1[0];
110   u32x w5_t = w1[1];
111   u32x w6_t = w1[2];
112   u32x w7_t = w1[3];
113   u32x w8_t = w2[0];
114   u32x w9_t = w2[1];
115   u32x wa_t = w2[2];
116   u32x wb_t = w2[3];
117   u32x wc_t = w3[0];
118   u32x wd_t = w3[1];
119   u32x we_t = w3[2];
120   u32x wf_t = w3[3];
121
122   MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
123   MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
124   MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
125   MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
126   MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
127   MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
128   MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
129   MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
130   MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
131   MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
132   MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
133   MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
134   MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
135   MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
136   MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
137   MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
138
139   MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
140   MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
141   MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
142   MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
143   MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
144   MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
145   MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
146   MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
147   MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
148   MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
149   MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
150   MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
151   MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
152   MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
153   MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
154   MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
155
156   MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
157   MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
158   MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
159   MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
160   MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
161   MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
162   MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
163   MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
164   MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
165   MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
166   MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
167   MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
168   MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
169   MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
170   MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
171   MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
172
173   MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
174   MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
175   MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
176   MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
177   MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
178   MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
179   MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
180   MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
181   MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
182   MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
183   MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
184   MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
185   MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
186   MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
187   MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
188   MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
189
190   digest[0] += a;
191   digest[1] += b;
192   digest[2] += c;
193   digest[3] += d;
194 }
195
196 void hmac_md5_pad (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x ipad[4], u32x opad[4])
197 {
198   w0[0] = w0[0] ^ 0x36363636;
199   w0[1] = w0[1] ^ 0x36363636;
200   w0[2] = w0[2] ^ 0x36363636;
201   w0[3] = w0[3] ^ 0x36363636;
202   w1[0] = w1[0] ^ 0x36363636;
203   w1[1] = w1[1] ^ 0x36363636;
204   w1[2] = w1[2] ^ 0x36363636;
205   w1[3] = w1[3] ^ 0x36363636;
206   w2[0] = w2[0] ^ 0x36363636;
207   w2[1] = w2[1] ^ 0x36363636;
208   w2[2] = w2[2] ^ 0x36363636;
209   w2[3] = w2[3] ^ 0x36363636;
210   w3[0] = w3[0] ^ 0x36363636;
211   w3[1] = w3[1] ^ 0x36363636;
212   w3[2] = w3[2] ^ 0x36363636;
213   w3[3] = w3[3] ^ 0x36363636;
214
215   ipad[0] = MD5M_A;
216   ipad[1] = MD5M_B;
217   ipad[2] = MD5M_C;
218   ipad[3] = MD5M_D;
219
220   md5_transform (w0, w1, w2, w3, ipad);
221
222   w0[0] = w0[0] ^ 0x6a6a6a6a;
223   w0[1] = w0[1] ^ 0x6a6a6a6a;
224   w0[2] = w0[2] ^ 0x6a6a6a6a;
225   w0[3] = w0[3] ^ 0x6a6a6a6a;
226   w1[0] = w1[0] ^ 0x6a6a6a6a;
227   w1[1] = w1[1] ^ 0x6a6a6a6a;
228   w1[2] = w1[2] ^ 0x6a6a6a6a;
229   w1[3] = w1[3] ^ 0x6a6a6a6a;
230   w2[0] = w2[0] ^ 0x6a6a6a6a;
231   w2[1] = w2[1] ^ 0x6a6a6a6a;
232   w2[2] = w2[2] ^ 0x6a6a6a6a;
233   w2[3] = w2[3] ^ 0x6a6a6a6a;
234   w3[0] = w3[0] ^ 0x6a6a6a6a;
235   w3[1] = w3[1] ^ 0x6a6a6a6a;
236   w3[2] = w3[2] ^ 0x6a6a6a6a;
237   w3[3] = w3[3] ^ 0x6a6a6a6a;
238
239   opad[0] = MD5M_A;
240   opad[1] = MD5M_B;
241   opad[2] = MD5M_C;
242   opad[3] = MD5M_D;
243
244   md5_transform (w0, w1, w2, w3, opad);
245 }
246
247 void hmac_md5_run (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x ipad[4], u32x opad[4], u32x digest[4])
248 {
249   digest[0] = ipad[0];
250   digest[1] = ipad[1];
251   digest[2] = ipad[2];
252   digest[3] = ipad[3];
253
254   md5_transform (w0, w1, w2, w3, digest);
255
256   w0[0] = digest[0];
257   w0[1] = digest[1];
258   w0[2] = digest[2];
259   w0[3] = digest[3];
260   w1[0] = 0x80;
261   w1[1] = 0;
262   w1[2] = 0;
263   w1[3] = 0;
264   w2[0] = 0;
265   w2[1] = 0;
266   w2[2] = 0;
267   w2[3] = 0;
268   w3[0] = 0;
269   w3[1] = 0;
270   w3[2] = (64 + 16) * 8;
271   w3[3] = 0;
272
273   digest[0] = opad[0];
274   digest[1] = opad[1];
275   digest[2] = opad[2];
276   digest[3] = opad[3];
277
278   md5_transform (w0, w1, w2, w3, digest);
279 }
280
281 __kernel void m05600_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 netntlm_t *netntlm_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
282 {
283   /**
284    * modifier
285    */
286
287   const u32 gid = get_global_id (0);
288   const u32 lid = get_local_id (0);
289   const u32 lsz = get_local_size (0);
290
291   /**
292    * salt
293    */
294
295   __local u32 s_userdomain_buf[64];
296
297   for (u32 i = lid; i < 64; i += lsz)
298   {
299     s_userdomain_buf[i] = netntlm_bufs[salt_pos].userdomain_buf[i];
300   }
301
302   __local u32 s_chall_buf[256];
303
304   for (u32 i = lid; i < 256; i += lsz)
305   {
306     s_chall_buf[i] = netntlm_bufs[salt_pos].chall_buf[i];
307   }
308
309   barrier (CLK_LOCAL_MEM_FENCE);
310
311   if (gid >= gid_max) return;
312
313   const u32 userdomain_len = netntlm_bufs[salt_pos].user_len
314                            + netntlm_bufs[salt_pos].domain_len;
315
316   const u32 chall_len = netntlm_bufs[salt_pos].srvchall_len
317                       + netntlm_bufs[salt_pos].clichall_len;
318
319   /**
320    * base
321    */
322
323   u32 pw_buf0[4];
324   u32 pw_buf1[4];
325
326   pw_buf0[0] = pws[gid].i[0];
327   pw_buf0[1] = pws[gid].i[1];
328   pw_buf0[2] = pws[gid].i[2];
329   pw_buf0[3] = pws[gid].i[3];
330   pw_buf1[0] = pws[gid].i[4];
331   pw_buf1[1] = pws[gid].i[5];
332   pw_buf1[2] = pws[gid].i[6];
333   pw_buf1[3] = pws[gid].i[7];
334
335   const u32 pw_l_len = pws[gid].pw_len;
336
337   /**
338    * loop
339    */
340
341   for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
342   {
343     const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
344
345     const u32x pw_len = pw_l_len + pw_r_len;
346
347     /**
348      * concat password candidate
349      */
350
351     u32x wordl0[4] = { 0 };
352     u32x wordl1[4] = { 0 };
353     u32x wordl2[4] = { 0 };
354     u32x wordl3[4] = { 0 };
355
356     wordl0[0] = pw_buf0[0];
357     wordl0[1] = pw_buf0[1];
358     wordl0[2] = pw_buf0[2];
359     wordl0[3] = pw_buf0[3];
360     wordl1[0] = pw_buf1[0];
361     wordl1[1] = pw_buf1[1];
362     wordl1[2] = pw_buf1[2];
363     wordl1[3] = pw_buf1[3];
364
365     u32x wordr0[4] = { 0 };
366     u32x wordr1[4] = { 0 };
367     u32x wordr2[4] = { 0 };
368     u32x wordr3[4] = { 0 };
369
370     wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
371     wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
372     wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
373     wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
374     wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
375     wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
376     wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
377     wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
378
379     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
380     {
381       switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
382     }
383     else
384     {
385       switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
386     }
387
388     u32x w0[4];
389     u32x w1[4];
390     u32x w2[4];
391     u32x w3[4];
392
393     w0[0] = wordl0[0] | wordr0[0];
394     w0[1] = wordl0[1] | wordr0[1];
395     w0[2] = wordl0[2] | wordr0[2];
396     w0[3] = wordl0[3] | wordr0[3];
397     w1[0] = wordl1[0] | wordr1[0];
398     w1[1] = wordl1[1] | wordr1[1];
399     w1[2] = wordl1[2] | wordr1[2];
400     w1[3] = wordl1[3] | wordr1[3];
401     w2[0] = wordl2[0] | wordr2[0];
402     w2[1] = wordl2[1] | wordr2[1];
403     w2[2] = wordl2[2] | wordr2[2];
404     w2[3] = wordl2[3] | wordr2[3];
405     w3[0] = wordl3[0] | wordr3[0];
406     w3[1] = wordl3[1] | wordr3[1];
407     w3[2] = wordl3[2] | wordr3[2];
408     w3[3] = wordl3[3] | wordr3[3];
409
410     u32x w0_t[4];
411     u32x w1_t[4];
412     u32x w2_t[4];
413     u32x w3_t[4];
414
415     make_unicode (w0, w0_t, w1_t);
416     make_unicode (w1, w2_t, w3_t);
417
418     w3_t[2] = pw_len * 8 * 2;
419     w3_t[3] = 0;
420
421     u32x digest[4];
422
423     digest[0] = MD4M_A;
424     digest[1] = MD4M_B;
425     digest[2] = MD4M_C;
426     digest[3] = MD4M_D;
427
428     md4_transform (w0_t, w1_t, w2_t, w3_t, digest);
429
430     w0_t[0] = digest[0];
431     w0_t[1] = digest[1];
432     w0_t[2] = digest[2];
433     w0_t[3] = digest[3];
434     w1_t[0] = 0;
435     w1_t[1] = 0;
436     w1_t[2] = 0;
437     w1_t[3] = 0;
438     w2_t[0] = 0;
439     w2_t[1] = 0;
440     w2_t[2] = 0;
441     w2_t[3] = 0;
442     w3_t[0] = 0;
443     w3_t[1] = 0;
444     w3_t[2] = 0;
445     w3_t[3] = 0;
446
447     digest[0] = MD5M_A;
448     digest[1] = MD5M_B;
449     digest[2] = MD5M_C;
450     digest[3] = MD5M_D;
451
452     u32x ipad[4];
453     u32x opad[4];
454
455     hmac_md5_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
456
457     int left;
458     int off;
459
460     for (left = userdomain_len, off = 0; left >= 56; left -= 64, off += 16)
461     {
462       w0_t[0] = s_userdomain_buf[off +  0];
463       w0_t[1] = s_userdomain_buf[off +  1];
464       w0_t[2] = s_userdomain_buf[off +  2];
465       w0_t[3] = s_userdomain_buf[off +  3];
466       w1_t[0] = s_userdomain_buf[off +  4];
467       w1_t[1] = s_userdomain_buf[off +  5];
468       w1_t[2] = s_userdomain_buf[off +  6];
469       w1_t[3] = s_userdomain_buf[off +  7];
470       w2_t[0] = s_userdomain_buf[off +  8];
471       w2_t[1] = s_userdomain_buf[off +  9];
472       w2_t[2] = s_userdomain_buf[off + 10];
473       w2_t[3] = s_userdomain_buf[off + 11];
474       w3_t[0] = s_userdomain_buf[off + 12];
475       w3_t[1] = s_userdomain_buf[off + 13];
476       w3_t[2] = s_userdomain_buf[off + 14];
477       w3_t[3] = s_userdomain_buf[off + 15];
478
479       md5_transform (w0_t, w1_t, w2_t, w3_t, ipad);
480     }
481
482     w0_t[0] = s_userdomain_buf[off +  0];
483     w0_t[1] = s_userdomain_buf[off +  1];
484     w0_t[2] = s_userdomain_buf[off +  2];
485     w0_t[3] = s_userdomain_buf[off +  3];
486     w1_t[0] = s_userdomain_buf[off +  4];
487     w1_t[1] = s_userdomain_buf[off +  5];
488     w1_t[2] = s_userdomain_buf[off +  6];
489     w1_t[3] = s_userdomain_buf[off +  7];
490     w2_t[0] = s_userdomain_buf[off +  8];
491     w2_t[1] = s_userdomain_buf[off +  9];
492     w2_t[2] = s_userdomain_buf[off + 10];
493     w2_t[3] = s_userdomain_buf[off + 11];
494     w3_t[0] = s_userdomain_buf[off + 12];
495     w3_t[1] = s_userdomain_buf[off + 13];
496     w3_t[2] = (64 + userdomain_len) * 8;
497     w3_t[3] = 0;
498
499     hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
500
501     w0_t[0] = digest[0];
502     w0_t[1] = digest[1];
503     w0_t[2] = digest[2];
504     w0_t[3] = digest[3];
505     w1_t[0] = 0;
506     w1_t[1] = 0;
507     w1_t[2] = 0;
508     w1_t[3] = 0;
509     w2_t[0] = 0;
510     w2_t[1] = 0;
511     w2_t[2] = 0;
512     w2_t[3] = 0;
513     w3_t[0] = 0;
514     w3_t[1] = 0;
515     w3_t[2] = 0;
516     w3_t[3] = 0;
517
518     digest[0] = MD5M_A;
519     digest[1] = MD5M_B;
520     digest[2] = MD5M_C;
521     digest[3] = MD5M_D;
522
523     hmac_md5_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
524
525     for (left = chall_len, off = 0; left >= 56; left -= 64, off += 16)
526     {
527       w0_t[0] = s_chall_buf[off +  0];
528       w0_t[1] = s_chall_buf[off +  1];
529       w0_t[2] = s_chall_buf[off +  2];
530       w0_t[3] = s_chall_buf[off +  3];
531       w1_t[0] = s_chall_buf[off +  4];
532       w1_t[1] = s_chall_buf[off +  5];
533       w1_t[2] = s_chall_buf[off +  6];
534       w1_t[3] = s_chall_buf[off +  7];
535       w2_t[0] = s_chall_buf[off +  8];
536       w2_t[1] = s_chall_buf[off +  9];
537       w2_t[2] = s_chall_buf[off + 10];
538       w2_t[3] = s_chall_buf[off + 11];
539       w3_t[0] = s_chall_buf[off + 12];
540       w3_t[1] = s_chall_buf[off + 13];
541       w3_t[2] = s_chall_buf[off + 14];
542       w3_t[3] = s_chall_buf[off + 15];
543
544       md5_transform (w0_t, w1_t, w2_t, w3_t, ipad);
545     }
546
547     w0_t[0] = s_chall_buf[off +  0];
548     w0_t[1] = s_chall_buf[off +  1];
549     w0_t[2] = s_chall_buf[off +  2];
550     w0_t[3] = s_chall_buf[off +  3];
551     w1_t[0] = s_chall_buf[off +  4];
552     w1_t[1] = s_chall_buf[off +  5];
553     w1_t[2] = s_chall_buf[off +  6];
554     w1_t[3] = s_chall_buf[off +  7];
555     w2_t[0] = s_chall_buf[off +  8];
556     w2_t[1] = s_chall_buf[off +  9];
557     w2_t[2] = s_chall_buf[off + 10];
558     w2_t[3] = s_chall_buf[off + 11];
559     w3_t[0] = s_chall_buf[off + 12];
560     w3_t[1] = s_chall_buf[off + 13];
561     w3_t[2] = (64 + chall_len) * 8;
562     w3_t[3] = 0;
563
564     hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
565
566     COMPARE_M_SIMD (digest[0], digest[3], digest[2], digest[1]);
567   }
568 }
569
570 __kernel void m05600_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 netntlm_t *netntlm_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
571 {
572 }
573
574 __kernel void m05600_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 netntlm_t *netntlm_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
575 {
576 }
577
578 __kernel void m05600_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 netntlm_t *netntlm_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
579 {
580   /**
581    * modifier
582    */
583
584   const u32 gid = get_global_id (0);
585   const u32 lid = get_local_id (0);
586   const u32 lsz = get_local_size (0);
587
588   /**
589    * salt
590    */
591
592   __local u32 s_userdomain_buf[64];
593
594   for (u32 i = lid; i < 64; i += lsz)
595   {
596     s_userdomain_buf[i] = netntlm_bufs[salt_pos].userdomain_buf[i];
597   }
598
599   __local u32 s_chall_buf[256];
600
601   for (u32 i = lid; i < 256; i += lsz)
602   {
603     s_chall_buf[i] = netntlm_bufs[salt_pos].chall_buf[i];
604   }
605
606   barrier (CLK_LOCAL_MEM_FENCE);
607
608   if (gid >= gid_max) return;
609
610   const u32 userdomain_len = netntlm_bufs[salt_pos].user_len
611                            + netntlm_bufs[salt_pos].domain_len;
612
613   const u32 chall_len = netntlm_bufs[salt_pos].srvchall_len
614                       + netntlm_bufs[salt_pos].clichall_len;
615
616   /**
617    * base
618    */
619
620   u32 pw_buf0[4];
621   u32 pw_buf1[4];
622
623   pw_buf0[0] = pws[gid].i[0];
624   pw_buf0[1] = pws[gid].i[1];
625   pw_buf0[2] = pws[gid].i[2];
626   pw_buf0[3] = pws[gid].i[3];
627   pw_buf1[0] = pws[gid].i[4];
628   pw_buf1[1] = pws[gid].i[5];
629   pw_buf1[2] = pws[gid].i[6];
630   pw_buf1[3] = pws[gid].i[7];
631
632   const u32 pw_l_len = pws[gid].pw_len;
633
634   /**
635    * digest
636    */
637
638   const u32 search[4] =
639   {
640     digests_buf[digests_offset].digest_buf[DGST_R0],
641     digests_buf[digests_offset].digest_buf[DGST_R1],
642     digests_buf[digests_offset].digest_buf[DGST_R2],
643     digests_buf[digests_offset].digest_buf[DGST_R3]
644   };
645
646   /**
647    * loop
648    */
649
650   for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
651   {
652     const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
653
654     const u32x pw_len = pw_l_len + pw_r_len;
655
656     /**
657      * concat password candidate
658      */
659
660     u32x wordl0[4] = { 0 };
661     u32x wordl1[4] = { 0 };
662     u32x wordl2[4] = { 0 };
663     u32x wordl3[4] = { 0 };
664
665     wordl0[0] = pw_buf0[0];
666     wordl0[1] = pw_buf0[1];
667     wordl0[2] = pw_buf0[2];
668     wordl0[3] = pw_buf0[3];
669     wordl1[0] = pw_buf1[0];
670     wordl1[1] = pw_buf1[1];
671     wordl1[2] = pw_buf1[2];
672     wordl1[3] = pw_buf1[3];
673
674     u32x wordr0[4] = { 0 };
675     u32x wordr1[4] = { 0 };
676     u32x wordr2[4] = { 0 };
677     u32x wordr3[4] = { 0 };
678
679     wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
680     wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
681     wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
682     wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
683     wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
684     wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
685     wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
686     wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
687
688     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
689     {
690       switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
691     }
692     else
693     {
694       switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
695     }
696
697     u32x w0[4];
698     u32x w1[4];
699     u32x w2[4];
700     u32x w3[4];
701
702     w0[0] = wordl0[0] | wordr0[0];
703     w0[1] = wordl0[1] | wordr0[1];
704     w0[2] = wordl0[2] | wordr0[2];
705     w0[3] = wordl0[3] | wordr0[3];
706     w1[0] = wordl1[0] | wordr1[0];
707     w1[1] = wordl1[1] | wordr1[1];
708     w1[2] = wordl1[2] | wordr1[2];
709     w1[3] = wordl1[3] | wordr1[3];
710     w2[0] = wordl2[0] | wordr2[0];
711     w2[1] = wordl2[1] | wordr2[1];
712     w2[2] = wordl2[2] | wordr2[2];
713     w2[3] = wordl2[3] | wordr2[3];
714     w3[0] = wordl3[0] | wordr3[0];
715     w3[1] = wordl3[1] | wordr3[1];
716     w3[2] = wordl3[2] | wordr3[2];
717     w3[3] = wordl3[3] | wordr3[3];
718
719     u32x w0_t[4];
720     u32x w1_t[4];
721     u32x w2_t[4];
722     u32x w3_t[4];
723
724     make_unicode (w0, w0_t, w1_t);
725     make_unicode (w1, w2_t, w3_t);
726
727     w3_t[2] = pw_len * 8 * 2;
728     w3_t[3] = 0;
729
730     u32x digest[4];
731
732     digest[0] = MD4M_A;
733     digest[1] = MD4M_B;
734     digest[2] = MD4M_C;
735     digest[3] = MD4M_D;
736
737     md4_transform (w0_t, w1_t, w2_t, w3_t, digest);
738
739     w0_t[0] = digest[0];
740     w0_t[1] = digest[1];
741     w0_t[2] = digest[2];
742     w0_t[3] = digest[3];
743     w1_t[0] = 0;
744     w1_t[1] = 0;
745     w1_t[2] = 0;
746     w1_t[3] = 0;
747     w2_t[0] = 0;
748     w2_t[1] = 0;
749     w2_t[2] = 0;
750     w2_t[3] = 0;
751     w3_t[0] = 0;
752     w3_t[1] = 0;
753     w3_t[2] = 0;
754     w3_t[3] = 0;
755
756     digest[0] = MD5M_A;
757     digest[1] = MD5M_B;
758     digest[2] = MD5M_C;
759     digest[3] = MD5M_D;
760
761     u32x ipad[4];
762     u32x opad[4];
763
764     hmac_md5_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
765
766     int left;
767     int off;
768
769     for (left = userdomain_len, off = 0; left >= 56; left -= 64, off += 16)
770     {
771       w0_t[0] = s_userdomain_buf[off +  0];
772       w0_t[1] = s_userdomain_buf[off +  1];
773       w0_t[2] = s_userdomain_buf[off +  2];
774       w0_t[3] = s_userdomain_buf[off +  3];
775       w1_t[0] = s_userdomain_buf[off +  4];
776       w1_t[1] = s_userdomain_buf[off +  5];
777       w1_t[2] = s_userdomain_buf[off +  6];
778       w1_t[3] = s_userdomain_buf[off +  7];
779       w2_t[0] = s_userdomain_buf[off +  8];
780       w2_t[1] = s_userdomain_buf[off +  9];
781       w2_t[2] = s_userdomain_buf[off + 10];
782       w2_t[3] = s_userdomain_buf[off + 11];
783       w3_t[0] = s_userdomain_buf[off + 12];
784       w3_t[1] = s_userdomain_buf[off + 13];
785       w3_t[2] = s_userdomain_buf[off + 14];
786       w3_t[3] = s_userdomain_buf[off + 15];
787
788       md5_transform (w0_t, w1_t, w2_t, w3_t, ipad);
789     }
790
791     w0_t[0] = s_userdomain_buf[off +  0];
792     w0_t[1] = s_userdomain_buf[off +  1];
793     w0_t[2] = s_userdomain_buf[off +  2];
794     w0_t[3] = s_userdomain_buf[off +  3];
795     w1_t[0] = s_userdomain_buf[off +  4];
796     w1_t[1] = s_userdomain_buf[off +  5];
797     w1_t[2] = s_userdomain_buf[off +  6];
798     w1_t[3] = s_userdomain_buf[off +  7];
799     w2_t[0] = s_userdomain_buf[off +  8];
800     w2_t[1] = s_userdomain_buf[off +  9];
801     w2_t[2] = s_userdomain_buf[off + 10];
802     w2_t[3] = s_userdomain_buf[off + 11];
803     w3_t[0] = s_userdomain_buf[off + 12];
804     w3_t[1] = s_userdomain_buf[off + 13];
805     w3_t[2] = (64 + userdomain_len) * 8;
806     w3_t[3] = 0;
807
808     hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
809
810     w0_t[0] = digest[0];
811     w0_t[1] = digest[1];
812     w0_t[2] = digest[2];
813     w0_t[3] = digest[3];
814     w1_t[0] = 0;
815     w1_t[1] = 0;
816     w1_t[2] = 0;
817     w1_t[3] = 0;
818     w2_t[0] = 0;
819     w2_t[1] = 0;
820     w2_t[2] = 0;
821     w2_t[3] = 0;
822     w3_t[0] = 0;
823     w3_t[1] = 0;
824     w3_t[2] = 0;
825     w3_t[3] = 0;
826
827     digest[0] = MD5M_A;
828     digest[1] = MD5M_B;
829     digest[2] = MD5M_C;
830     digest[3] = MD5M_D;
831
832     hmac_md5_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
833
834     for (left = chall_len, off = 0; left >= 56; left -= 64, off += 16)
835     {
836       w0_t[0] = s_chall_buf[off +  0];
837       w0_t[1] = s_chall_buf[off +  1];
838       w0_t[2] = s_chall_buf[off +  2];
839       w0_t[3] = s_chall_buf[off +  3];
840       w1_t[0] = s_chall_buf[off +  4];
841       w1_t[1] = s_chall_buf[off +  5];
842       w1_t[2] = s_chall_buf[off +  6];
843       w1_t[3] = s_chall_buf[off +  7];
844       w2_t[0] = s_chall_buf[off +  8];
845       w2_t[1] = s_chall_buf[off +  9];
846       w2_t[2] = s_chall_buf[off + 10];
847       w2_t[3] = s_chall_buf[off + 11];
848       w3_t[0] = s_chall_buf[off + 12];
849       w3_t[1] = s_chall_buf[off + 13];
850       w3_t[2] = s_chall_buf[off + 14];
851       w3_t[3] = s_chall_buf[off + 15];
852
853       md5_transform (w0_t, w1_t, w2_t, w3_t, ipad);
854     }
855
856     w0_t[0] = s_chall_buf[off +  0];
857     w0_t[1] = s_chall_buf[off +  1];
858     w0_t[2] = s_chall_buf[off +  2];
859     w0_t[3] = s_chall_buf[off +  3];
860     w1_t[0] = s_chall_buf[off +  4];
861     w1_t[1] = s_chall_buf[off +  5];
862     w1_t[2] = s_chall_buf[off +  6];
863     w1_t[3] = s_chall_buf[off +  7];
864     w2_t[0] = s_chall_buf[off +  8];
865     w2_t[1] = s_chall_buf[off +  9];
866     w2_t[2] = s_chall_buf[off + 10];
867     w2_t[3] = s_chall_buf[off + 11];
868     w3_t[0] = s_chall_buf[off + 12];
869     w3_t[1] = s_chall_buf[off + 13];
870     w3_t[2] = (64 + chall_len) * 8;
871     w3_t[3] = 0;
872
873     hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
874
875     COMPARE_S_SIMD (digest[0], digest[3], digest[2], digest[1]);
876   }
877 }
878
879 __kernel void m05600_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 netntlm_t *netntlm_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
880 {
881 }
882
883 __kernel void m05600_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 netntlm_t *netntlm_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
884 {
885 }