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