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