Converted to new SIMD: -m 40 -a 0
[hashcat.git] / OpenCL / m00040_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 m00040_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 * 2) + 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     make_unicode (w0, w0_t, w1_t);
102     make_unicode (w1, w2_t, w3_t);
103
104     switch_buffer_by_offset_le (w0_t, w1_t, w2_t, w3_t, salt_len);
105
106     w0_t[0] |= salt_buf0[0];
107     w0_t[1] |= salt_buf0[1];
108     w0_t[2] |= salt_buf0[2];
109     w0_t[3] |= salt_buf0[3];
110     w1_t[0] |= salt_buf1[0];
111     w1_t[1] |= salt_buf1[1];
112     w1_t[2] |= salt_buf1[2];
113     w1_t[3] |= salt_buf1[3];
114
115     append_0x80_4x4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
116
117     w3_t[2] = out_salt_len * 8;
118
119     /**
120      * md5
121      */
122
123     u32x a = MD5M_A;
124     u32x b = MD5M_B;
125     u32x c = MD5M_C;
126     u32x d = MD5M_D;
127
128     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
129     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
130     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
131     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
132     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
133     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
134     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
135     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
136     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
137     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
138     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
139     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
140     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
141     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
142     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
143     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
144
145     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
146     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
147     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
148     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
149     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
150     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
151     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
152     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
153     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
154     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
155     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
156     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
157     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
158     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
159     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
160     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
161
162     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
163     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
164     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
165     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
166     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
167     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
168     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
169     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
170     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
171     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
172     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
173     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
174     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
175     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
176     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
177     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
178
179     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
180     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
181     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
182     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
183     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
184     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
185     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
186     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
187     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
188     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
189     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
190     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
191     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
192     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
193     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
194     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
195
196     COMPARE_M_SIMD (a, d, c, b);
197   }
198 }
199
200 __kernel void m00040_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)
201 {
202 }
203
204 __kernel void m00040_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)
205 {
206 }
207
208 __kernel void m00040_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)
209 {
210   /**
211    * modifier
212    */
213
214   const u32 lid = get_local_id (0);
215
216   /**
217    * base
218    */
219
220   const u32 gid = get_global_id (0);
221
222   if (gid >= gid_max) return;
223
224   u32 pw_buf0[4];
225
226   pw_buf0[0] = pws[gid].i[ 0];
227   pw_buf0[1] = pws[gid].i[ 1];
228   pw_buf0[2] = pws[gid].i[ 2];
229   pw_buf0[3] = pws[gid].i[ 3];
230
231   u32 pw_buf1[4];
232
233   pw_buf1[0] = pws[gid].i[ 4];
234   pw_buf1[1] = pws[gid].i[ 5];
235   pw_buf1[2] = pws[gid].i[ 6];
236   pw_buf1[3] = pws[gid].i[ 7];
237
238   const u32 pw_len = pws[gid].pw_len;
239
240   /**
241    * salt
242    */
243
244   u32 salt_buf0[4];
245
246   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
247   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
248   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
249   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
250
251   u32 salt_buf1[4];
252
253   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
254   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
255   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6];
256   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7];
257
258   const u32 salt_len = salt_bufs[salt_pos].salt_len;
259
260   /**
261    * digest
262    */
263
264   const u32 search[4] =
265   {
266     digests_buf[digests_offset].digest_buf[DGST_R0],
267     digests_buf[digests_offset].digest_buf[DGST_R1],
268     digests_buf[digests_offset].digest_buf[DGST_R2],
269     digests_buf[digests_offset].digest_buf[DGST_R3]
270   };
271
272   /**
273    * loop
274    */
275
276   for (u32 il_pos = 0; il_pos < rules_cnt; il_pos += VECT_SIZE)
277   {
278     u32x w0[4] = { 0 };
279     u32x w1[4] = { 0 };
280     u32x w2[4] = { 0 };
281     u32x w3[4] = { 0 };
282
283     const u32 out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
284
285     /**
286      * prepend salt
287      */
288
289     const u32 out_salt_len = (out_len * 2) + salt_len;
290
291     u32x w0_t[4];
292     u32x w1_t[4];
293     u32x w2_t[4];
294     u32x w3_t[4];
295
296     make_unicode (w0, w0_t, w1_t);
297     make_unicode (w1, w2_t, w3_t);
298
299     switch_buffer_by_offset_le (w0_t, w1_t, w2_t, w3_t, salt_len);
300
301     w0_t[0] |= salt_buf0[0];
302     w0_t[1] |= salt_buf0[1];
303     w0_t[2] |= salt_buf0[2];
304     w0_t[3] |= salt_buf0[3];
305     w1_t[0] |= salt_buf1[0];
306     w1_t[1] |= salt_buf1[1];
307     w1_t[2] |= salt_buf1[2];
308     w1_t[3] |= salt_buf1[3];
309
310     append_0x80_4x4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
311
312     w3_t[2] = out_salt_len * 8;
313
314     /**
315      * md5
316      */
317
318     u32x a = MD5M_A;
319     u32x b = MD5M_B;
320     u32x c = MD5M_C;
321     u32x d = MD5M_D;
322
323     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
324     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
325     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
326     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
327     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
328     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
329     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
330     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
331     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
332     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
333     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
334     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
335     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
336     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
337     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
338     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
339
340     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
341     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
342     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
343     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
344     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
345     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
346     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
347     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
348     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
349     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
350     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
351     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
352     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
353     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
354     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
355     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
356
357     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
358     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
359     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
360     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
361     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
362     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
363     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
364     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
365     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
366     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
367     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
368     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
369     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
370     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
371     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
372     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
373
374     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
375     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
376     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
377     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
378     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
379     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
380     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
381     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
382     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
383     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
384     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
385     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
386     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
387
388     if (MATCHES_NONE_VS (a, search[0])) continue;
389
390     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
391     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
392     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
393
394     COMPARE_S_SIMD (a, d, c, b);
395   }
396 }
397
398 __kernel void m00040_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)
399 {
400 }
401
402 __kernel void m00040_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)
403 {
404 }