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