Fix append_* function calls
[hashcat.git] / OpenCL / m11000_a1.cl
1 /**
2  * Author......: Jens Steube <jens.steube@gmail.com>
3  * License.....: MIT
4  */
5
6 #define _MD5_
7
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
10
11 #define DGST_R0 0
12 #define DGST_R1 3
13 #define DGST_R2 2
14 #define DGST_R3 1
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 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11000_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 void *esalt_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)
24 {
25   /**
26    * modifier
27    */
28
29   const u32 lid = get_local_id (0);
30
31   /**
32    * base
33    */
34
35   const u32 gid = get_global_id (0);
36
37   if (gid >= gid_max) return;
38
39   u32 wordl0[4];
40
41   wordl0[0] = pws[gid].i[ 0];
42   wordl0[1] = pws[gid].i[ 1];
43   wordl0[2] = pws[gid].i[ 2];
44   wordl0[3] = pws[gid].i[ 3];
45
46   u32 wordl1[4];
47
48   wordl1[0] = pws[gid].i[ 4];
49   wordl1[1] = pws[gid].i[ 5];
50   wordl1[2] = pws[gid].i[ 6];
51   wordl1[3] = pws[gid].i[ 7];
52
53   u32 wordl2[4];
54
55   wordl2[0] = 0;
56   wordl2[1] = 0;
57   wordl2[2] = 0;
58   wordl2[3] = 0;
59
60   u32 wordl3[4];
61
62   wordl3[0] = 0;
63   wordl3[1] = 0;
64   wordl3[2] = 0;
65   wordl3[3] = 0;
66
67   const u32 pw_l_len = pws[gid].pw_len;
68
69   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
70   {
71     switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
72   }
73
74   /**
75    * salt
76    */
77
78   u32 salt_buf0[4];
79
80   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
81   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
82   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
83   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
84
85   u32 salt_buf1[4];
86
87   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
88   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
89   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
90   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
91
92   u32 salt_buf2[4];
93
94   salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
95   salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
96   salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
97   salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
98
99   u32 salt_buf3[2];
100
101   salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
102   salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
103
104   const u32 salt_len = salt_bufs[salt_pos].salt_len;
105
106   /**
107    * loop
108    */
109
110   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
111   {
112     const u32 pw_r_len = combs_buf[il_pos].pw_len;
113
114     const u32 pw_len = pw_l_len + pw_r_len;
115
116     u32 wordr0[4];
117     u32 wordr1[4];
118     u32 wordr2[4];
119     u32 wordr3[4];
120
121     wordr0[0] = combs_buf[il_pos].i[0];
122     wordr0[1] = combs_buf[il_pos].i[1];
123     wordr0[2] = combs_buf[il_pos].i[2];
124     wordr0[3] = combs_buf[il_pos].i[3];
125     wordr1[0] = combs_buf[il_pos].i[4];
126     wordr1[1] = combs_buf[il_pos].i[5];
127     wordr1[2] = combs_buf[il_pos].i[6];
128     wordr1[3] = combs_buf[il_pos].i[7];
129     wordr2[0] = 0;
130     wordr2[1] = 0;
131     wordr2[2] = 0;
132     wordr2[3] = 0;
133     wordr3[0] = 0;
134     wordr3[1] = 0;
135     wordr3[2] = 0;
136     wordr3[3] = 0;
137
138     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
139     {
140       switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
141     }
142
143     u32 w0[4];
144     u32 w1[4];
145     u32 w2[4];
146     u32 w3[4];
147
148     w0[0] = wordl0[0] | wordr0[0];
149     w0[1] = wordl0[1] | wordr0[1];
150     w0[2] = wordl0[2] | wordr0[2];
151     w0[3] = wordl0[3] | wordr0[3];
152     w1[0] = wordl1[0] | wordr1[0];
153     w1[1] = wordl1[1] | wordr1[1];
154     w1[2] = wordl1[2] | wordr1[2];
155     w1[3] = wordl1[3] | wordr1[3];
156     w2[0] = wordl2[0] | wordr2[0];
157     w2[1] = wordl2[1] | wordr2[1];
158     w2[2] = wordl2[2] | wordr2[2];
159     w2[3] = wordl2[3] | wordr2[3];
160     w3[0] = wordl3[0] | wordr3[0];
161     w3[1] = wordl3[1] | wordr3[1];
162     w3[2] = wordl3[2] | wordr3[2];
163     w3[3] = wordl3[3] | wordr3[3];
164
165     append_0x80_4x4 (w0, w1, w2, w3, pw_len);
166
167     const u32 pw_salt_len = pw_len + salt_len;
168
169     /**
170      * prepend salt
171      */
172
173     // first step fixed 56 bytes of salt
174
175     u32 w0_t[4];
176     u32 w1_t[4];
177     u32 w2_t[4];
178     u32 w3_t[4];
179
180     w0_t[0] = salt_buf0[0];
181     w0_t[1] = salt_buf0[1];
182     w0_t[2] = salt_buf0[2];
183     w0_t[3] = salt_buf0[3];
184     w1_t[0] = salt_buf1[0];
185     w1_t[1] = salt_buf1[1];
186     w1_t[2] = salt_buf1[2];
187     w1_t[3] = salt_buf1[3];
188     w2_t[0] = salt_buf2[0];
189     w2_t[1] = salt_buf2[1];
190     w2_t[2] = salt_buf2[2];
191     w2_t[3] = salt_buf2[3];
192     w3_t[0] = salt_buf3[0];
193     w3_t[1] = salt_buf3[1];
194
195     // after 56 byte salt, we have beginning of the password
196
197     w3_t[2] = w0[0];
198     w3_t[3] = w0[1];
199
200     /**
201      * md5
202      */
203
204     // first transform
205
206     u32 a = MD5M_A;
207     u32 b = MD5M_B;
208     u32 c = MD5M_C;
209     u32 d = MD5M_D;
210
211     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
212     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
213     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
214     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
215     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
216     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
217     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
218     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
219     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
220     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
221     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
222     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
223     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
224     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
225     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
226     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
227
228     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
229     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
230     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
231     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
232     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
233     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
234     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
235     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
236     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
237     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
238     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
239     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
240     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
241     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
242     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
243     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
244
245     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
246     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
247     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
248     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
249     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
250     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
251     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
252     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
253     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
254     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
255     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
256     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
257     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
258     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
259     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
260     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
261
262     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
263     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
264     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
265     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
266     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
267     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
268     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
269     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
270     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
271     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
272     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
273     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
274     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
275     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
276     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
277     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
278
279     a += MD5M_A;
280     b += MD5M_B;
281     c += MD5M_C;
282     d += MD5M_D;
283
284     u32 r_a = a;
285     u32 r_b = b;
286     u32 r_c = c;
287     u32 r_d = d;
288
289     // 2nd transform
290
291     w0_t[0] = w0[2];
292     w0_t[1] = w0[3];
293     w0_t[2] = w1[0];
294     w0_t[3] = w1[1];
295     w1_t[0] = w1[2];
296     w1_t[1] = w1[3];
297     w1_t[2] = w2[0];
298     w1_t[3] = w2[1];
299     w2_t[0] = w2[2];
300     w2_t[1] = w2[3];
301     w2_t[2] = w3[0];
302     w2_t[3] = w3[1];
303     w3_t[0] = w3[2];
304     w3_t[1] = w3[3];
305     w3_t[2] = pw_salt_len * 8;
306     w3_t[3] = 0;
307
308     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
309     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
310     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
311     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
312     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
313     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
314     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
315     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
316     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
317     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
318     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
319     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
320     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
321     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
322     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
323     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
324
325     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
326     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
327     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
328     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
329     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
330     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
331     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
332     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
333     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
334     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
335     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
336     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
337     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
338     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
339     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
340     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
341
342     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
343     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
344     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
345     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
346     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
347     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
348     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
349     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
350     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
351     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
352     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
353     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
354     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
355     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
356     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
357     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
358
359     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
360     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
361     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
362     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
363     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
364     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
365     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
366     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
367     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
368     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
369     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
370     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
371     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
372     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
373     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
374     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
375
376     a += r_a;
377     b += r_b;
378     c += r_c;
379     d += r_d;
380
381     const u32 r0 = a;
382     const u32 r1 = d;
383     const u32 r2 = c;
384     const u32 r3 = b;
385
386     #include COMPARE_M
387   }
388 }
389
390 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11000_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 void *esalt_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)
391 {
392 }
393
394 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11000_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 void *esalt_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)
395 {
396 }
397
398 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11000_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 void *esalt_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)
399 {
400   /**
401    * modifier
402    */
403
404   const u32 lid = get_local_id (0);
405
406   /**
407    * base
408    */
409
410   const u32 gid = get_global_id (0);
411
412   if (gid >= gid_max) return;
413
414   u32 wordl0[4];
415
416   wordl0[0] = pws[gid].i[ 0];
417   wordl0[1] = pws[gid].i[ 1];
418   wordl0[2] = pws[gid].i[ 2];
419   wordl0[3] = pws[gid].i[ 3];
420
421   u32 wordl1[4];
422
423   wordl1[0] = pws[gid].i[ 4];
424   wordl1[1] = pws[gid].i[ 5];
425   wordl1[2] = pws[gid].i[ 6];
426   wordl1[3] = pws[gid].i[ 7];
427
428   u32 wordl2[4];
429
430   wordl2[0] = 0;
431   wordl2[1] = 0;
432   wordl2[2] = 0;
433   wordl2[3] = 0;
434
435   u32 wordl3[4];
436
437   wordl3[0] = 0;
438   wordl3[1] = 0;
439   wordl3[2] = 0;
440   wordl3[3] = 0;
441
442   const u32 pw_l_len = pws[gid].pw_len;
443
444   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
445   {
446     switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
447   }
448
449   /**
450    * salt
451    */
452
453   u32 salt_buf0[4];
454
455   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
456   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
457   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
458   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
459
460   u32 salt_buf1[4];
461
462   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
463   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
464   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
465   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
466
467   u32 salt_buf2[4];
468
469   salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
470   salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
471   salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
472   salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
473
474   u32 salt_buf3[2];
475
476   salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
477   salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
478
479   const u32 salt_len = salt_bufs[salt_pos].salt_len;
480
481   /**
482    * digest
483    */
484
485   const u32 search[4] =
486   {
487     digests_buf[digests_offset].digest_buf[DGST_R0],
488     digests_buf[digests_offset].digest_buf[DGST_R1],
489     digests_buf[digests_offset].digest_buf[DGST_R2],
490     digests_buf[digests_offset].digest_buf[DGST_R3]
491   };
492
493   /**
494    * loop
495    */
496
497   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
498   {
499     const u32 pw_r_len = combs_buf[il_pos].pw_len;
500
501     const u32 pw_len = pw_l_len + pw_r_len;
502
503     u32 wordr0[4];
504     u32 wordr1[4];
505     u32 wordr2[4];
506     u32 wordr3[4];
507
508     wordr0[0] = combs_buf[il_pos].i[0];
509     wordr0[1] = combs_buf[il_pos].i[1];
510     wordr0[2] = combs_buf[il_pos].i[2];
511     wordr0[3] = combs_buf[il_pos].i[3];
512     wordr1[0] = combs_buf[il_pos].i[4];
513     wordr1[1] = combs_buf[il_pos].i[5];
514     wordr1[2] = combs_buf[il_pos].i[6];
515     wordr1[3] = combs_buf[il_pos].i[7];
516     wordr2[0] = 0;
517     wordr2[1] = 0;
518     wordr2[2] = 0;
519     wordr2[3] = 0;
520     wordr3[0] = 0;
521     wordr3[1] = 0;
522     wordr3[2] = 0;
523     wordr3[3] = 0;
524
525     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
526     {
527       switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
528     }
529
530     u32 w0[4];
531     u32 w1[4];
532     u32 w2[4];
533     u32 w3[4];
534
535     w0[0] = wordl0[0] | wordr0[0];
536     w0[1] = wordl0[1] | wordr0[1];
537     w0[2] = wordl0[2] | wordr0[2];
538     w0[3] = wordl0[3] | wordr0[3];
539     w1[0] = wordl1[0] | wordr1[0];
540     w1[1] = wordl1[1] | wordr1[1];
541     w1[2] = wordl1[2] | wordr1[2];
542     w1[3] = wordl1[3] | wordr1[3];
543     w2[0] = wordl2[0] | wordr2[0];
544     w2[1] = wordl2[1] | wordr2[1];
545     w2[2] = wordl2[2] | wordr2[2];
546     w2[3] = wordl2[3] | wordr2[3];
547     w3[0] = wordl3[0] | wordr3[0];
548     w3[1] = wordl3[1] | wordr3[1];
549     w3[2] = wordl3[2] | wordr3[2];
550     w3[3] = wordl3[3] | wordr3[3];
551
552     append_0x80_4x4 (w0, w1, w2, w3, pw_len);
553
554     const u32 pw_salt_len = pw_len + salt_len;
555
556     /**
557      * prepend salt
558      */
559
560     // first step fixed 56 bytes of salt
561
562     u32 w0_t[4];
563     u32 w1_t[4];
564     u32 w2_t[4];
565     u32 w3_t[4];
566
567     w0_t[0] = salt_buf0[0];
568     w0_t[1] = salt_buf0[1];
569     w0_t[2] = salt_buf0[2];
570     w0_t[3] = salt_buf0[3];
571     w1_t[0] = salt_buf1[0];
572     w1_t[1] = salt_buf1[1];
573     w1_t[2] = salt_buf1[2];
574     w1_t[3] = salt_buf1[3];
575     w2_t[0] = salt_buf2[0];
576     w2_t[1] = salt_buf2[1];
577     w2_t[2] = salt_buf2[2];
578     w2_t[3] = salt_buf2[3];
579     w3_t[0] = salt_buf3[0];
580     w3_t[1] = salt_buf3[1];
581
582     // after 56 byte salt, we have beginning of the password
583
584     w3_t[2] = w0[0];
585     w3_t[3] = w0[1];
586
587     /**
588      * md5
589      */
590
591     // first transform
592
593     u32 a = MD5M_A;
594     u32 b = MD5M_B;
595     u32 c = MD5M_C;
596     u32 d = MD5M_D;
597
598     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
599     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
600     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
601     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
602     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
603     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
604     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
605     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
606     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
607     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
608     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
609     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
610     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
611     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
612     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
613     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
614
615     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
616     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
617     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
618     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
619     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
620     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
621     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
622     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
623     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
624     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
625     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
626     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
627     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
628     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
629     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
630     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
631
632     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
633     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
634     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
635     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
636     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
637     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
638     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
639     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
640     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
641     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
642     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
643     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
644     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
645     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
646     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
647     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
648
649     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
650     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
651     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
652     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
653     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
654     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
655     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
656     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
657     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
658     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
659     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
660     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
661     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
662     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
663     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
664     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
665
666     a += MD5M_A;
667     b += MD5M_B;
668     c += MD5M_C;
669     d += MD5M_D;
670
671     u32 r_a = a;
672     u32 r_b = b;
673     u32 r_c = c;
674     u32 r_d = d;
675
676     // 2nd transform
677
678     w0_t[0] = w0[2];
679     w0_t[1] = w0[3];
680     w0_t[2] = w1[0];
681     w0_t[3] = w1[1];
682     w1_t[0] = w1[2];
683     w1_t[1] = w1[3];
684     w1_t[2] = w2[0];
685     w1_t[3] = w2[1];
686     w2_t[0] = w2[2];
687     w2_t[1] = w2[3];
688     w2_t[2] = w3[0];
689     w2_t[3] = w3[1];
690     w3_t[0] = w3[2];
691     w3_t[1] = w3[3];
692     w3_t[2] = pw_salt_len * 8;
693     w3_t[3] = 0;
694
695     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
696     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
697     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
698     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
699     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
700     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
701     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
702     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
703     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
704     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
705     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
706     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
707     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
708     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
709     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
710     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
711
712     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
713     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
714     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
715     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
716     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
717     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
718     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
719     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
720     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
721     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
722     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
723     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
724     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
725     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
726     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
727     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
728
729     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
730     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
731     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
732     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
733     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
734     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
735     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
736     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
737     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
738     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
739     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
740     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
741     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
742     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
743     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
744     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
745
746     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
747     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
748     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
749     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
750     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
751     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
752     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
753     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
754     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
755     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
756     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
757     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
758     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
759     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
760     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
761     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
762
763     a += r_a;
764     b += r_b;
765     c += r_c;
766     d += r_d;
767
768     const u32 r0 = a;
769     const u32 r1 = d;
770     const u32 r2 = c;
771     const u32 r3 = b;
772
773     #include COMPARE_S
774   }
775 }
776
777 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11000_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 void *esalt_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)
778 {
779 }
780
781 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11000_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 void *esalt_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)
782 {
783 }