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