Revert "Zero pws_buf before reuse"
[hashcat.git] / OpenCL / m00020_a0.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 "include/rp_kernel.h"
22 #include "OpenCL/rp.c"
23 #include "OpenCL/simd.c"
24
25 __kernel void m00020_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 rules_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 lid = get_local_id (0);
32
33   /**
34    * base
35    */
36
37   const u32 gid = get_global_id (0);
38
39   if (gid >= gid_max) return;
40
41   u32 pw_buf0[4];
42
43   pw_buf0[0] = pws[gid].i[ 0];
44   pw_buf0[1] = pws[gid].i[ 1];
45   pw_buf0[2] = pws[gid].i[ 2];
46   pw_buf0[3] = pws[gid].i[ 3];
47
48   u32 pw_buf1[4];
49
50   pw_buf1[0] = pws[gid].i[ 4];
51   pw_buf1[1] = pws[gid].i[ 5];
52   pw_buf1[2] = pws[gid].i[ 6];
53   pw_buf1[3] = pws[gid].i[ 7];
54
55   const u32 pw_len = pws[gid].pw_len;
56
57   /**
58    * salt
59    */
60
61   u32 salt_buf0[4];
62
63   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
64   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
65   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
66   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
67
68   u32 salt_buf1[4];
69
70   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
71   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
72   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6];
73   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7];
74
75   const u32 salt_len = salt_bufs[salt_pos].salt_len;
76
77   /**
78    * loop
79    */
80
81   for (u32 il_pos = 0; il_pos < rules_cnt; il_pos += VECT_SIZE)
82   {
83     u32x w0[4] = { 0 };
84     u32x w1[4] = { 0 };
85     u32x w2[4] = { 0 };
86     u32x w3[4] = { 0 };
87
88     const u32 out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
89
90     /**
91      * prepend salt
92      */
93
94     const u32 out_salt_len = out_len + salt_len;
95
96     u32x w0_t[4];
97     u32x w1_t[4];
98     u32x w2_t[4];
99     u32x w3_t[4];
100
101     w0_t[0] = w0[0];
102     w0_t[1] = w0[1];
103     w0_t[2] = w0[2];
104     w0_t[3] = w0[3];
105     w1_t[0] = w1[0];
106     w1_t[1] = w1[1];
107     w1_t[2] = w1[2];
108     w1_t[3] = w1[3];
109     w2_t[0] = w2[0];
110     w2_t[1] = w2[1];
111     w2_t[2] = w2[2];
112     w2_t[3] = w2[3];
113     w3_t[0] = w3[0];
114     w3_t[1] = w3[1];
115     w3_t[2] = w3[2];
116     w3_t[3] = w3[3];
117
118     switch_buffer_by_offset_le (w0_t, w1_t, w2_t, w3_t, salt_len);
119
120     w0_t[0] |= salt_buf0[0];
121     w0_t[1] |= salt_buf0[1];
122     w0_t[2] |= salt_buf0[2];
123     w0_t[3] |= salt_buf0[3];
124     w1_t[0] |= salt_buf1[0];
125     w1_t[1] |= salt_buf1[1];
126     w1_t[2] |= salt_buf1[2];
127     w1_t[3] |= salt_buf1[3];
128
129     append_0x80_4x4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
130
131     w3_t[2] = out_salt_len * 8;
132
133     /**
134      * md5
135      */
136
137     u32x a = MD5M_A;
138     u32x b = MD5M_B;
139     u32x c = MD5M_C;
140     u32x d = MD5M_D;
141
142     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
143     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
144     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
145     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
146     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
147     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
148     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
149     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
150     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
151     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
152     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
153     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
154     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
155     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
156     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
157     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
158
159     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
160     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
161     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
162     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
163     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
164     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
165     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
166     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
167     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
168     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
169     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
170     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
171     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
172     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
173     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
174     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
175
176     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
177     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
178     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
179     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
180     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
181     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
182     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
183     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
184     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
185     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
186     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
187     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
188     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
189     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
190     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
191     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
192
193     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
194     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
195     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
196     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
197     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
198     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
199     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
200     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
201     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
202     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
203     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
204     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
205     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
206     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
207     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
208     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
209
210     COMPARE_M_SIMD (a, d, c, b);
211   }
212 }
213
214 __kernel void m00020_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
215 {
216 }
217
218 __kernel void m00020_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
219 {
220 }
221
222 __kernel void m00020_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
223 {
224   /**
225    * modifier
226    */
227
228   const u32 lid = get_local_id (0);
229
230   /**
231    * base
232    */
233
234   const u32 gid = get_global_id (0);
235
236   if (gid >= gid_max) return;
237
238   u32 pw_buf0[4];
239
240   pw_buf0[0] = pws[gid].i[ 0];
241   pw_buf0[1] = pws[gid].i[ 1];
242   pw_buf0[2] = pws[gid].i[ 2];
243   pw_buf0[3] = pws[gid].i[ 3];
244
245   u32 pw_buf1[4];
246
247   pw_buf1[0] = pws[gid].i[ 4];
248   pw_buf1[1] = pws[gid].i[ 5];
249   pw_buf1[2] = pws[gid].i[ 6];
250   pw_buf1[3] = pws[gid].i[ 7];
251
252   const u32 pw_len = pws[gid].pw_len;
253
254   /**
255    * salt
256    */
257
258   u32 salt_buf0[4];
259
260   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
261   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
262   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
263   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
264
265   u32 salt_buf1[4];
266
267   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
268   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
269   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6];
270   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7];
271
272   const u32 salt_len = salt_bufs[salt_pos].salt_len;
273
274   /**
275    * digest
276    */
277
278   const u32 search[4] =
279   {
280     digests_buf[digests_offset].digest_buf[DGST_R0],
281     digests_buf[digests_offset].digest_buf[DGST_R1],
282     digests_buf[digests_offset].digest_buf[DGST_R2],
283     digests_buf[digests_offset].digest_buf[DGST_R3]
284   };
285
286   /**
287    * loop
288    */
289
290   for (u32 il_pos = 0; il_pos < rules_cnt; il_pos += VECT_SIZE)
291   {
292     u32x w0[4] = { 0 };
293     u32x w1[4] = { 0 };
294     u32x w2[4] = { 0 };
295     u32x w3[4] = { 0 };
296
297     const u32 out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
298
299     /**
300      * prepend salt
301      */
302
303     const u32 out_salt_len = out_len + salt_len;
304
305     u32x w0_t[4];
306     u32x w1_t[4];
307     u32x w2_t[4];
308     u32x w3_t[4];
309
310     w0_t[0] = w0[0];
311     w0_t[1] = w0[1];
312     w0_t[2] = w0[2];
313     w0_t[3] = w0[3];
314     w1_t[0] = w1[0];
315     w1_t[1] = w1[1];
316     w1_t[2] = w1[2];
317     w1_t[3] = w1[3];
318     w2_t[0] = w2[0];
319     w2_t[1] = w2[1];
320     w2_t[2] = w2[2];
321     w2_t[3] = w2[3];
322     w3_t[0] = w3[0];
323     w3_t[1] = w3[1];
324     w3_t[2] = w3[2];
325     w3_t[3] = w3[3];
326
327     switch_buffer_by_offset_le (w0_t, w1_t, w2_t, w3_t, salt_len);
328
329     w0_t[0] |= salt_buf0[0];
330     w0_t[1] |= salt_buf0[1];
331     w0_t[2] |= salt_buf0[2];
332     w0_t[3] |= salt_buf0[3];
333     w1_t[0] |= salt_buf1[0];
334     w1_t[1] |= salt_buf1[1];
335     w1_t[2] |= salt_buf1[2];
336     w1_t[3] |= salt_buf1[3];
337
338     append_0x80_4x4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
339
340     w3_t[2] = out_salt_len * 8;
341
342     /**
343      * md5
344      */
345
346     u32x a = MD5M_A;
347     u32x b = MD5M_B;
348     u32x c = MD5M_C;
349     u32x d = MD5M_D;
350
351     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
352     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
353     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
354     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
355     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
356     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
357     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
358     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
359     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
360     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
361     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
362     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
363     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
364     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
365     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
366     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
367
368     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
369     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
370     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
371     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
372     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
373     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
374     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
375     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
376     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
377     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
378     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
379     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
380     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
381     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
382     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
383     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
384
385     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
386     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
387     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
388     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
389     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
390     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
391     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
392     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
393     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
394     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
395     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
396     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
397     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
398     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
399     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
400     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
401
402     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
403     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
404     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
405     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
406     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
407     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
408     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
409     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
410     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
411     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
412     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
413     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
414     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
415
416     if (MATCHES_NONE_VS (a, search[0])) continue;
417
418     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
419     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
420     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
421
422     COMPARE_S_SIMD (a, d, c, b);
423   }
424 }
425
426 __kernel void m00020_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
427 {
428 }
429
430 __kernel void m00020_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
431 {
432 }