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