Initial commit
[hashcat.git] / amd / m00010_a0.cl
1 /**
2  * Author......: Jens Steube <jens.steube@gmail.com>
3  * License.....: MIT
4  */
5
6 #define _MD5_
7
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
10
11 #ifdef  VLIW1
12 #define VECT_SIZE1
13 #endif
14
15 #ifdef  VLIW4
16 #define VECT_SIZE4
17 #endif
18
19 #ifdef  VLIW5
20 #define VECT_SIZE4
21 #endif
22
23 #define DGST_R0 0
24 #define DGST_R1 3
25 #define DGST_R2 2
26 #define DGST_R3 1
27
28 #include "include/kernel_functions.c"
29 #include "types_amd.c"
30 #include "common_amd.c"
31 #include "include/rp_gpu.h"
32 #include "rp_amd.c"
33
34 #ifdef  VECT_SIZE1
35 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
36 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
37 #endif
38
39 #ifdef  VECT_SIZE2
40 #define VECT_COMPARE_S "check_single_vect2_comp4.c"
41 #define VECT_COMPARE_M "check_multi_vect2_comp4.c"
42 #endif
43
44 #ifdef  VECT_SIZE4
45 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
46 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
47 #endif
48
49 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_m04 (__global pw_t *pws, __global gpu_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)
50 {
51   /**
52    * modifier
53    */
54
55   const u32 lid = get_local_id (0);
56
57   /**
58    * base
59    */
60
61   const u32 gid = get_global_id (0);
62
63   if (gid >= gid_max) return;
64
65   u32x pw_buf0[4];
66
67   pw_buf0[0] = pws[gid].i[ 0];
68   pw_buf0[1] = pws[gid].i[ 1];
69   pw_buf0[2] = pws[gid].i[ 2];
70   pw_buf0[3] = pws[gid].i[ 3];
71
72   u32x pw_buf1[4];
73
74   pw_buf1[0] = pws[gid].i[ 4];
75   pw_buf1[1] = pws[gid].i[ 5];
76   pw_buf1[2] = pws[gid].i[ 6];
77   pw_buf1[3] = pws[gid].i[ 7];
78
79   const u32 pw_len = pws[gid].pw_len;
80
81   /**
82    * salt
83    */
84
85   u32 salt_buf0[4];
86
87   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
88   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
89   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
90   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
91
92   u32 salt_buf1[4];
93
94   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
95   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
96   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6];
97   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7];
98
99   const u32 salt_len = salt_bufs[salt_pos].salt_len;
100
101   /**
102    * loop
103    */
104
105   for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
106   {
107     u32x w0[4];
108
109     w0[0] = pw_buf0[0];
110     w0[1] = pw_buf0[1];
111     w0[2] = pw_buf0[2];
112     w0[3] = pw_buf0[3];
113
114     u32x w1[4];
115
116     w1[0] = pw_buf1[0];
117     w1[1] = pw_buf1[1];
118     w1[2] = pw_buf1[2];
119     w1[3] = pw_buf1[3];
120
121     u32x w2[4];
122
123     w2[0] = 0;
124     w2[1] = 0;
125     w2[2] = 0;
126     w2[3] = 0;
127
128     u32x w3[4];
129
130     w3[0] = 0;
131     w3[1] = 0;
132     w3[2] = 0;
133     w3[3] = 0;
134
135     const u32 out_len = apply_rules (rules_buf[il_pos].cmds, w0, w1, pw_len);
136
137     /**
138      * append salt
139      */
140
141     u32 s0[4];
142
143     s0[0] = salt_buf0[0];
144     s0[1] = salt_buf0[1];
145     s0[2] = salt_buf0[2];
146     s0[3] = salt_buf0[3];
147
148     u32 s1[4];
149
150     s1[0] = salt_buf1[0];
151     s1[1] = salt_buf1[1];
152     s1[2] = salt_buf1[2];
153     s1[3] = salt_buf1[3];
154
155     u32 s2[4];
156
157     s2[0] = 0;
158     s2[1] = 0;
159     s2[2] = 0;
160     s2[3] = 0;
161
162     u32 s3[4];
163
164     s3[0] = 0;
165     s3[1] = 0;
166     s3[2] = 0;
167     s3[3] = 0;
168
169     switch_buffer_by_offset (s0, s1, s2, s3, out_len);
170
171     const u32 pw_salt_len = out_len + salt_len;
172
173     w0[0] |= s0[0];
174     w0[1] |= s0[1];
175     w0[2] |= s0[2];
176     w0[3] |= s0[3];
177
178     w1[0] |= s1[0];
179     w1[1] |= s1[1];
180     w1[2] |= s1[2];
181     w1[3] |= s1[3];
182
183     w2[0] |= s2[0];
184     w2[1] |= s2[1];
185     w2[2] |= s2[2];
186     w2[3] |= s2[3];
187
188     w3[0] |= s3[0];
189     w3[1] |= s3[1];
190     w3[2]  = pw_salt_len * 8;
191     w3[3]  = 0;
192
193     append_0x80_4 (w0, w1, w2, w3, pw_salt_len);
194
195     /**
196      * md5
197      */
198
199     u32x tmp2;
200
201     u32x a = MD5M_A;
202     u32x b = MD5M_B;
203     u32x c = MD5M_C;
204     u32x d = MD5M_D;
205
206     MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
207     MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
208     MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
209     MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
210     MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
211     MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
212     MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
213     MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
214     MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
215     MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
216     MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
217     MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
218     MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
219     MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
220     MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
221     MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
222
223     MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
224     MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
225     MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
226     MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
227     MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
228     MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
229     MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
230     MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
231     MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
232     MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
233     MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
234     MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
235     MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
236     MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
237     MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
238     MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
239
240     MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20);
241     MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21);
242     MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22);
243     MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23);
244     MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20);
245     MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21);
246     MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22);
247     MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23);
248     MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20);
249     MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21);
250     MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22);
251     MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23);
252     MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20);
253     MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21);
254     MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22);
255     MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23);
256
257     MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
258     MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
259     MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
260     MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
261     MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
262     MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
263     MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
264     MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
265     MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
266     MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
267     MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
268     MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
269     MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
270     MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
271     MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
272     MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
273
274
275     const u32x r0 = a;
276     const u32x r1 = d;
277     const u32x r2 = c;
278     const u32x r3 = b;
279
280     #include VECT_COMPARE_M
281   }
282 }
283
284 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_m08 (__global pw_t *pws, __global gpu_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)
285 {
286 }
287
288 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_m16 (__global pw_t *pws, __global gpu_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)
289 {
290 }
291
292 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_s04 (__global pw_t *pws, __global gpu_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)
293 {
294   /**
295    * modifier
296    */
297
298   const u32 lid = get_local_id (0);
299
300   /**
301    * base
302    */
303
304   const u32 gid = get_global_id (0);
305
306   if (gid >= gid_max) return;
307
308   u32x pw_buf0[4];
309
310   pw_buf0[0] = pws[gid].i[ 0];
311   pw_buf0[1] = pws[gid].i[ 1];
312   pw_buf0[2] = pws[gid].i[ 2];
313   pw_buf0[3] = pws[gid].i[ 3];
314
315   u32x pw_buf1[4];
316
317   pw_buf1[0] = pws[gid].i[ 4];
318   pw_buf1[1] = pws[gid].i[ 5];
319   pw_buf1[2] = pws[gid].i[ 6];
320   pw_buf1[3] = pws[gid].i[ 7];
321
322   const u32 pw_len = pws[gid].pw_len;
323
324   /**
325    * salt
326    */
327
328   u32 salt_buf0[4];
329
330   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
331   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
332   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
333   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
334
335   u32 salt_buf1[4];
336
337   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
338   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
339   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[6];
340   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[7];
341
342   const u32 salt_len = salt_bufs[salt_pos].salt_len;
343
344   /**
345    * digest
346    */
347
348   const u32 search[4] =
349   {
350     digests_buf[digests_offset].digest_buf[DGST_R0],
351     digests_buf[digests_offset].digest_buf[DGST_R1],
352     digests_buf[digests_offset].digest_buf[DGST_R2],
353     digests_buf[digests_offset].digest_buf[DGST_R3]
354   };
355
356   /**
357    * loop
358    */
359
360   for (u32 il_pos = 0; il_pos < rules_cnt; il_pos++)
361   {
362     u32x w0[4];
363
364     w0[0] = pw_buf0[0];
365     w0[1] = pw_buf0[1];
366     w0[2] = pw_buf0[2];
367     w0[3] = pw_buf0[3];
368
369     u32x w1[4];
370
371     w1[0] = pw_buf1[0];
372     w1[1] = pw_buf1[1];
373     w1[2] = pw_buf1[2];
374     w1[3] = pw_buf1[3];
375
376     u32x w2[4];
377
378     w2[0] = 0;
379     w2[1] = 0;
380     w2[2] = 0;
381     w2[3] = 0;
382
383     u32x w3[4];
384
385     w3[0] = 0;
386     w3[1] = 0;
387     w3[2] = 0;
388     w3[3] = 0;
389
390     const u32 out_len = apply_rules (rules_buf[il_pos].cmds, w0, w1, pw_len);
391
392     /**
393      * append salt
394      */
395
396     u32 s0[4];
397
398     s0[0] = salt_buf0[0];
399     s0[1] = salt_buf0[1];
400     s0[2] = salt_buf0[2];
401     s0[3] = salt_buf0[3];
402
403     u32 s1[4];
404
405     s1[0] = salt_buf1[0];
406     s1[1] = salt_buf1[1];
407     s1[2] = salt_buf1[2];
408     s1[3] = salt_buf1[3];
409
410     u32 s2[4];
411
412     s2[0] = 0;
413     s2[1] = 0;
414     s2[2] = 0;
415     s2[3] = 0;
416
417     u32 s3[4];
418
419     s3[0] = 0;
420     s3[1] = 0;
421     s3[2] = 0;
422     s3[3] = 0;
423
424     switch_buffer_by_offset (s0, s1, s2, s3, out_len);
425
426     const u32 pw_salt_len = out_len + salt_len;
427
428     w0[0] |= s0[0];
429     w0[1] |= s0[1];
430     w0[2] |= s0[2];
431     w0[3] |= s0[3];
432
433     w1[0] |= s1[0];
434     w1[1] |= s1[1];
435     w1[2] |= s1[2];
436     w1[3] |= s1[3];
437
438     w2[0] |= s2[0];
439     w2[1] |= s2[1];
440     w2[2] |= s2[2];
441     w2[3] |= s2[3];
442
443     w3[0] |= s3[0];
444     w3[1] |= s3[1];
445     w3[2]  = pw_salt_len * 8;
446     w3[3]  = 0;
447
448     append_0x80_4 (w0, w1, w2, w3, pw_salt_len);
449
450     /**
451      * md5
452      */
453
454     u32x tmp2;
455
456     u32x a = MD5M_A;
457     u32x b = MD5M_B;
458     u32x c = MD5M_C;
459     u32x d = MD5M_D;
460
461     MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
462     MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
463     MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
464     MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
465     MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
466     MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
467     MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
468     MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
469     MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
470     MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
471     MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
472     MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
473     MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
474     MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
475     MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
476     MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
477
478     MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
479     MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
480     MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
481     MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
482     MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
483     MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
484     MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
485     MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
486     MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
487     MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
488     MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
489     MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
490     MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
491     MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
492     MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
493     MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
494
495     MD5_STEP (MD5_H1, a, b, c, d, w1[1], MD5C20, MD5S20);
496     MD5_STEP (MD5_H2, d, a, b, c, w2[0], MD5C21, MD5S21);
497     MD5_STEP (MD5_H1, c, d, a, b, w2[3], MD5C22, MD5S22);
498     MD5_STEP (MD5_H2, b, c, d, a, w3[2], MD5C23, MD5S23);
499     MD5_STEP (MD5_H1, a, b, c, d, w0[1], MD5C24, MD5S20);
500     MD5_STEP (MD5_H2, d, a, b, c, w1[0], MD5C25, MD5S21);
501     MD5_STEP (MD5_H1, c, d, a, b, w1[3], MD5C26, MD5S22);
502     MD5_STEP (MD5_H2, b, c, d, a, w2[2], MD5C27, MD5S23);
503     MD5_STEP (MD5_H1, a, b, c, d, w3[1], MD5C28, MD5S20);
504     MD5_STEP (MD5_H2, d, a, b, c, w0[0], MD5C29, MD5S21);
505     MD5_STEP (MD5_H1, c, d, a, b, w0[3], MD5C2a, MD5S22);
506     MD5_STEP (MD5_H2, b, c, d, a, w1[2], MD5C2b, MD5S23);
507     MD5_STEP (MD5_H1, a, b, c, d, w2[1], MD5C2c, MD5S20);
508     MD5_STEP (MD5_H2, d, a, b, c, w3[0], MD5C2d, MD5S21);
509     MD5_STEP (MD5_H1, c, d, a, b, w3[3], MD5C2e, MD5S22);
510     MD5_STEP (MD5_H2, b, c, d, a, w0[2], MD5C2f, MD5S23);
511
512     MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
513     MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
514     MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
515     MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
516     MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
517     MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
518     MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
519     MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
520     MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
521     MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
522     MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
523     MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
524     MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
525
526     bool q_cond = allx (search[0] != a);
527
528     if (q_cond) continue;
529
530     MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
531     MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
532     MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
533
534
535     const u32x r0 = a;
536     const u32x r1 = d;
537     const u32x r2 = c;
538     const u32x r3 = b;
539
540     #include VECT_COMPARE_S
541   }
542 }
543
544 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_s08 (__global pw_t *pws, __global gpu_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)
545 {
546 }
547
548 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_s16 (__global pw_t *pws, __global gpu_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)
549 {
550 }