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