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