Merge pull request #146 from gm4tr1x/master
[hashcat.git] / OpenCL / m09700_a1.cl
1 /**
2  * Author......: Jens Steube <jens.steube@gmail.com>
3  * License.....: MIT
4  */
5
6 #define _OLDOFFICE01_
7
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
10
11 #define DGST_R0 0
12 #define DGST_R1 1
13 #define DGST_R2 2
14 #define DGST_R3 3
15
16 #include "include/kernel_functions.c"
17 #include "OpenCL/types_ocl.c"
18 #include "OpenCL/common.c"
19
20 #define COMPARE_S "OpenCL/check_single_comp4.c"
21 #define COMPARE_M "OpenCL/check_multi_comp4.c"
22
23 typedef struct
24 {
25   u8 S[256];
26
27   u32 wtf_its_faster;
28
29 } RC4_KEY;
30
31 static void swap (__local RC4_KEY *rc4_key, const u8 i, const u8 j)
32 {
33   u8 tmp;
34
35   tmp           = rc4_key->S[i];
36   rc4_key->S[i] = rc4_key->S[j];
37   rc4_key->S[j] = tmp;
38 }
39
40 static void rc4_init_16 (__local RC4_KEY *rc4_key, const u32 data[4])
41 {
42   u32 v = 0x03020100;
43   u32 a = 0x04040404;
44
45   __local u32 *ptr = (__local u32 *) rc4_key->S;
46
47   #pragma unroll
48   for (u32 i = 0; i < 64; i++)
49   {
50     *ptr++ = v; v += a;
51   }
52
53   u32 j = 0;
54
55   for (u32 i = 0; i < 16; i++)
56   {
57     u32 idx = i * 16;
58
59     u32 v;
60
61     v = data[0];
62
63     j += rc4_key->S[idx] + (v >>  0); swap (rc4_key, idx, j); idx++;
64     j += rc4_key->S[idx] + (v >>  8); swap (rc4_key, idx, j); idx++;
65     j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++;
66     j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++;
67
68     v = data[1];
69
70     j += rc4_key->S[idx] + (v >>  0); swap (rc4_key, idx, j); idx++;
71     j += rc4_key->S[idx] + (v >>  8); swap (rc4_key, idx, j); idx++;
72     j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++;
73     j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++;
74
75     v = data[2];
76
77     j += rc4_key->S[idx] + (v >>  0); swap (rc4_key, idx, j); idx++;
78     j += rc4_key->S[idx] + (v >>  8); swap (rc4_key, idx, j); idx++;
79     j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++;
80     j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++;
81
82     v = data[3];
83
84     j += rc4_key->S[idx] + (v >>  0); swap (rc4_key, idx, j); idx++;
85     j += rc4_key->S[idx] + (v >>  8); swap (rc4_key, idx, j); idx++;
86     j += rc4_key->S[idx] + (v >> 16); swap (rc4_key, idx, j); idx++;
87     j += rc4_key->S[idx] + (v >> 24); swap (rc4_key, idx, j); idx++;
88   }
89 }
90
91 static u8 rc4_next_16 (__local RC4_KEY *rc4_key, u8 i, u8 j, const u32 in[4], u32 out[4])
92 {
93   #pragma unroll
94   for (u32 k = 0; k < 4; k++)
95   {
96     u32 xor4 = 0;
97
98     u8 idx;
99
100     i += 1;
101     j += rc4_key->S[i];
102
103     swap (rc4_key, i, j);
104
105     idx = rc4_key->S[i] + rc4_key->S[j];
106
107     xor4 |= rc4_key->S[idx] <<  0;
108
109     i += 1;
110     j += rc4_key->S[i];
111
112     swap (rc4_key, i, j);
113
114     idx = rc4_key->S[i] + rc4_key->S[j];
115
116     xor4 |= rc4_key->S[idx] <<  8;
117
118     i += 1;
119     j += rc4_key->S[i];
120
121     swap (rc4_key, i, j);
122
123     idx = rc4_key->S[i] + rc4_key->S[j];
124
125     xor4 |= rc4_key->S[idx] << 16;
126
127     i += 1;
128     j += rc4_key->S[i];
129
130     swap (rc4_key, i, j);
131
132     idx = rc4_key->S[i] + rc4_key->S[j];
133
134     xor4 |= rc4_key->S[idx] << 24;
135
136     out[k] = in[k] ^ xor4;
137   }
138
139   return j;
140 }
141
142 static void md5_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[4])
143 {
144   u32 a = digest[0];
145   u32 b = digest[1];
146   u32 c = digest[2];
147   u32 d = digest[3];
148
149   u32 w0_t = w0[0];
150   u32 w1_t = w0[1];
151   u32 w2_t = w0[2];
152   u32 w3_t = w0[3];
153   u32 w4_t = w1[0];
154   u32 w5_t = w1[1];
155   u32 w6_t = w1[2];
156   u32 w7_t = w1[3];
157   u32 w8_t = w2[0];
158   u32 w9_t = w2[1];
159   u32 wa_t = w2[2];
160   u32 wb_t = w2[3];
161   u32 wc_t = w3[0];
162   u32 wd_t = w3[1];
163   u32 we_t = w3[2];
164   u32 wf_t = w3[3];
165
166   MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
167   MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
168   MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
169   MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
170   MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
171   MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
172   MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
173   MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
174   MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
175   MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
176   MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
177   MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
178   MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
179   MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
180   MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
181   MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
182
183   MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
184   MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
185   MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
186   MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
187   MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
188   MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
189   MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
190   MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
191   MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
192   MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
193   MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
194   MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
195   MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
196   MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
197   MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
198   MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
199
200   MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
201   MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
202   MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
203   MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
204   MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
205   MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
206   MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
207   MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
208   MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
209   MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
210   MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
211   MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
212   MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
213   MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
214   MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
215   MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
216
217   MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
218   MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
219   MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
220   MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
221   MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
222   MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
223   MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
224   MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
225   MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
226   MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
227   MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
228   MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
229   MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
230   MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
231   MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
232   MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
233
234   digest[0] += a;
235   digest[1] += b;
236   digest[2] += c;
237   digest[3] += d;
238 }
239
240 static void gen336 (u32 digest_pre[4], u32 salt_buf[4], u32 digest[4])
241 {
242   u32 digest_t0[2];
243   u32 digest_t1[2];
244   u32 digest_t2[2];
245   u32 digest_t3[2];
246
247   digest_t0[0] = digest_pre[0];
248   digest_t0[1] = digest_pre[1] & 0xff;
249
250   digest_t1[0] =                       digest_pre[0] <<  8;
251   digest_t1[1] = digest_pre[0] >> 24 | digest_pre[1] <<  8;
252
253   digest_t2[0] =                       digest_pre[0] << 16;
254   digest_t2[1] = digest_pre[0] >> 16 | digest_pre[1] << 16;
255
256   digest_t3[0] =                       digest_pre[0] << 24;
257   digest_t3[1] = digest_pre[0] >>  8 | digest_pre[1] << 24;
258
259   u32 salt_buf_t0[4];
260   u32 salt_buf_t1[5];
261   u32 salt_buf_t2[5];
262   u32 salt_buf_t3[5];
263
264   salt_buf_t0[0] = salt_buf[0];
265   salt_buf_t0[1] = salt_buf[1];
266   salt_buf_t0[2] = salt_buf[2];
267   salt_buf_t0[3] = salt_buf[3];
268
269   salt_buf_t1[0] =                     salt_buf[0] <<  8;
270   salt_buf_t1[1] = salt_buf[0] >> 24 | salt_buf[1] <<  8;
271   salt_buf_t1[2] = salt_buf[1] >> 24 | salt_buf[2] <<  8;
272   salt_buf_t1[3] = salt_buf[2] >> 24 | salt_buf[3] <<  8;
273   salt_buf_t1[4] = salt_buf[3] >> 24;
274
275   salt_buf_t2[0] =                     salt_buf[0] << 16;
276   salt_buf_t2[1] = salt_buf[0] >> 16 | salt_buf[1] << 16;
277   salt_buf_t2[2] = salt_buf[1] >> 16 | salt_buf[2] << 16;
278   salt_buf_t2[3] = salt_buf[2] >> 16 | salt_buf[3] << 16;
279   salt_buf_t2[4] = salt_buf[3] >> 16;
280
281   salt_buf_t3[0] =                     salt_buf[0] << 24;
282   salt_buf_t3[1] = salt_buf[0] >>  8 | salt_buf[1] << 24;
283   salt_buf_t3[2] = salt_buf[1] >>  8 | salt_buf[2] << 24;
284   salt_buf_t3[3] = salt_buf[2] >>  8 | salt_buf[3] << 24;
285   salt_buf_t3[4] = salt_buf[3] >>  8;
286
287   u32 w0_t[4];
288   u32 w1_t[4];
289   u32 w2_t[4];
290   u32 w3_t[4];
291
292   // generate the 16 * 21 buffer
293
294   w0_t[0] = 0;
295   w0_t[1] = 0;
296   w0_t[2] = 0;
297   w0_t[3] = 0;
298   w1_t[0] = 0;
299   w1_t[1] = 0;
300   w1_t[2] = 0;
301   w1_t[3] = 0;
302   w2_t[0] = 0;
303   w2_t[1] = 0;
304   w2_t[2] = 0;
305   w2_t[3] = 0;
306   w3_t[0] = 0;
307   w3_t[1] = 0;
308   w3_t[2] = 0;
309   w3_t[3] = 0;
310
311   // 0..5
312   w0_t[0]  = digest_t0[0];
313   w0_t[1]  = digest_t0[1];
314
315   // 5..21
316   w0_t[1] |= salt_buf_t1[0];
317   w0_t[2]  = salt_buf_t1[1];
318   w0_t[3]  = salt_buf_t1[2];
319   w1_t[0]  = salt_buf_t1[3];
320   w1_t[1]  = salt_buf_t1[4];
321
322   // 21..26
323   w1_t[1] |= digest_t1[0];
324   w1_t[2]  = digest_t1[1];
325
326   // 26..42
327   w1_t[2] |= salt_buf_t2[0];
328   w1_t[3]  = salt_buf_t2[1];
329   w2_t[0]  = salt_buf_t2[2];
330   w2_t[1]  = salt_buf_t2[3];
331   w2_t[2]  = salt_buf_t2[4];
332
333   // 42..47
334   w2_t[2] |= digest_t2[0];
335   w2_t[3]  = digest_t2[1];
336
337   // 47..63
338   w2_t[3] |= salt_buf_t3[0];
339   w3_t[0]  = salt_buf_t3[1];
340   w3_t[1]  = salt_buf_t3[2];
341   w3_t[2]  = salt_buf_t3[3];
342   w3_t[3]  = salt_buf_t3[4];
343
344   // 63..
345
346   w3_t[3] |= digest_t3[0];
347
348   md5_transform (w0_t, w1_t, w2_t, w3_t, digest);
349
350   w0_t[0] = 0;
351   w0_t[1] = 0;
352   w0_t[2] = 0;
353   w0_t[3] = 0;
354   w1_t[0] = 0;
355   w1_t[1] = 0;
356   w1_t[2] = 0;
357   w1_t[3] = 0;
358   w2_t[0] = 0;
359   w2_t[1] = 0;
360   w2_t[2] = 0;
361   w2_t[3] = 0;
362   w3_t[0] = 0;
363   w3_t[1] = 0;
364   w3_t[2] = 0;
365   w3_t[3] = 0;
366
367   // 0..4
368   w0_t[0]  = digest_t3[1];
369
370   // 4..20
371   w0_t[1]  = salt_buf_t0[0];
372   w0_t[2]  = salt_buf_t0[1];
373   w0_t[3]  = salt_buf_t0[2];
374   w1_t[0]  = salt_buf_t0[3];
375
376   // 20..25
377   w1_t[1]  = digest_t0[0];
378   w1_t[2]  = digest_t0[1];
379
380   // 25..41
381   w1_t[2] |= salt_buf_t1[0];
382   w1_t[3]  = salt_buf_t1[1];
383   w2_t[0]  = salt_buf_t1[2];
384   w2_t[1]  = salt_buf_t1[3];
385   w2_t[2]  = salt_buf_t1[4];
386
387   // 41..46
388   w2_t[2] |= digest_t1[0];
389   w2_t[3]  = digest_t1[1];
390
391   // 46..62
392   w2_t[3] |= salt_buf_t2[0];
393   w3_t[0]  = salt_buf_t2[1];
394   w3_t[1]  = salt_buf_t2[2];
395   w3_t[2]  = salt_buf_t2[3];
396   w3_t[3]  = salt_buf_t2[4];
397
398   // 62..
399   w3_t[3] |= digest_t2[0];
400
401   md5_transform (w0_t, w1_t, w2_t, w3_t, digest);
402
403   w0_t[0] = 0;
404   w0_t[1] = 0;
405   w0_t[2] = 0;
406   w0_t[3] = 0;
407   w1_t[0] = 0;
408   w1_t[1] = 0;
409   w1_t[2] = 0;
410   w1_t[3] = 0;
411   w2_t[0] = 0;
412   w2_t[1] = 0;
413   w2_t[2] = 0;
414   w2_t[3] = 0;
415   w3_t[0] = 0;
416   w3_t[1] = 0;
417   w3_t[2] = 0;
418   w3_t[3] = 0;
419
420   // 0..3
421   w0_t[0]  = digest_t2[1];
422
423   // 3..19
424   w0_t[0] |= salt_buf_t3[0];
425   w0_t[1]  = salt_buf_t3[1];
426   w0_t[2]  = salt_buf_t3[2];
427   w0_t[3]  = salt_buf_t3[3];
428   w1_t[0]  = salt_buf_t3[4];
429
430   // 19..24
431   w1_t[0] |= digest_t3[0];
432   w1_t[1]  = digest_t3[1];
433
434   // 24..40
435   w1_t[2]  = salt_buf_t0[0];
436   w1_t[3]  = salt_buf_t0[1];
437   w2_t[0]  = salt_buf_t0[2];
438   w2_t[1]  = salt_buf_t0[3];
439
440   // 40..45
441   w2_t[2]  = digest_t0[0];
442   w2_t[3]  = digest_t0[1];
443
444   // 45..61
445   w2_t[3] |= salt_buf_t1[0];
446   w3_t[0]  = salt_buf_t1[1];
447   w3_t[1]  = salt_buf_t1[2];
448   w3_t[2]  = salt_buf_t1[3];
449   w3_t[3]  = salt_buf_t1[4];
450
451   // 61..
452   w3_t[3] |= digest_t1[0];
453
454   md5_transform (w0_t, w1_t, w2_t, w3_t, digest);
455
456   w0_t[0] = 0;
457   w0_t[1] = 0;
458   w0_t[2] = 0;
459   w0_t[3] = 0;
460   w1_t[0] = 0;
461   w1_t[1] = 0;
462   w1_t[2] = 0;
463   w1_t[3] = 0;
464   w2_t[0] = 0;
465   w2_t[1] = 0;
466   w2_t[2] = 0;
467   w2_t[3] = 0;
468   w3_t[0] = 0;
469   w3_t[1] = 0;
470   w3_t[2] = 0;
471   w3_t[3] = 0;
472
473   // 0..2
474   w0_t[0]  = digest_t1[1];
475
476   // 2..18
477   w0_t[0] |= salt_buf_t2[0];
478   w0_t[1]  = salt_buf_t2[1];
479   w0_t[2]  = salt_buf_t2[2];
480   w0_t[3]  = salt_buf_t2[3];
481   w1_t[0]  = salt_buf_t2[4];
482
483   // 18..23
484   w1_t[0] |= digest_t2[0];
485   w1_t[1]  = digest_t2[1];
486
487   // 23..39
488   w1_t[1] |= salt_buf_t3[0];
489   w1_t[2]  = salt_buf_t3[1];
490   w1_t[3]  = salt_buf_t3[2];
491   w2_t[0]  = salt_buf_t3[3];
492   w2_t[1]  = salt_buf_t3[4];
493
494   // 39..44
495   w2_t[1] |= digest_t3[0];
496   w2_t[2]  = digest_t3[1];
497
498   // 44..60
499   w2_t[3]  = salt_buf_t0[0];
500   w3_t[0]  = salt_buf_t0[1];
501   w3_t[1]  = salt_buf_t0[2];
502   w3_t[2]  = salt_buf_t0[3];
503
504   // 60..
505   w3_t[3]  = digest_t0[0];
506
507   md5_transform (w0_t, w1_t, w2_t, w3_t, digest);
508
509   w0_t[0] = 0;
510   w0_t[1] = 0;
511   w0_t[2] = 0;
512   w0_t[3] = 0;
513   w1_t[0] = 0;
514   w1_t[1] = 0;
515   w1_t[2] = 0;
516   w1_t[3] = 0;
517   w2_t[0] = 0;
518   w2_t[1] = 0;
519   w2_t[2] = 0;
520   w2_t[3] = 0;
521   w3_t[0] = 0;
522   w3_t[1] = 0;
523   w3_t[2] = 0;
524   w3_t[3] = 0;
525
526   // 0..1
527   w0_t[0]  = digest_t0[1];
528
529   // 1..17
530   w0_t[0] |= salt_buf_t1[0];
531   w0_t[1]  = salt_buf_t1[1];
532   w0_t[2]  = salt_buf_t1[2];
533   w0_t[3]  = salt_buf_t1[3];
534   w1_t[0]  = salt_buf_t1[4];
535
536   // 17..22
537   w1_t[0] |= digest_t1[0];
538   w1_t[1]  = digest_t1[1];
539
540   // 22..38
541   w1_t[1] |= salt_buf_t2[0];
542   w1_t[2]  = salt_buf_t2[1];
543   w1_t[3]  = salt_buf_t2[2];
544   w2_t[0]  = salt_buf_t2[3];
545   w2_t[1]  = salt_buf_t2[4];
546
547   // 38..43
548   w2_t[1] |= digest_t2[0];
549   w2_t[2]  = digest_t2[1];
550
551   // 43..59
552   w2_t[2] |= salt_buf_t3[0];
553   w2_t[3]  = salt_buf_t3[1];
554   w3_t[0]  = salt_buf_t3[2];
555   w3_t[1]  = salt_buf_t3[3];
556   w3_t[2]  = salt_buf_t3[4];
557
558   // 59..
559   w3_t[2] |= digest_t3[0];
560   w3_t[3]  = digest_t3[1];
561
562   md5_transform (w0_t, w1_t, w2_t, w3_t, digest);
563
564   w0_t[0]  = salt_buf_t0[0];
565   w0_t[1]  = salt_buf_t0[1];
566   w0_t[2]  = salt_buf_t0[2];
567   w0_t[3]  = salt_buf_t0[3];
568   w1_t[0]  = 0x80;
569   w1_t[1]  = 0;
570   w1_t[2]  = 0;
571   w1_t[3]  = 0;
572   w2_t[0]  = 0;
573   w2_t[1]  = 0;
574   w2_t[2]  = 0;
575   w2_t[3]  = 0;
576   w3_t[0]  = 0;
577   w3_t[1]  = 0;
578   w3_t[2]  = 21 * 16 * 8;
579   w3_t[3]  = 0;
580
581   md5_transform (w0_t, w1_t, w2_t, w3_t, digest);
582 }
583
584 __kernel void m09700_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 oldoffice01_t *oldoffice01_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
585 {
586   /**
587    * modifier
588    */
589
590   const u32 lid = get_local_id (0);
591
592   __local RC4_KEY rc4_keys[64];
593
594   __local RC4_KEY *rc4_key = &rc4_keys[lid];
595
596   /**
597    * base
598    */
599
600   const u32 gid = get_global_id (0);
601
602   if (gid >= gid_max) return;
603
604   u32 wordl0[4];
605
606   wordl0[0] = pws[gid].i[ 0];
607   wordl0[1] = pws[gid].i[ 1];
608   wordl0[2] = pws[gid].i[ 2];
609   wordl0[3] = pws[gid].i[ 3];
610
611   u32 wordl1[4];
612
613   wordl1[0] = pws[gid].i[ 4];
614   wordl1[1] = pws[gid].i[ 5];
615   wordl1[2] = pws[gid].i[ 6];
616   wordl1[3] = pws[gid].i[ 7];
617
618   u32 wordl2[4];
619
620   wordl2[0] = 0;
621   wordl2[1] = 0;
622   wordl2[2] = 0;
623   wordl2[3] = 0;
624
625   u32 wordl3[4];
626
627   wordl3[0] = 0;
628   wordl3[1] = 0;
629   wordl3[2] = 0;
630   wordl3[3] = 0;
631
632   const u32 pw_l_len = pws[gid].pw_len;
633
634   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
635   {
636     switch_buffer_by_offset_le (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
637   }
638
639   /**
640    * digest
641    */
642
643   const u32 search[4] =
644   {
645     digests_buf[digests_offset].digest_buf[DGST_R0],
646     digests_buf[digests_offset].digest_buf[DGST_R1],
647     digests_buf[digests_offset].digest_buf[DGST_R2],
648     digests_buf[digests_offset].digest_buf[DGST_R3]
649   };
650
651   /**
652    * salt
653    */
654
655   u32 salt_buf[4];
656
657   salt_buf[0] = salt_bufs[salt_pos].salt_buf[0];
658   salt_buf[1] = salt_bufs[salt_pos].salt_buf[1];
659   salt_buf[2] = salt_bufs[salt_pos].salt_buf[2];
660   salt_buf[3] = salt_bufs[salt_pos].salt_buf[3];
661
662   /**
663    * esalt
664    */
665
666   const u32 version = oldoffice01_bufs[salt_pos].version;
667
668   u32 encryptedVerifier[4];
669
670   encryptedVerifier[0] = oldoffice01_bufs[salt_pos].encryptedVerifier[0];
671   encryptedVerifier[1] = oldoffice01_bufs[salt_pos].encryptedVerifier[1];
672   encryptedVerifier[2] = oldoffice01_bufs[salt_pos].encryptedVerifier[2];
673   encryptedVerifier[3] = oldoffice01_bufs[salt_pos].encryptedVerifier[3];
674
675   /**
676    * loop
677    */
678
679   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
680   {
681     const u32 pw_r_len = combs_buf[il_pos].pw_len;
682
683     const u32 pw_len = pw_l_len + pw_r_len;
684
685     u32 wordr0[4];
686
687     wordr0[0] = combs_buf[il_pos].i[0];
688     wordr0[1] = combs_buf[il_pos].i[1];
689     wordr0[2] = combs_buf[il_pos].i[2];
690     wordr0[3] = combs_buf[il_pos].i[3];
691
692     u32 wordr1[4];
693
694     wordr1[0] = combs_buf[il_pos].i[4];
695     wordr1[1] = combs_buf[il_pos].i[5];
696     wordr1[2] = combs_buf[il_pos].i[6];
697     wordr1[3] = combs_buf[il_pos].i[7];
698
699     u32 wordr2[4];
700
701     wordr2[0] = 0;
702     wordr2[1] = 0;
703     wordr2[2] = 0;
704     wordr2[3] = 0;
705
706     u32 wordr3[4];
707
708     wordr3[0] = 0;
709     wordr3[1] = 0;
710     wordr3[2] = 0;
711     wordr3[3] = 0;
712
713     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
714     {
715       switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
716     }
717
718     u32 w0[4];
719
720     w0[0] = wordl0[0] | wordr0[0];
721     w0[1] = wordl0[1] | wordr0[1];
722     w0[2] = wordl0[2] | wordr0[2];
723     w0[3] = wordl0[3] | wordr0[3];
724
725     u32 w1[4];
726
727     w1[0] = wordl1[0] | wordr1[0];
728     w1[1] = wordl1[1] | wordr1[1];
729     w1[2] = wordl1[2] | wordr1[2];
730     w1[3] = wordl1[3] | wordr1[3];
731
732     u32 w2[4];
733
734     w2[0] = wordl2[0] | wordr2[0];
735     w2[1] = wordl2[1] | wordr2[1];
736     w2[2] = wordl2[2] | wordr2[2];
737     w2[3] = wordl2[3] | wordr2[3];
738
739     u32 w3[4];
740
741     w3[0] = wordl3[0] | wordr3[0];
742     w3[1] = wordl3[1] | wordr3[1];
743     w3[2] = 0;
744     w3[3] = 0;
745
746     append_0x80_2x4 (w0, w1, pw_len);
747
748     u32 w0_t[4];
749     u32 w1_t[4];
750     u32 w2_t[4];
751     u32 w3_t[4];
752
753     make_unicode (w0, w0_t, w1_t);
754     make_unicode (w1, w2_t, w3_t);
755
756     w3_t[2] = pw_len * 8 * 2;
757
758     u32 digest_pre[4];
759
760     digest_pre[0] = MD5M_A;
761     digest_pre[1] = MD5M_B;
762     digest_pre[2] = MD5M_C;
763     digest_pre[3] = MD5M_D;
764
765     md5_transform (w0_t, w1_t, w2_t, w3_t, digest_pre);
766
767     digest_pre[0] &= 0xffffffff;
768     digest_pre[1] &= 0x000000ff;
769     digest_pre[2] &= 0x00000000;
770     digest_pre[3] &= 0x00000000;
771
772     u32 digest[4];
773
774     digest[0] = MD5M_A;
775     digest[1] = MD5M_B;
776     digest[2] = MD5M_C;
777     digest[3] = MD5M_D;
778
779     gen336 (digest_pre, salt_buf, digest);
780
781     // now the 40 bit input for the MD5 which then will generate the RC4 key, so it's precomputable!
782
783     w0_t[0]  = digest[0];
784     w0_t[1]  = digest[1] & 0xff;
785     w0_t[2]  = 0x8000;
786     w0_t[3]  = 0;
787     w1_t[0]  = 0;
788     w1_t[1]  = 0;
789     w1_t[2]  = 0;
790     w1_t[3]  = 0;
791     w2_t[0]  = 0;
792     w2_t[1]  = 0;
793     w2_t[2]  = 0;
794     w2_t[3]  = 0;
795     w3_t[0]  = 0;
796     w3_t[1]  = 0;
797     w3_t[2]  = 9 * 8;
798     w3_t[3]  = 0;
799
800     digest[0] = MD5M_A;
801     digest[1] = MD5M_B;
802     digest[2] = MD5M_C;
803     digest[3] = MD5M_D;
804
805     md5_transform (w0_t, w1_t, w2_t, w3_t, digest);
806
807     // now the RC4 part
808
809     u32 key[4];
810
811     key[0] = digest[0];
812     key[1] = digest[1];
813     key[2] = digest[2];
814     key[3] = digest[3];
815
816     rc4_init_16 (rc4_key, key);
817
818     u32 out[4];
819
820     u8 j = rc4_next_16 (rc4_key, 0, 0, encryptedVerifier, out);
821
822     w0_t[0] = out[0];
823     w0_t[1] = out[1];
824     w0_t[2] = out[2];
825     w0_t[3] = out[3];
826     w1_t[0] = 0x80;
827     w1_t[1] = 0;
828     w1_t[2] = 0;
829     w1_t[3] = 0;
830     w2_t[0] = 0;
831     w2_t[1] = 0;
832     w2_t[2] = 0;
833     w2_t[3] = 0;
834     w3_t[0] = 0;
835     w3_t[1] = 0;
836     w3_t[2] = 16 * 8;
837     w3_t[3] = 0;
838
839     digest[0] = MD5M_A;
840     digest[1] = MD5M_B;
841     digest[2] = MD5M_C;
842     digest[3] = MD5M_D;
843
844     md5_transform (w0_t, w1_t, w2_t, w3_t, digest);
845
846     rc4_next_16 (rc4_key, 16, j, digest, out);
847
848     const u32 r0 = out[0];
849     const u32 r1 = out[1];
850     const u32 r2 = out[2];
851     const u32 r3 = out[3];
852
853     #include COMPARE_M
854   }
855 }
856
857 __kernel void m09700_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 oldoffice01_t *oldoffice01_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
858 {
859 }
860
861 __kernel void m09700_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 oldoffice01_t *oldoffice01_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
862 {
863 }
864
865 __kernel void m09700_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 oldoffice01_t *oldoffice01_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
866 {
867   /**
868    * modifier
869    */
870
871   const u32 lid = get_local_id (0);
872
873   __local RC4_KEY rc4_keys[64];
874
875   __local RC4_KEY *rc4_key = &rc4_keys[lid];
876
877   /**
878    * base
879    */
880
881   const u32 gid = get_global_id (0);
882
883   if (gid >= gid_max) return;
884
885   u32 wordl0[4];
886
887   wordl0[0] = pws[gid].i[ 0];
888   wordl0[1] = pws[gid].i[ 1];
889   wordl0[2] = pws[gid].i[ 2];
890   wordl0[3] = pws[gid].i[ 3];
891
892   u32 wordl1[4];
893
894   wordl1[0] = pws[gid].i[ 4];
895   wordl1[1] = pws[gid].i[ 5];
896   wordl1[2] = pws[gid].i[ 6];
897   wordl1[3] = pws[gid].i[ 7];
898
899   u32 wordl2[4];
900
901   wordl2[0] = 0;
902   wordl2[1] = 0;
903   wordl2[2] = 0;
904   wordl2[3] = 0;
905
906   u32 wordl3[4];
907
908   wordl3[0] = 0;
909   wordl3[1] = 0;
910   wordl3[2] = 0;
911   wordl3[3] = 0;
912
913   const u32 pw_l_len = pws[gid].pw_len;
914
915   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
916   {
917     switch_buffer_by_offset_le (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
918   }
919
920   /**
921    * digest
922    */
923
924   const u32 search[4] =
925   {
926     digests_buf[digests_offset].digest_buf[DGST_R0],
927     digests_buf[digests_offset].digest_buf[DGST_R1],
928     digests_buf[digests_offset].digest_buf[DGST_R2],
929     digests_buf[digests_offset].digest_buf[DGST_R3]
930   };
931
932   /**
933    * salt
934    */
935
936   u32 salt_buf[4];
937
938   salt_buf[0] = salt_bufs[salt_pos].salt_buf[0];
939   salt_buf[1] = salt_bufs[salt_pos].salt_buf[1];
940   salt_buf[2] = salt_bufs[salt_pos].salt_buf[2];
941   salt_buf[3] = salt_bufs[salt_pos].salt_buf[3];
942
943   /**
944    * esalt
945    */
946
947   const u32 version = oldoffice01_bufs[salt_pos].version;
948
949   u32 encryptedVerifier[4];
950
951   encryptedVerifier[0] = oldoffice01_bufs[salt_pos].encryptedVerifier[0];
952   encryptedVerifier[1] = oldoffice01_bufs[salt_pos].encryptedVerifier[1];
953   encryptedVerifier[2] = oldoffice01_bufs[salt_pos].encryptedVerifier[2];
954   encryptedVerifier[3] = oldoffice01_bufs[salt_pos].encryptedVerifier[3];
955
956   /**
957    * loop
958    */
959
960   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
961   {
962     const u32 pw_r_len = combs_buf[il_pos].pw_len;
963
964     const u32 pw_len = pw_l_len + pw_r_len;
965
966     u32 wordr0[4];
967
968     wordr0[0] = combs_buf[il_pos].i[0];
969     wordr0[1] = combs_buf[il_pos].i[1];
970     wordr0[2] = combs_buf[il_pos].i[2];
971     wordr0[3] = combs_buf[il_pos].i[3];
972
973     u32 wordr1[4];
974
975     wordr1[0] = combs_buf[il_pos].i[4];
976     wordr1[1] = combs_buf[il_pos].i[5];
977     wordr1[2] = combs_buf[il_pos].i[6];
978     wordr1[3] = combs_buf[il_pos].i[7];
979
980     u32 wordr2[4];
981
982     wordr2[0] = 0;
983     wordr2[1] = 0;
984     wordr2[2] = 0;
985     wordr2[3] = 0;
986
987     u32 wordr3[4];
988
989     wordr3[0] = 0;
990     wordr3[1] = 0;
991     wordr3[2] = 0;
992     wordr3[3] = 0;
993
994     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
995     {
996       switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
997     }
998
999     u32 w0[4];
1000
1001     w0[0] = wordl0[0] | wordr0[0];
1002     w0[1] = wordl0[1] | wordr0[1];
1003     w0[2] = wordl0[2] | wordr0[2];
1004     w0[3] = wordl0[3] | wordr0[3];
1005
1006     u32 w1[4];
1007
1008     w1[0] = wordl1[0] | wordr1[0];
1009     w1[1] = wordl1[1] | wordr1[1];
1010     w1[2] = wordl1[2] | wordr1[2];
1011     w1[3] = wordl1[3] | wordr1[3];
1012
1013     u32 w2[4];
1014
1015     w2[0] = wordl2[0] | wordr2[0];
1016     w2[1] = wordl2[1] | wordr2[1];
1017     w2[2] = wordl2[2] | wordr2[2];
1018     w2[3] = wordl2[3] | wordr2[3];
1019
1020     u32 w3[4];
1021
1022     w3[0] = wordl3[0] | wordr3[0];
1023     w3[1] = wordl3[1] | wordr3[1];
1024     w3[2] = 0;
1025     w3[3] = 0;
1026
1027     append_0x80_2x4 (w0, w1, pw_len);
1028
1029     u32 w0_t[4];
1030     u32 w1_t[4];
1031     u32 w2_t[4];
1032     u32 w3_t[4];
1033
1034     make_unicode (w0, w0_t, w1_t);
1035     make_unicode (w1, w2_t, w3_t);
1036
1037     w3_t[2] = pw_len * 8 * 2;
1038
1039     u32 digest_pre[4];
1040
1041     digest_pre[0] = MD5M_A;
1042     digest_pre[1] = MD5M_B;
1043     digest_pre[2] = MD5M_C;
1044     digest_pre[3] = MD5M_D;
1045
1046     md5_transform (w0_t, w1_t, w2_t, w3_t, digest_pre);
1047
1048     digest_pre[0] &= 0xffffffff;
1049     digest_pre[1] &= 0x000000ff;
1050     digest_pre[2] &= 0x00000000;
1051     digest_pre[3] &= 0x00000000;
1052
1053     u32 digest[4];
1054
1055     digest[0] = MD5M_A;
1056     digest[1] = MD5M_B;
1057     digest[2] = MD5M_C;
1058     digest[3] = MD5M_D;
1059
1060     gen336 (digest_pre, salt_buf, digest);
1061
1062     // now the 40 bit input for the MD5 which then will generate the RC4 key, so it's precomputable!
1063
1064     w0_t[0]  = digest[0];
1065     w0_t[1]  = digest[1] & 0xff;
1066     w0_t[2]  = 0x8000;
1067     w0_t[3]  = 0;
1068     w1_t[0]  = 0;
1069     w1_t[1]  = 0;
1070     w1_t[2]  = 0;
1071     w1_t[3]  = 0;
1072     w2_t[0]  = 0;
1073     w2_t[1]  = 0;
1074     w2_t[2]  = 0;
1075     w2_t[3]  = 0;
1076     w3_t[0]  = 0;
1077     w3_t[1]  = 0;
1078     w3_t[2]  = 9 * 8;
1079     w3_t[3]  = 0;
1080
1081     digest[0] = MD5M_A;
1082     digest[1] = MD5M_B;
1083     digest[2] = MD5M_C;
1084     digest[3] = MD5M_D;
1085
1086     md5_transform (w0_t, w1_t, w2_t, w3_t, digest);
1087
1088     // now the RC4 part
1089
1090     u32 key[4];
1091
1092     key[0] = digest[0];
1093     key[1] = digest[1];
1094     key[2] = digest[2];
1095     key[3] = digest[3];
1096
1097     rc4_init_16 (rc4_key, key);
1098
1099     u32 out[4];
1100
1101     u8 j = rc4_next_16 (rc4_key, 0, 0, encryptedVerifier, out);
1102
1103     w0_t[0] = out[0];
1104     w0_t[1] = out[1];
1105     w0_t[2] = out[2];
1106     w0_t[3] = out[3];
1107     w1_t[0] = 0x80;
1108     w1_t[1] = 0;
1109     w1_t[2] = 0;
1110     w1_t[3] = 0;
1111     w2_t[0] = 0;
1112     w2_t[1] = 0;
1113     w2_t[2] = 0;
1114     w2_t[3] = 0;
1115     w3_t[0] = 0;
1116     w3_t[1] = 0;
1117     w3_t[2] = 16 * 8;
1118     w3_t[3] = 0;
1119
1120     digest[0] = MD5M_A;
1121     digest[1] = MD5M_B;
1122     digest[2] = MD5M_C;
1123     digest[3] = MD5M_D;
1124
1125     md5_transform (w0_t, w1_t, w2_t, w3_t, digest);
1126
1127     rc4_next_16 (rc4_key, 16, j, digest, out);
1128
1129     const u32 r0 = out[0];
1130     const u32 r1 = out[1];
1131     const u32 r2 = out[2];
1132     const u32 r3 = out[3];
1133
1134     #include COMPARE_S
1135   }
1136 }
1137
1138 __kernel void m09700_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 oldoffice01_t *oldoffice01_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
1139 {
1140 }
1141
1142 __kernel void m09700_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 oldoffice01_t *oldoffice01_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
1143 {
1144 }