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