Add verification of checksum for -m 13100
[hashcat.git] / OpenCL / m13100_a3.cl
1 /**
2  * Authors......: Jens Steube <jens.steube@gmail.com>
3  * Authors......: Fist0urs <eddy.maaalou@gmail.com>
4  *
5  * License.....: MIT
6  */
7
8 #define _KRB5TGS_
9
10 #include "include/constants.h"
11 #include "include/kernel_vendor.h"
12
13 #define DGST_R0 0
14 #define DGST_R1 1
15 #define DGST_R2 2
16 #define DGST_R3 3
17
18 #include "include/kernel_functions.c"
19 #include "OpenCL/types_ocl.c"
20 #include "OpenCL/common.c"
21
22 typedef struct
23 {
24   u8 S[256];
25
26   u32 wtf_its_faster;
27
28 } RC4_KEY;
29
30 static void swap (__local RC4_KEY *rc4_key, const u8 i, const u8 j)
31 {
32   u8 tmp;
33
34   tmp           = rc4_key->S[i];
35   rc4_key->S[i] = rc4_key->S[j];
36   rc4_key->S[j] = tmp;
37 }
38
39 static void rc4_init_16 (__local RC4_KEY *rc4_key, const u32 data[4])
40 {
41   u32 v = 0x03020100;
42   u32 a = 0x04040404;
43
44   __local u32 *ptr = (__local u32 *) rc4_key->S;
45
46   #pragma unroll
47   for (u32 i = 0; i < 64; i++)
48   {
49     *ptr++ = v; v += a;
50   }
51
52   u32 j = 0;
53
54   for (u32 i = 0; i < 16; i++)
55   {
56     u32 idx = i * 16;
57
58     u32 v;
59
60     v = data[0];
61
62     j += rc4_key->S[idx] + (v >>  0); swap (rc4_key, idx, j); idx++;
63     j += rc4_key->S[idx] + (v >>  8); swap (rc4_key, idx, j); idx++;
64     j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++;
65     j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++;
66
67     v = data[1];
68
69     j += rc4_key->S[idx] + (v >>  0); swap (rc4_key, idx, j); idx++;
70     j += rc4_key->S[idx] + (v >>  8); swap (rc4_key, idx, j); idx++;
71     j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++;
72     j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++;
73
74     v = data[2];
75
76     j += rc4_key->S[idx] + (v >>  0); swap (rc4_key, idx, j); idx++;
77     j += rc4_key->S[idx] + (v >>  8); swap (rc4_key, idx, j); idx++;
78     j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++;
79     j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++;
80
81     v = data[3];
82
83     j += rc4_key->S[idx] + (v >>  0); swap (rc4_key, idx, j); idx++;
84     j += rc4_key->S[idx] + (v >>  8); swap (rc4_key, idx, j); idx++;
85     j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++;
86     j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++;
87   }
88 }
89
90 static u8 rc4_next_16 (__local RC4_KEY *rc4_key, u8 i, u8 j, __global u32 in[4], u32 out[4])
91 {
92   #pragma unroll
93   for (u32 k = 0; k < 4; k++)
94   {
95     u32 xor4 = 0;
96
97     u8 idx;
98
99     i += 1;
100     j += rc4_key->S[i];
101
102     swap (rc4_key, i, j);
103
104     idx = rc4_key->S[i] + rc4_key->S[j];
105
106     xor4 |= rc4_key->S[idx] <<  0;
107
108     i += 1;
109     j += rc4_key->S[i];
110
111     swap (rc4_key, i, j);
112
113     idx = rc4_key->S[i] + rc4_key->S[j];
114
115     xor4 |= rc4_key->S[idx] <<  8;
116
117     i += 1;
118     j += rc4_key->S[i];
119
120     swap (rc4_key, i, j);
121
122     idx = rc4_key->S[i] + rc4_key->S[j];
123
124     xor4 |= rc4_key->S[idx] << 16;
125
126     i += 1;
127     j += rc4_key->S[i];
128
129     swap (rc4_key, i, j);
130
131     idx = rc4_key->S[i] + rc4_key->S[j];
132
133     xor4 |= rc4_key->S[idx] << 24;
134
135     out[k] = in[k] ^ xor4;
136   }
137
138   return j;
139 }
140
141 static void md4_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[4])
142 {
143   u32 a = digest[0];
144   u32 b = digest[1];
145   u32 c = digest[2];
146   u32 d = digest[3];
147
148   MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00);
149   MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01);
150   MD4_STEP (MD4_Fo, c, d, a, b, w0[2], MD4C00, MD4S02);
151   MD4_STEP (MD4_Fo, b, c, d, a, w0[3], MD4C00, MD4S03);
152   MD4_STEP (MD4_Fo, a, b, c, d, w1[0], MD4C00, MD4S00);
153   MD4_STEP (MD4_Fo, d, a, b, c, w1[1], MD4C00, MD4S01);
154   MD4_STEP (MD4_Fo, c, d, a, b, w1[2], MD4C00, MD4S02);
155   MD4_STEP (MD4_Fo, b, c, d, a, w1[3], MD4C00, MD4S03);
156   MD4_STEP (MD4_Fo, a, b, c, d, w2[0], MD4C00, MD4S00);
157   MD4_STEP (MD4_Fo, d, a, b, c, w2[1], MD4C00, MD4S01);
158   MD4_STEP (MD4_Fo, c, d, a, b, w2[2], MD4C00, MD4S02);
159   MD4_STEP (MD4_Fo, b, c, d, a, w2[3], MD4C00, MD4S03);
160   MD4_STEP (MD4_Fo, a, b, c, d, w3[0], MD4C00, MD4S00);
161   MD4_STEP (MD4_Fo, d, a, b, c, w3[1], MD4C00, MD4S01);
162   MD4_STEP (MD4_Fo, c, d, a, b, w3[2], MD4C00, MD4S02);
163   MD4_STEP (MD4_Fo, b, c, d, a, w3[3], MD4C00, MD4S03);
164
165   MD4_STEP (MD4_Go, a, b, c, d, w0[0], MD4C01, MD4S10);
166   MD4_STEP (MD4_Go, d, a, b, c, w1[0], MD4C01, MD4S11);
167   MD4_STEP (MD4_Go, c, d, a, b, w2[0], MD4C01, MD4S12);
168   MD4_STEP (MD4_Go, b, c, d, a, w3[0], MD4C01, MD4S13);
169   MD4_STEP (MD4_Go, a, b, c, d, w0[1], MD4C01, MD4S10);
170   MD4_STEP (MD4_Go, d, a, b, c, w1[1], MD4C01, MD4S11);
171   MD4_STEP (MD4_Go, c, d, a, b, w2[1], MD4C01, MD4S12);
172   MD4_STEP (MD4_Go, b, c, d, a, w3[1], MD4C01, MD4S13);
173   MD4_STEP (MD4_Go, a, b, c, d, w0[2], MD4C01, MD4S10);
174   MD4_STEP (MD4_Go, d, a, b, c, w1[2], MD4C01, MD4S11);
175   MD4_STEP (MD4_Go, c, d, a, b, w2[2], MD4C01, MD4S12);
176   MD4_STEP (MD4_Go, b, c, d, a, w3[2], MD4C01, MD4S13);
177   MD4_STEP (MD4_Go, a, b, c, d, w0[3], MD4C01, MD4S10);
178   MD4_STEP (MD4_Go, d, a, b, c, w1[3], MD4C01, MD4S11);
179   MD4_STEP (MD4_Go, c, d, a, b, w2[3], MD4C01, MD4S12);
180   MD4_STEP (MD4_Go, b, c, d, a, w3[3], MD4C01, MD4S13);
181
182   MD4_STEP (MD4_H , a, b, c, d, w0[0], MD4C02, MD4S20);
183   MD4_STEP (MD4_H , d, a, b, c, w2[0], MD4C02, MD4S21);
184   MD4_STEP (MD4_H , c, d, a, b, w1[0], MD4C02, MD4S22);
185   MD4_STEP (MD4_H , b, c, d, a, w3[0], MD4C02, MD4S23);
186   MD4_STEP (MD4_H , a, b, c, d, w0[2], MD4C02, MD4S20);
187   MD4_STEP (MD4_H , d, a, b, c, w2[2], MD4C02, MD4S21);
188   MD4_STEP (MD4_H , c, d, a, b, w1[2], MD4C02, MD4S22);
189   MD4_STEP (MD4_H , b, c, d, a, w3[2], MD4C02, MD4S23);
190   MD4_STEP (MD4_H , a, b, c, d, w0[1], MD4C02, MD4S20);
191   MD4_STEP (MD4_H , d, a, b, c, w2[1], MD4C02, MD4S21);
192   MD4_STEP (MD4_H , c, d, a, b, w1[1], MD4C02, MD4S22);
193   MD4_STEP (MD4_H , b, c, d, a, w3[1], MD4C02, MD4S23);
194   MD4_STEP (MD4_H , a, b, c, d, w0[3], MD4C02, MD4S20);
195   MD4_STEP (MD4_H , d, a, b, c, w2[3], MD4C02, MD4S21);
196   MD4_STEP (MD4_H , c, d, a, b, w1[3], MD4C02, MD4S22);
197   MD4_STEP (MD4_H , b, c, d, a, w3[3], MD4C02, MD4S23);
198
199   digest[0] += a;
200   digest[1] += b;
201   digest[2] += c;
202   digest[3] += d;
203 }
204
205 static void md5_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[4])
206 {
207   u32 a = digest[0];
208   u32 b = digest[1];
209   u32 c = digest[2];
210   u32 d = digest[3];
211
212   u32 w0_t = w0[0];
213   u32 w1_t = w0[1];
214   u32 w2_t = w0[2];
215   u32 w3_t = w0[3];
216   u32 w4_t = w1[0];
217   u32 w5_t = w1[1];
218   u32 w6_t = w1[2];
219   u32 w7_t = w1[3];
220   u32 w8_t = w2[0];
221   u32 w9_t = w2[1];
222   u32 wa_t = w2[2];
223   u32 wb_t = w2[3];
224   u32 wc_t = w3[0];
225   u32 wd_t = w3[1];
226   u32 we_t = w3[2];
227   u32 wf_t = w3[3];
228
229   MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
230   MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
231   MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
232   MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
233   MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
234   MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
235   MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
236   MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
237   MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
238   MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
239   MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
240   MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
241   MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
242   MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
243   MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
244   MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
245
246   MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
247   MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
248   MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
249   MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
250   MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
251   MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
252   MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
253   MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
254   MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
255   MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
256   MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
257   MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
258   MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
259   MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
260   MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
261   MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
262
263   MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
264   MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
265   MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
266   MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
267   MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
268   MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
269   MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
270   MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
271   MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
272   MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
273   MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
274   MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
275   MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
276   MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
277   MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
278   MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
279
280   MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
281   MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
282   MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
283   MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
284   MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
285   MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
286   MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
287   MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
288   MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
289   MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
290   MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
291   MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
292   MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
293   MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
294   MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
295   MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
296
297   digest[0] += a;
298   digest[1] += b;
299   digest[2] += c;
300   digest[3] += d;
301 }
302
303 static void hmac_md5_pad (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 ipad[4], u32 opad[4])
304 {
305   w0[0] = w0[0] ^ 0x36363636;
306   w0[1] = w0[1] ^ 0x36363636;
307   w0[2] = w0[2] ^ 0x36363636;
308   w0[3] = w0[3] ^ 0x36363636;
309   w1[0] = w1[0] ^ 0x36363636;
310   w1[1] = w1[1] ^ 0x36363636;
311   w1[2] = w1[2] ^ 0x36363636;
312   w1[3] = w1[3] ^ 0x36363636;
313   w2[0] = w2[0] ^ 0x36363636;
314   w2[1] = w2[1] ^ 0x36363636;
315   w2[2] = w2[2] ^ 0x36363636;
316   w2[3] = w2[3] ^ 0x36363636;
317   w3[0] = w3[0] ^ 0x36363636;
318   w3[1] = w3[1] ^ 0x36363636;
319   w3[2] = w3[2] ^ 0x36363636;
320   w3[3] = w3[3] ^ 0x36363636;
321
322   ipad[0] = MD5M_A;
323   ipad[1] = MD5M_B;
324   ipad[2] = MD5M_C;
325   ipad[3] = MD5M_D;
326
327   md5_transform (w0, w1, w2, w3, ipad);
328
329   w0[0] = w0[0] ^ 0x6a6a6a6a;
330   w0[1] = w0[1] ^ 0x6a6a6a6a;
331   w0[2] = w0[2] ^ 0x6a6a6a6a;
332   w0[3] = w0[3] ^ 0x6a6a6a6a;
333   w1[0] = w1[0] ^ 0x6a6a6a6a;
334   w1[1] = w1[1] ^ 0x6a6a6a6a;
335   w1[2] = w1[2] ^ 0x6a6a6a6a;
336   w1[3] = w1[3] ^ 0x6a6a6a6a;
337   w2[0] = w2[0] ^ 0x6a6a6a6a;
338   w2[1] = w2[1] ^ 0x6a6a6a6a;
339   w2[2] = w2[2] ^ 0x6a6a6a6a;
340   w2[3] = w2[3] ^ 0x6a6a6a6a;
341   w3[0] = w3[0] ^ 0x6a6a6a6a;
342   w3[1] = w3[1] ^ 0x6a6a6a6a;
343   w3[2] = w3[2] ^ 0x6a6a6a6a;
344   w3[3] = w3[3] ^ 0x6a6a6a6a;
345
346   opad[0] = MD5M_A;
347   opad[1] = MD5M_B;
348   opad[2] = MD5M_C;
349   opad[3] = MD5M_D;
350
351   md5_transform (w0, w1, w2, w3, opad);
352 }
353
354 static void hmac_md5_run (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 ipad[4], u32 opad[4], u32 digest[4])
355 {
356   digest[0] = ipad[0];
357   digest[1] = ipad[1];
358   digest[2] = ipad[2];
359   digest[3] = ipad[3];
360
361   md5_transform (w0, w1, w2, w3, digest);
362
363   w0[0] = digest[0];
364   w0[1] = digest[1];
365   w0[2] = digest[2];
366   w0[3] = digest[3];
367   w1[0] = 0x80;
368   w1[1] = 0;
369   w1[2] = 0;
370   w1[3] = 0;
371   w2[0] = 0;
372   w2[1] = 0;
373   w2[2] = 0;
374   w2[3] = 0;
375   w3[0] = 0;
376   w3[1] = 0;
377   w3[2] = (64 + 16) * 8;
378   w3[3] = 0;
379
380   digest[0] = opad[0];
381   digest[1] = opad[1];
382   digest[2] = opad[2];
383   digest[3] = opad[3];
384
385   md5_transform (w0, w1, w2, w3, digest);
386 }
387
388 static int decrypt_and_check (__local RC4_KEY *rc4_key, u32 data[4], __global u32 *edata2, const u32 edata2_len, const u32 K2[4], const u32 checksum[4])
389 {
390   rc4_init_16 (rc4_key, data);
391
392   u32 out0[4];
393   u32 out1[4];
394
395   u8 i = 0;
396   u8 j = 0;
397
398   /*
399     8 first bytes are nonce, then ASN1 structs (DER encoding: type-length-data)
400
401     if length >= 128 bytes:
402         length is on 2 bytes and type is \x63\x82 (encode_krb5_enc_tkt_part) and data is an ASN1 sequence \x30\x82
403     else:
404         length is on 1 byte and type is \x63\x81 and data is an ASN1 sequence \x30\x81
405
406     next headers follow the same ASN1 "type-length-data" scheme
407   */
408
409   j = rc4_next_16 (rc4_key, i, j, edata2 + 0, out0); i += 16;
410
411   if (((out0[2] & 0xff00ffff) != 0x30008163) && ((out0[2] & 0x0000ffff) != 0x00008263)) return 0;
412
413   j = rc4_next_16 (rc4_key, i, j, edata2 + 4, out1); i += 16;
414
415   if (((out1[0] & 0x00ffffff) != 0x00000503) && (out1[0] != 0x050307A0)) return 0;
416
417   rc4_init_16 (rc4_key, data);
418
419   i = 0;
420   j = 0;
421
422   // init hmac
423
424   u32 w0[4];
425   u32 w1[4];
426   u32 w2[4];
427   u32 w3[4];
428
429   w0[0] = K2[0];
430   w0[1] = K2[1];
431   w0[2] = K2[2];
432   w0[3] = K2[3];
433   w1[0] = 0;
434   w1[1] = 0;
435   w1[2] = 0;
436   w1[3] = 0;
437   w2[0] = 0;
438   w2[1] = 0;
439   w2[2] = 0;
440   w2[3] = 0;
441   w3[0] = 0;
442   w3[1] = 0;
443   w3[2] = 0;
444   w3[3] = 0;
445
446   u32 ipad[4];
447   u32 opad[4];
448
449   hmac_md5_pad (w0, w1, w2, w3, ipad, opad);
450
451   int edata2_left;
452
453   for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64)
454   {
455     j = rc4_next_16 (rc4_key, i, j, edata2, w0); i += 16; edata2 += 4;
456     j = rc4_next_16 (rc4_key, i, j, edata2, w1); i += 16; edata2 += 4;
457     j = rc4_next_16 (rc4_key, i, j, edata2, w2); i += 16; edata2 += 4;
458     j = rc4_next_16 (rc4_key, i, j, edata2, w3); i += 16; edata2 += 4;
459
460     md5_transform (w0, w1, w2, w3, ipad);
461   }
462
463   w0[0] = 0;
464   w0[1] = 0;
465   w0[2] = 0;
466   w0[3] = 0;
467   w1[0] = 0;
468   w1[1] = 0;
469   w1[2] = 0;
470   w1[3] = 0;
471   w2[0] = 0;
472   w2[1] = 0;
473   w2[2] = 0;
474   w2[3] = 0;
475   w3[0] = 0;
476   w3[1] = 0;
477   w3[2] = 0;
478   w3[3] = 0;
479
480   if (edata2_left < 16)
481   {
482     j = rc4_next_16 (rc4_key, i, j, edata2, w0); i += 16; edata2 += 4;
483
484     truncate_block  (w0, edata2_left & 0xf);
485     append_0x80_1x4 (w0, edata2_left & 0xf);
486
487     w3[2] = (64 + edata2_len) * 8;
488     w3[3] = 0;
489
490     md5_transform (w0, w1, w2, w3, ipad);
491   }
492   else if (edata2_left < 32)
493   {
494     j = rc4_next_16 (rc4_key, i, j, edata2, w0); i += 16; edata2 += 4;
495     j = rc4_next_16 (rc4_key, i, j, edata2, w1); i += 16; edata2 += 4;
496
497     truncate_block  (w1, edata2_left & 0xf);
498     append_0x80_1x4 (w1, edata2_left & 0xf);
499
500     w3[2] = (64 + edata2_len) * 8;
501     w3[3] = 0;
502
503     md5_transform (w0, w1, w2, w3, ipad);
504   }
505   else if (edata2_left < 48)
506   {
507     j = rc4_next_16 (rc4_key, i, j, edata2, w0); i += 16; edata2 += 4;
508     j = rc4_next_16 (rc4_key, i, j, edata2, w1); i += 16; edata2 += 4;
509     j = rc4_next_16 (rc4_key, i, j, edata2, w2); i += 16; edata2 += 4;
510
511     truncate_block  (w2, edata2_left & 0xf);
512     append_0x80_1x4 (w2, edata2_left & 0xf);
513
514     w3[2] = (64 + edata2_len) * 8;
515     w3[3] = 0;
516
517     md5_transform (w0, w1, w2, w3, ipad);
518   }
519   else
520   {
521     j = rc4_next_16 (rc4_key, i, j, edata2, w0); i += 16; edata2 += 4;
522     j = rc4_next_16 (rc4_key, i, j, edata2, w1); i += 16; edata2 += 4;
523     j = rc4_next_16 (rc4_key, i, j, edata2, w2); i += 16; edata2 += 4;
524     j = rc4_next_16 (rc4_key, i, j, edata2, w3); i += 16; edata2 += 4;
525
526     truncate_block  (w3, edata2_left & 0xf);
527     append_0x80_1x4 (w3, edata2_left & 0xf);
528
529     if (edata2_left < 56)
530     {
531       w3[2] = (64 + edata2_len) * 8;
532       w3[3] = 0;
533
534       md5_transform (w0, w1, w2, w3, ipad);
535     }
536     else
537     {
538       md5_transform (w0, w1, w2, w3, ipad);
539
540       w0[0] = 0;
541       w0[1] = 0;
542       w0[2] = 0;
543       w0[3] = 0;
544       w1[0] = 0;
545       w1[1] = 0;
546       w1[2] = 0;
547       w1[3] = 0;
548       w2[0] = 0;
549       w2[1] = 0;
550       w2[2] = 0;
551       w2[3] = 0;
552       w3[0] = 0;
553       w3[1] = 0;
554       w3[2] = (64 + edata2_len) * 8;
555       w3[3] = 0;
556
557       md5_transform (w0, w1, w2, w3, ipad);
558     }
559   }
560
561   w0[0] = ipad[0];
562   w0[1] = ipad[1];
563   w0[2] = ipad[2];
564   w0[3] = ipad[3];
565   w1[0] = 0x80;
566   w1[1] = 0;
567   w1[2] = 0;
568   w1[3] = 0;
569   w2[0] = 0;
570   w2[1] = 0;
571   w2[2] = 0;
572   w2[3] = 0;
573   w3[0] = 0;
574   w3[1] = 0;
575   w3[2] = (64 + 16) * 8;
576   w3[3] = 0;
577
578   md5_transform (w0, w1, w2, w3, opad);
579
580   if (checksum[0] != opad[0]) return 0;
581   if (checksum[1] != opad[1]) return 0;
582   if (checksum[2] != opad[2]) return 0;
583   if (checksum[3] != opad[3]) return 0;
584
585   return 1;
586 }
587
588 static void kerb_prepare (const u32 w0[4], const u32 w1[4], const u32 pw_len, const u32 checksum[4], u32 digest[4], u32 K2[4])
589 {
590   /**
591    * pads
592    */
593
594   u32 w0_t[4];
595   u32 w1_t[4];
596   u32 w2_t[4];
597   u32 w3_t[4];
598
599   w0_t[0] = w0[0];
600   w0_t[1] = w0[1];
601   w0_t[2] = w0[2];
602   w0_t[3] = w0[3];
603   w1_t[0] = w1[0];
604   w1_t[1] = w1[1];
605   w1_t[2] = w1[2];
606   w1_t[3] = w1[3];
607   w2_t[0] = 0;
608   w2_t[1] = 0;
609   w2_t[2] = 0;
610   w2_t[3] = 0;
611   w3_t[0] = 0;
612   w3_t[1] = 0;
613   w3_t[2] = 0;
614   w3_t[3] = 0;
615
616   // K=MD4(Little_indian(UNICODE(pwd))
617
618   append_0x80_2x4 (w0_t, w1_t, pw_len);
619
620   make_unicode (w1_t, w2_t, w3_t);
621   make_unicode (w0_t, w0_t, w1_t);
622
623   w3_t[2] = pw_len * 8 * 2;
624   w3_t[3] = 0;
625
626   digest[0] = MD4M_A;
627   digest[1] = MD4M_B;
628   digest[2] = MD4M_C;
629   digest[3] = MD4M_D;
630
631   md4_transform (w0_t, w1_t, w2_t, w3_t, digest);
632
633   // K1=MD5_HMAC(K,1); with 2 encoded as little indian on 4 bytes (02000000 in hexa);
634
635   w0_t[0] = digest[0];
636   w0_t[1] = digest[1];
637   w0_t[2] = digest[2];
638   w0_t[3] = digest[3];
639   w1_t[0] = 0;
640   w1_t[1] = 0;
641   w1_t[2] = 0;
642   w1_t[3] = 0;
643   w2_t[0] = 0;
644   w2_t[1] = 0;
645   w2_t[2] = 0;
646   w2_t[3] = 0;
647   w3_t[0] = 0;
648   w3_t[1] = 0;
649   w3_t[2] = 0;
650   w3_t[3] = 0;
651
652   u32 ipad[4];
653   u32 opad[4];
654
655   hmac_md5_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
656
657   w0_t[0] = 2;
658   w0_t[1] = 0x80;
659   w0_t[2] = 0;
660   w0_t[3] = 0;
661   w1_t[0] = 0;
662   w1_t[1] = 0;
663   w1_t[2] = 0;
664   w1_t[3] = 0;
665   w2_t[0] = 0;
666   w2_t[1] = 0;
667   w2_t[2] = 0;
668   w2_t[3] = 0;
669   w3_t[0] = 0;
670   w3_t[1] = 0;
671   w3_t[2] = (64 + 4) * 8;
672   w3_t[3] = 0;
673
674   hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
675
676   // K2 = K1;
677
678   K2[0] = digest[0];
679   K2[1] = digest[1];
680   K2[2] = digest[2];
681   K2[3] = digest[3];
682
683   // K3=MD5_HMAC(K1,checksum);
684
685   w0_t[0] = digest[0];
686   w0_t[1] = digest[1];
687   w0_t[2] = digest[2];
688   w0_t[3] = digest[3];
689   w1_t[0] = 0;
690   w1_t[1] = 0;
691   w1_t[2] = 0;
692   w1_t[3] = 0;
693   w2_t[0] = 0;
694   w2_t[1] = 0;
695   w2_t[2] = 0;
696   w2_t[3] = 0;
697   w3_t[0] = 0;
698   w3_t[1] = 0;
699   w3_t[2] = 0;
700   w3_t[3] = 0;
701
702   hmac_md5_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
703
704   w0_t[0] = checksum[0];
705   w0_t[1] = checksum[1];
706   w0_t[2] = checksum[2];
707   w0_t[3] = checksum[3];
708   w1_t[0] = 0x80;
709   w1_t[1] = 0;
710   w1_t[2] = 0;
711   w1_t[3] = 0;
712   w2_t[0] = 0;
713   w2_t[1] = 0;
714   w2_t[2] = 0;
715   w2_t[3] = 0;
716   w3_t[0] = 0;
717   w3_t[1] = 0;
718   w3_t[2] = (64 + 16) * 8;
719   w3_t[3] = 0;
720
721   hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
722 }
723
724 static void m13100 (__local RC4_KEY *rc4_keys, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __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 krb5tgs_t *krb5tgs_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset)
725 {
726   /**
727    * modifier
728    */
729
730   const u32 gid = get_global_id (0);
731   const u32 lid = get_local_id (0);
732
733   /**
734    * salt
735    */
736
737   u32 checksum[4];
738
739   checksum[0] = krb5tgs_bufs[salt_pos].checksum[0];
740   checksum[1] = krb5tgs_bufs[salt_pos].checksum[1];
741   checksum[2] = krb5tgs_bufs[salt_pos].checksum[2];
742   checksum[3] = krb5tgs_bufs[salt_pos].checksum[3];
743
744   /**
745    * loop
746    */
747
748   u32 w0l = w0[0];
749
750   for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
751   {
752     const u32 w0r = bfs_buf[il_pos].i;
753
754     w0[0] = w0l | w0r;
755
756     u32 digest[4];
757
758     u32 K2[4];
759
760     kerb_prepare (w0, w1, pw_len, checksum, digest, K2);
761
762     u32 tmp[4];
763
764     tmp[0] = digest[0];
765     tmp[1] = digest[1];
766     tmp[2] = digest[2];
767     tmp[3] = digest[3];
768
769     if (decrypt_and_check (&rc4_keys[lid], tmp, krb5tgs_bufs[salt_pos].edata2, krb5tgs_bufs[salt_pos].edata2_len, K2, checksum) == 1)
770     {
771       mark_hash (plains_buf, hashes_shown, digests_offset, gid, il_pos);
772
773       d_return_buf[lid] = 1;
774     }
775   }
776 }
777
778 __kernel void m13100_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 krb5tgs_t *krb5tgs_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
779 {
780   /**
781    * base
782    */
783
784   const u32 gid = get_global_id (0);
785   const u32 lid = get_local_id (0);
786
787   if (gid >= gid_max) return;
788
789   u32 w0[4];
790
791   w0[0] = pws[gid].i[ 0];
792   w0[1] = pws[gid].i[ 1];
793   w0[2] = pws[gid].i[ 2];
794   w0[3] = pws[gid].i[ 3];
795
796   u32 w1[4];
797
798   w1[0] = 0;
799   w1[1] = 0;
800   w1[2] = 0;
801   w1[3] = 0;
802
803   u32 w2[4];
804
805   w2[0] = 0;
806   w2[1] = 0;
807   w2[2] = 0;
808   w2[3] = 0;
809
810   u32 w3[4];
811
812   w3[0] = 0;
813   w3[1] = 0;
814   w3[2] = 0;
815   w3[3] = 0;
816
817   const u32 pw_len = pws[gid].pw_len;
818
819   /**
820    * main
821    */
822
823   __local RC4_KEY rc4_keys[64];
824
825   m13100 (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, krb5tgs_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
826 }
827
828 __kernel void m13100_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 krb5tgs_t *krb5tgs_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
829 {
830   /**
831    * base
832    */
833
834   const u32 gid = get_global_id (0);
835   const u32 lid = get_local_id (0);
836
837   if (gid >= gid_max) return;
838
839   u32 w0[4];
840
841   w0[0] = pws[gid].i[ 0];
842   w0[1] = pws[gid].i[ 1];
843   w0[2] = pws[gid].i[ 2];
844   w0[3] = pws[gid].i[ 3];
845
846   u32 w1[4];
847
848   w1[0] = pws[gid].i[ 4];
849   w1[1] = pws[gid].i[ 5];
850   w1[2] = pws[gid].i[ 6];
851   w1[3] = pws[gid].i[ 7];
852
853   u32 w2[4];
854
855   w2[0] = 0;
856   w2[1] = 0;
857   w2[2] = 0;
858   w2[3] = 0;
859
860   u32 w3[4];
861
862   w3[0] = 0;
863   w3[1] = 0;
864   w3[2] = 0;
865   w3[3] = 0;
866
867   const u32 pw_len = pws[gid].pw_len;
868
869   /**
870    * main
871    */
872
873   __local RC4_KEY rc4_keys[64];
874
875   m13100 (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, krb5tgs_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
876 }
877
878 __kernel void m13100_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 krb5tgs_t *krb5tgs_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
879 {
880 }
881
882 __kernel void m13100_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 krb5tgs_t *krb5tgs_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
883 {
884   /**
885    * base
886    */
887
888   const u32 gid = get_global_id (0);
889   const u32 lid = get_local_id (0);
890
891   if (gid >= gid_max) return;
892
893   u32 w0[4];
894
895   w0[0] = pws[gid].i[ 0];
896   w0[1] = pws[gid].i[ 1];
897   w0[2] = pws[gid].i[ 2];
898   w0[3] = pws[gid].i[ 3];
899
900   u32 w1[4];
901
902   w1[0] = 0;
903   w1[1] = 0;
904   w1[2] = 0;
905   w1[3] = 0;
906
907   u32 w2[4];
908
909   w2[0] = 0;
910   w2[1] = 0;
911   w2[2] = 0;
912   w2[3] = 0;
913
914   u32 w3[4];
915
916   w3[0] = 0;
917   w3[1] = 0;
918   w3[2] = 0;
919   w3[3] = 0;
920
921   const u32 pw_len = pws[gid].pw_len;
922
923   /**
924    * main
925    */
926
927   __local RC4_KEY rc4_keys[64];
928
929   m13100 (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, krb5tgs_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
930 }
931
932 __kernel void m13100_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 krb5tgs_t *krb5tgs_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
933 {
934   /**
935    * base
936    */
937
938   const u32 gid = get_global_id (0);
939   const u32 lid = get_local_id (0);
940
941   if (gid >= gid_max) return;
942
943   u32 w0[4];
944
945   w0[0] = pws[gid].i[ 0];
946   w0[1] = pws[gid].i[ 1];
947   w0[2] = pws[gid].i[ 2];
948   w0[3] = pws[gid].i[ 3];
949
950   u32 w1[4];
951
952   w1[0] = pws[gid].i[ 4];
953   w1[1] = pws[gid].i[ 5];
954   w1[2] = pws[gid].i[ 6];
955   w1[3] = pws[gid].i[ 7];
956
957   u32 w2[4];
958
959   w2[0] = 0;
960   w2[1] = 0;
961   w2[2] = 0;
962   w2[3] = 0;
963
964   u32 w3[4];
965
966   w3[0] = 0;
967   w3[1] = 0;
968   w3[2] = 0;
969   w3[3] = 0;
970
971   const u32 pw_len = pws[gid].pw_len;
972
973   /**
974    * main
975    */
976
977   __local RC4_KEY rc4_keys[64];
978
979   m13100 (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, krb5tgs_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
980 }
981
982 __kernel void m13100_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 krb5tgs_t *krb5tgs_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
983 {
984 }