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