Initial commit
[hashcat.git] / nv / m11100_a1.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
28 #ifdef  VECT_SIZE1
29 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
30 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
31 #endif
32
33 #ifdef  VECT_SIZE2
34 #define VECT_COMPARE_S "check_single_vect2_comp4.c"
35 #define VECT_COMPARE_M "check_multi_vect2_comp4.c"
36 #endif
37
38 #ifdef  VECT_SIZE4
39 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
40 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
41 #endif
42
43 #ifdef VECT_SIZE1
44 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
45 #endif
46
47 #ifdef VECT_SIZE2
48 #define uint_to_hex_lower8(i) u32x (l_bin2asc[(i).x], l_bin2asc[(i).y])
49 #endif
50
51 #ifdef VECT_SIZE4
52 #define uint_to_hex_lower8(i) u32x (l_bin2asc[(i).x], l_bin2asc[(i).y], l_bin2asc[(i).z], l_bin2asc[(i).w])
53 #endif
54
55 __device__ __constant__ char c_bin2asc[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
56
57 __device__ __shared__ short l_bin2asc[256];
58
59 __device__ __constant__ comb_t c_combs[1024];
60
61 extern "C" __global__ void __launch_bounds__ (256, 1) m11100_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
62 {
63   /**
64    * modifier
65    */
66
67   const u32 lid = threadIdx.x;
68
69   /**
70    * base
71    */
72
73   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
74
75   u32x wordl0[4];
76
77   wordl0[0] = pws[gid].i[ 0];
78   wordl0[1] = pws[gid].i[ 1];
79   wordl0[2] = pws[gid].i[ 2];
80   wordl0[3] = pws[gid].i[ 3];
81
82   u32x wordl1[4];
83
84   wordl1[0] = pws[gid].i[ 4];
85   wordl1[1] = pws[gid].i[ 5];
86   wordl1[2] = pws[gid].i[ 6];
87   wordl1[3] = pws[gid].i[ 7];
88
89   u32x wordl2[4];
90
91   wordl2[0] = 0;
92   wordl2[1] = 0;
93   wordl2[2] = 0;
94   wordl2[3] = 0;
95
96   u32x wordl3[4];
97
98   wordl3[0] = 0;
99   wordl3[1] = 0;
100   wordl3[2] = 0;
101   wordl3[3] = 0;
102
103   const u32 pw_l_len = pws[gid].pw_len;
104
105   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
106   {
107     switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
108   }
109
110   /**
111    * challenge
112    */
113
114   u32 challenge;
115
116   challenge = salt_bufs[salt_pos].salt_buf[0];
117
118   /**
119    * salt
120    */
121
122   u32 salt_buf0[4];
123
124   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug
125   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
126   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
127   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
128
129   u32 salt_buf1[4];
130
131   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
132   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
133   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
134   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
135
136   const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
137
138   /**
139    * bin2asc table
140    */
141
142   l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
143                  | c_bin2asc[(lid >> 4) & 15] << 0;
144
145   __syncthreads ();
146
147   if (gid >= gid_max) return;
148
149   /**
150    * loop
151    */
152
153   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
154   {
155     const u32 pw_r_len = c_combs[il_pos].pw_len;
156
157     const u32 pw_len = pw_l_len + pw_r_len;
158
159     u32 wordr0[4];
160
161     wordr0[0] = c_combs[il_pos].i[0];
162     wordr0[1] = c_combs[il_pos].i[1];
163     wordr0[2] = c_combs[il_pos].i[2];
164     wordr0[3] = c_combs[il_pos].i[3];
165
166     u32 wordr1[4];
167
168     wordr1[0] = c_combs[il_pos].i[4];
169     wordr1[1] = c_combs[il_pos].i[5];
170     wordr1[2] = c_combs[il_pos].i[6];
171     wordr1[3] = c_combs[il_pos].i[7];
172
173     u32 wordr2[4];
174
175     wordr2[0] = 0;
176     wordr2[1] = 0;
177     wordr2[2] = 0;
178     wordr2[3] = 0;
179
180     u32 wordr3[4];
181
182     wordr3[0] = 0;
183     wordr3[1] = 0;
184     wordr3[2] = 0;
185     wordr3[3] = 0;
186
187     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
188     {
189       switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
190     }
191
192     u32x w0_t[4];
193
194     w0_t[0] = salt_buf0[0];
195     w0_t[1] = salt_buf0[1];
196     w0_t[2] = salt_buf0[2];
197     w0_t[3] = salt_buf0[3];
198
199     u32x w1_t[4];
200
201     w1_t[0] = salt_buf1[0];
202     w1_t[1] = salt_buf1[1];
203     w1_t[2] = salt_buf1[2];
204     w1_t[3] = salt_buf1[3];
205
206     u32x w2_t[4];
207
208     w2_t[0] = 0;
209     w2_t[1] = 0;
210     w2_t[2] = 0;
211     w2_t[3] = 0;
212
213     u32x w3_t[4];
214
215     w3_t[0] = 0;
216     w3_t[1] = 0;
217     w3_t[2] = 0;
218     w3_t[3] = 0;
219
220     /*
221      * append the salt
222      */
223
224     switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, pw_len);
225
226     const u32 pw_salt_len = pw_len + salt_len;
227
228     w0_t[0] |= wordl0[0] | wordr0[0];
229     w0_t[1] |= wordl0[1] | wordr0[1];
230     w0_t[2] |= wordl0[2] | wordr0[2];
231     w0_t[3] |= wordl0[3] | wordr0[3];
232
233     w1_t[0] |= wordl1[0] | wordr1[0];
234     w1_t[1] |= wordl1[1] | wordr1[1];
235     w1_t[2] |= wordl1[2] | wordr1[2];
236     w1_t[3] |= wordl1[3] | wordr1[3];
237
238     w2_t[0] |= wordl2[0] | wordr2[0];
239     w2_t[1] |= wordl2[1] | wordr2[1];
240     w2_t[2] |= wordl2[2] | wordr2[2];
241     w2_t[3] |= wordl2[3] | wordr2[3];
242
243     w3_t[0] |= wordl3[0] | wordr3[0];
244     w3_t[1] |= wordl3[0] | wordr3[0];
245     w3_t[2]  = pw_salt_len * 8;
246     w3_t[3]  = 0;
247
248     /*
249      * md5 ($pass.$salt)
250      */
251
252     u32x a = MD5M_A;
253     u32x b = MD5M_B;
254     u32x c = MD5M_C;
255     u32x d = MD5M_D;
256
257     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
258     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
259     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
260     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
261     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
262     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
263     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
264     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
265     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
266     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
267     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
268     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
269     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
270     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
271     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
272     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
273
274     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
275     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
276     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
277     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
278     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
279     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
280     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
281     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
282     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
283     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
284     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
285     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
286     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
287     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
288     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
289     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
290
291     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
292     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
293     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
294     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
295     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
296     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
297     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
298     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
299     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
300     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
301     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
302     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
303     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
304     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
305     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
306     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
307
308     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
309     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
310     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
311     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
312     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
313     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
314     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
315     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
316     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
317     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
318     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
319     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
320     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
321     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
322     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
323     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
324
325     a += MD5M_A;
326     b += MD5M_B;
327     c += MD5M_C;
328     d += MD5M_D;
329
330     w0_t[0] = uint_to_hex_lower8 ((a >>  0) & 255) <<  0
331             | uint_to_hex_lower8 ((a >>  8) & 255) << 16;
332     w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) <<  0
333             | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
334     w0_t[2] = uint_to_hex_lower8 ((b >>  0) & 255) <<  0
335             | uint_to_hex_lower8 ((b >>  8) & 255) << 16;
336     w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) <<  0
337             | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
338     w1_t[0] = uint_to_hex_lower8 ((c >>  0) & 255) <<  0
339             | uint_to_hex_lower8 ((c >>  8) & 255) << 16;
340     w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) <<  0
341             | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
342     w1_t[2] = uint_to_hex_lower8 ((d >>  0) & 255) <<  0
343             | uint_to_hex_lower8 ((d >>  8) & 255) << 16;
344     w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) <<  0
345             | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
346
347     // add the 4 byte challenge here
348
349     w2_t[0] = challenge;
350     w2_t[1] = 0x00000080;
351     w2_t[2] = 0;
352     w2_t[3] = 0;
353
354     w3_t[0] = 0;
355     w3_t[1] = 0;
356     w3_t[2] = (32 + 4) * 8;
357     w3_t[3] = 0;
358
359     /**
360      * md5 ($hash.$challenge)
361      */
362
363     a = MD5M_A;
364     b = MD5M_B;
365     c = MD5M_C;
366     d = MD5M_D;
367
368     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
369     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
370     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
371     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
372     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
373     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
374     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
375     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
376     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
377     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
378     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
379     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
380     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
381     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
382     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
383     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
384
385     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
386     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
387     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
388     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
389     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
390     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
391     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
392     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
393     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
394     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
395     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
396     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
397     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
398     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
399     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
400     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
401
402     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
403     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
404     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
405     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
406     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
407     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
408     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
409     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
410     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
411     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
412     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
413     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
414     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
415     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
416     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
417     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
418
419     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
420     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
421     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
422     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
423     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
424     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
425     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
426     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
427     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
428     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
429     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
430     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
431     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
432     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
433     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
434     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
435
436     const u32x r0 = a;
437     const u32x r1 = d;
438     const u32x r2 = c;
439     const u32x r3 = b;
440
441     #include VECT_COMPARE_M
442   }
443 }
444
445 extern "C" __global__ void __launch_bounds__ (256, 1) m11100_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)
446 {
447 }
448
449 extern "C" __global__ void __launch_bounds__ (256, 1) m11100_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)
450 {
451 }
452
453 extern "C" __global__ void __launch_bounds__ (256, 1) m11100_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
454 {
455   /**
456    * modifier
457    */
458
459   const u32 lid = threadIdx.x;
460
461   /**
462    * base
463    */
464
465   const u32 gid = (blockIdx.x * blockDim.x) + threadIdx.x;
466
467   u32x wordl0[4];
468
469   wordl0[0] = pws[gid].i[ 0];
470   wordl0[1] = pws[gid].i[ 1];
471   wordl0[2] = pws[gid].i[ 2];
472   wordl0[3] = pws[gid].i[ 3];
473
474   u32x wordl1[4];
475
476   wordl1[0] = pws[gid].i[ 4];
477   wordl1[1] = pws[gid].i[ 5];
478   wordl1[2] = pws[gid].i[ 6];
479   wordl1[3] = pws[gid].i[ 7];
480
481   u32x wordl2[4];
482
483   wordl2[0] = 0;
484   wordl2[1] = 0;
485   wordl2[2] = 0;
486   wordl2[3] = 0;
487
488   u32x wordl3[4];
489
490   wordl3[0] = 0;
491   wordl3[1] = 0;
492   wordl3[2] = 0;
493   wordl3[3] = 0;
494
495   const u32 pw_l_len = pws[gid].pw_len;
496
497   if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
498   {
499     switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, c_combs[0].pw_len);
500   }
501
502   /**
503    * challenge
504    */
505
506   u32 challenge;
507
508   challenge = salt_bufs[salt_pos].salt_buf[0];
509
510   /**
511    * salt
512    */
513
514   u32 salt_buf0[4];
515
516   salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug
517   salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
518   salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
519   salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
520
521   u32 salt_buf1[4];
522
523   salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
524   salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
525   salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
526   salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
527
528   const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
529
530   /**
531    * digest
532    */
533
534   const u32 search[4] =
535   {
536     digests_buf[digests_offset].digest_buf[DGST_R0],
537     digests_buf[digests_offset].digest_buf[DGST_R1],
538     digests_buf[digests_offset].digest_buf[DGST_R2],
539     digests_buf[digests_offset].digest_buf[DGST_R3]
540   };
541
542   /**
543    * bin2asc table
544    */
545
546   l_bin2asc[lid] = c_bin2asc[(lid >> 0) & 15] << 8
547                  | c_bin2asc[(lid >> 4) & 15] << 0;
548
549   __syncthreads ();
550
551   if (gid >= gid_max) return;
552
553   /**
554    * loop
555    */
556
557   for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
558   {
559     const u32 pw_r_len = c_combs[il_pos].pw_len;
560
561     const u32 pw_len = pw_l_len + pw_r_len;
562
563     u32 wordr0[4];
564
565     wordr0[0] = c_combs[il_pos].i[0];
566     wordr0[1] = c_combs[il_pos].i[1];
567     wordr0[2] = c_combs[il_pos].i[2];
568     wordr0[3] = c_combs[il_pos].i[3];
569
570     u32 wordr1[4];
571
572     wordr1[0] = c_combs[il_pos].i[4];
573     wordr1[1] = c_combs[il_pos].i[5];
574     wordr1[2] = c_combs[il_pos].i[6];
575     wordr1[3] = c_combs[il_pos].i[7];
576
577     u32 wordr2[4];
578
579     wordr2[0] = 0;
580     wordr2[1] = 0;
581     wordr2[2] = 0;
582     wordr2[3] = 0;
583
584     u32 wordr3[4];
585
586     wordr3[0] = 0;
587     wordr3[1] = 0;
588     wordr3[2] = 0;
589     wordr3[3] = 0;
590
591     if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
592     {
593       switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
594     }
595
596     u32x w0_t[4];
597
598     w0_t[0] = salt_buf0[0];
599     w0_t[1] = salt_buf0[1];
600     w0_t[2] = salt_buf0[2];
601     w0_t[3] = salt_buf0[3];
602
603     u32x w1_t[4];
604
605     w1_t[0] = salt_buf1[0];
606     w1_t[1] = salt_buf1[1];
607     w1_t[2] = salt_buf1[2];
608     w1_t[3] = salt_buf1[3];
609
610     u32x w2_t[4];
611
612     w2_t[0] = 0;
613     w2_t[1] = 0;
614     w2_t[2] = 0;
615     w2_t[3] = 0;
616
617     u32x w3_t[4];
618
619     w3_t[0] = 0;
620     w3_t[1] = 0;
621     w3_t[2] = 0;
622     w3_t[3] = 0;
623
624     /*
625      * append the salt
626      */
627
628     switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, pw_len);
629
630     const u32 pw_salt_len = pw_len + salt_len;
631
632     w0_t[0] |= wordl0[0] | wordr0[0];
633     w0_t[1] |= wordl0[1] | wordr0[1];
634     w0_t[2] |= wordl0[2] | wordr0[2];
635     w0_t[3] |= wordl0[3] | wordr0[3];
636
637     w1_t[0] |= wordl1[0] | wordr1[0];
638     w1_t[1] |= wordl1[1] | wordr1[1];
639     w1_t[2] |= wordl1[2] | wordr1[2];
640     w1_t[3] |= wordl1[3] | wordr1[3];
641
642     w2_t[0] |= wordl2[0] | wordr2[0];
643     w2_t[1] |= wordl2[1] | wordr2[1];
644     w2_t[2] |= wordl2[2] | wordr2[2];
645     w2_t[3] |= wordl2[3] | wordr2[3];
646
647     w3_t[0] |= wordl3[0] | wordr3[0];
648     w3_t[1] |= wordl3[0] | wordr3[0];
649     w3_t[2]  = pw_salt_len * 8;
650     w3_t[3]  = 0;
651
652     /*
653      * md5 ($pass.$salt)
654      */
655
656     u32x a = MD5M_A;
657     u32x b = MD5M_B;
658     u32x c = MD5M_C;
659     u32x d = MD5M_D;
660
661     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
662     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
663     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
664     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
665     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
666     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
667     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
668     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
669     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
670     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
671     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
672     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
673     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
674     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
675     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
676     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
677
678     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
679     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
680     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
681     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
682     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
683     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
684     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
685     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
686     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
687     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
688     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
689     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
690     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
691     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
692     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
693     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
694
695     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
696     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
697     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
698     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
699     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
700     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
701     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
702     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
703     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
704     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
705     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
706     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
707     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
708     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
709     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
710     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
711
712     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
713     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
714     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
715     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
716     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
717     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
718     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
719     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
720     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
721     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
722     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
723     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
724     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
725     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
726     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
727     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
728
729     a += MD5M_A;
730     b += MD5M_B;
731     c += MD5M_C;
732     d += MD5M_D;
733
734     w0_t[0] = uint_to_hex_lower8 ((a >>  0) & 255) <<  0
735             | uint_to_hex_lower8 ((a >>  8) & 255) << 16;
736     w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) <<  0
737             | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
738     w0_t[2] = uint_to_hex_lower8 ((b >>  0) & 255) <<  0
739             | uint_to_hex_lower8 ((b >>  8) & 255) << 16;
740     w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) <<  0
741             | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
742     w1_t[0] = uint_to_hex_lower8 ((c >>  0) & 255) <<  0
743             | uint_to_hex_lower8 ((c >>  8) & 255) << 16;
744     w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) <<  0
745             | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
746     w1_t[2] = uint_to_hex_lower8 ((d >>  0) & 255) <<  0
747             | uint_to_hex_lower8 ((d >>  8) & 255) << 16;
748     w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) <<  0
749             | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
750
751     // add the 4 byte challenge here
752
753     w2_t[0] = challenge;
754     w2_t[1] = 0x00000080;
755     w2_t[2] = 0;
756     w2_t[3] = 0;
757
758     w3_t[0] = 0;
759     w3_t[1] = 0;
760     w3_t[2] = (32 + 4) * 8;
761     w3_t[3] = 0;
762
763     /**
764      * md5 ($hash.$challenge)
765      */
766
767     a = MD5M_A;
768     b = MD5M_B;
769     c = MD5M_C;
770     d = MD5M_D;
771
772     MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
773     MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
774     MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
775     MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
776     MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
777     MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
778     MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
779     MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
780     MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
781     MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
782     MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
783     MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
784     MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
785     MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
786     MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
787     MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
788
789     MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
790     MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
791     MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
792     MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
793     MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
794     MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
795     MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
796     MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
797     MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
798     MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
799     MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
800     MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
801     MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
802     MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
803     MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
804     MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
805
806     MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
807     MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
808     MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
809     MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
810     MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
811     MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
812     MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
813     MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
814     MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
815     MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
816     MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
817     MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
818     MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
819     MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
820     MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
821     MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
822
823     MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
824     MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
825     MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
826     MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
827     MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
828     MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
829     MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
830     MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
831     MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
832     MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
833     MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
834     MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
835     MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
836     MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
837     MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
838     MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
839
840     const u32x r0 = a;
841     const u32x r1 = d;
842     const u32x r2 = c;
843     const u32x r3 = b;
844
845     #include VECT_COMPARE_S
846   }
847 }
848
849 extern "C" __global__ void __launch_bounds__ (256, 1) m11100_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)
850 {
851 }
852
853 extern "C" __global__ void __launch_bounds__ (256, 1) m11100_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)
854 {
855 }