2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
16 #include "include/kernel_functions.c"
17 #include "OpenCL/types_ocl.c"
18 #include "OpenCL/common.c"
20 #define COMPARE_S "OpenCL/check_single_comp4.c"
21 #define COMPARE_M "OpenCL/check_multi_comp4.c"
23 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
25 static void m03710m (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, __local u32 l_bin2asc[256])
31 const u32 gid = get_global_id (0);
32 const u32 lid = get_local_id (0);
40 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
41 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
42 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
43 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
47 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
48 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
49 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
50 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
66 const u32 salt_len = salt_bufs[salt_pos].salt_len;
68 const u32 pw_salt_len = 32 + salt_len;
76 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
78 const u32 w0r = bfs_buf[il_pos].i;
87 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
88 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
89 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
90 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
91 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
92 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
93 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
94 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
95 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
96 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
97 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
98 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
99 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
100 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
101 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
102 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
104 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
105 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
106 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
107 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
108 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
109 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
110 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
111 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
112 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
113 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
114 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
115 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
116 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
117 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
118 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
119 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
121 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
122 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
123 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
124 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
125 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
126 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
127 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
128 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
129 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
130 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
131 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
132 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
133 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
134 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
135 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
136 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
138 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
139 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
140 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
141 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
142 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
143 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
144 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
145 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
146 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
147 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
148 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
149 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
150 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
151 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
152 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
153 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
165 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
166 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
167 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
168 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
169 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
170 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
171 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
172 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
173 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
174 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
175 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
176 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
177 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
178 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
179 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
180 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
182 w2_t[0] = 0x00000080;
196 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
198 w3_t[2] = pw_salt_len * 8;
200 w0_t[0] |= salt_buf0[0];
201 w0_t[1] |= salt_buf0[1];
202 w0_t[2] |= salt_buf0[2];
203 w0_t[3] |= salt_buf0[3];
204 w1_t[0] |= salt_buf1[0];
205 w1_t[1] |= salt_buf1[1];
206 w1_t[2] |= salt_buf1[2];
207 w1_t[3] |= salt_buf1[3];
208 w2_t[0] |= salt_buf2[0];
209 w2_t[1] |= salt_buf2[1];
210 w2_t[2] |= salt_buf2[2];
211 w2_t[3] |= salt_buf2[3];
212 w3_t[0] |= salt_buf3[0];
213 w3_t[1] |= salt_buf3[1];
214 w3_t[2] |= salt_buf3[2];
215 w3_t[3] |= salt_buf3[3];
226 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
227 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
228 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
229 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
230 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
231 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
232 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
233 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
234 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
235 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
236 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
237 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
238 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
239 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
240 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
241 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
243 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
244 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
245 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
246 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
247 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
248 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
249 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
250 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
251 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
252 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
253 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
254 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
255 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
256 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
257 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
258 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
260 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
261 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
262 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
263 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
264 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
265 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
266 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
267 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
268 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
269 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
270 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
271 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
272 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
273 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
274 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
275 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
277 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
278 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
279 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
280 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
281 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
282 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
283 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
284 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
285 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
286 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
287 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
288 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
289 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
290 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
291 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
292 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
303 static void m03710s (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, __local u32 l_bin2asc[256])
309 const u32 gid = get_global_id (0);
310 const u32 lid = get_local_id (0);
316 const u32 search[4] =
318 digests_buf[digests_offset].digest_buf[DGST_R0],
319 digests_buf[digests_offset].digest_buf[DGST_R1],
320 digests_buf[digests_offset].digest_buf[DGST_R2],
321 digests_buf[digests_offset].digest_buf[DGST_R3]
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];
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];
356 const u32 salt_len = salt_bufs[salt_pos].salt_len;
358 const u32 pw_salt_len = 32 + salt_len;
366 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
368 const u32 w0r = bfs_buf[il_pos].i;
377 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
378 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
379 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
380 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
381 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
382 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
383 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
384 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
385 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
386 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
387 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
388 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
389 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
390 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
391 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
392 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
394 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
395 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
396 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
397 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
398 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
399 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
400 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
401 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
402 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
403 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
404 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
405 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
406 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
407 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
408 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
409 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
411 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
412 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
413 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
414 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
415 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
416 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
417 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
418 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
419 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
420 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
421 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
422 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
423 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
424 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
425 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
426 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
428 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
429 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
430 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
431 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
432 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
433 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
434 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
435 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
436 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
437 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
438 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
439 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
440 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
441 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
442 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
443 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
455 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
456 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
457 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
458 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
459 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
460 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
461 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
462 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
463 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
464 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
465 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
466 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
467 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
468 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
469 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
470 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
472 w2_t[0] = 0x00000080;
486 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
488 w3_t[2] = pw_salt_len * 8;
490 w0_t[0] |= salt_buf0[0];
491 w0_t[1] |= salt_buf0[1];
492 w0_t[2] |= salt_buf0[2];
493 w0_t[3] |= salt_buf0[3];
494 w1_t[0] |= salt_buf1[0];
495 w1_t[1] |= salt_buf1[1];
496 w1_t[2] |= salt_buf1[2];
497 w1_t[3] |= salt_buf1[3];
498 w2_t[0] |= salt_buf2[0];
499 w2_t[1] |= salt_buf2[1];
500 w2_t[2] |= salt_buf2[2];
501 w2_t[3] |= salt_buf2[3];
502 w3_t[0] |= salt_buf3[0];
503 w3_t[1] |= salt_buf3[1];
504 w3_t[2] |= salt_buf3[2];
505 w3_t[3] |= salt_buf3[3];
516 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
517 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
518 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
519 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
520 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
521 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
522 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
523 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
524 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
525 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
526 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
527 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
528 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
529 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
530 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
531 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
533 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
534 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
535 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
536 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
537 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
538 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
539 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
540 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
541 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
542 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
543 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
544 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
545 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
546 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
547 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
548 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
550 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
551 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
552 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
553 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
554 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
555 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
556 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
557 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
558 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
559 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
560 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
561 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
562 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
563 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
564 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
565 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
567 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
568 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
569 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
570 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
571 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
572 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
573 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
574 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
575 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
576 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
577 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
578 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
579 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
580 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
581 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
582 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
593 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_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)
599 const u32 gid = get_global_id (0);
605 const u32 lid = get_local_id (0);
609 w0[0] = pws[gid].i[ 0];
610 w0[1] = pws[gid].i[ 1];
611 w0[2] = pws[gid].i[ 2];
612 w0[3] = pws[gid].i[ 3];
632 w3[2] = pws[gid].i[14];
635 const u32 pw_len = pws[gid].pw_len;
641 __local u32 l_bin2asc[256];
643 const u32 lid4 = lid * 4;
645 const u32 lid40 = lid4 + 0;
646 const u32 lid41 = lid4 + 1;
647 const u32 lid42 = lid4 + 2;
648 const u32 lid43 = lid4 + 3;
650 const u32 v400 = (lid40 >> 0) & 15;
651 const u32 v401 = (lid40 >> 4) & 15;
652 const u32 v410 = (lid41 >> 0) & 15;
653 const u32 v411 = (lid41 >> 4) & 15;
654 const u32 v420 = (lid42 >> 0) & 15;
655 const u32 v421 = (lid42 >> 4) & 15;
656 const u32 v430 = (lid43 >> 0) & 15;
657 const u32 v431 = (lid43 >> 4) & 15;
659 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
660 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
661 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
662 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
663 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
664 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
665 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
666 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
668 barrier (CLK_LOCAL_MEM_FENCE);
670 if (gid >= gid_max) return;
676 m03710m (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, l_bin2asc);
679 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_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)
685 const u32 gid = get_global_id (0);
691 const u32 lid = get_local_id (0);
695 w0[0] = pws[gid].i[ 0];
696 w0[1] = pws[gid].i[ 1];
697 w0[2] = pws[gid].i[ 2];
698 w0[3] = pws[gid].i[ 3];
702 w1[0] = pws[gid].i[ 4];
703 w1[1] = pws[gid].i[ 5];
704 w1[2] = pws[gid].i[ 6];
705 w1[3] = pws[gid].i[ 7];
718 w3[2] = pws[gid].i[14];
721 const u32 pw_len = pws[gid].pw_len;
727 __local u32 l_bin2asc[256];
729 const u32 lid4 = lid * 4;
731 const u32 lid40 = lid4 + 0;
732 const u32 lid41 = lid4 + 1;
733 const u32 lid42 = lid4 + 2;
734 const u32 lid43 = lid4 + 3;
736 const u32 v400 = (lid40 >> 0) & 15;
737 const u32 v401 = (lid40 >> 4) & 15;
738 const u32 v410 = (lid41 >> 0) & 15;
739 const u32 v411 = (lid41 >> 4) & 15;
740 const u32 v420 = (lid42 >> 0) & 15;
741 const u32 v421 = (lid42 >> 4) & 15;
742 const u32 v430 = (lid43 >> 0) & 15;
743 const u32 v431 = (lid43 >> 4) & 15;
745 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
746 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
747 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
748 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
749 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
750 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
751 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
752 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
754 barrier (CLK_LOCAL_MEM_FENCE);
756 if (gid >= gid_max) return;
762 m03710m (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, l_bin2asc);
765 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_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)
771 const u32 gid = get_global_id (0);
777 const u32 lid = get_local_id (0);
781 w0[0] = pws[gid].i[ 0];
782 w0[1] = pws[gid].i[ 1];
783 w0[2] = pws[gid].i[ 2];
784 w0[3] = pws[gid].i[ 3];
788 w1[0] = pws[gid].i[ 4];
789 w1[1] = pws[gid].i[ 5];
790 w1[2] = pws[gid].i[ 6];
791 w1[3] = pws[gid].i[ 7];
795 w2[0] = pws[gid].i[ 8];
796 w2[1] = pws[gid].i[ 9];
797 w2[2] = pws[gid].i[10];
798 w2[3] = pws[gid].i[11];
802 w3[0] = pws[gid].i[12];
803 w3[1] = pws[gid].i[13];
804 w3[2] = pws[gid].i[14];
805 w3[3] = pws[gid].i[15];
807 const u32 pw_len = pws[gid].pw_len;
813 __local u32 l_bin2asc[256];
815 const u32 lid4 = lid * 4;
817 const u32 lid40 = lid4 + 0;
818 const u32 lid41 = lid4 + 1;
819 const u32 lid42 = lid4 + 2;
820 const u32 lid43 = lid4 + 3;
822 const u32 v400 = (lid40 >> 0) & 15;
823 const u32 v401 = (lid40 >> 4) & 15;
824 const u32 v410 = (lid41 >> 0) & 15;
825 const u32 v411 = (lid41 >> 4) & 15;
826 const u32 v420 = (lid42 >> 0) & 15;
827 const u32 v421 = (lid42 >> 4) & 15;
828 const u32 v430 = (lid43 >> 0) & 15;
829 const u32 v431 = (lid43 >> 4) & 15;
831 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
832 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
833 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
834 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
835 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
836 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
837 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
838 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
840 barrier (CLK_LOCAL_MEM_FENCE);
842 if (gid >= gid_max) return;
848 m03710m (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, l_bin2asc);
851 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_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)
857 const u32 gid = get_global_id (0);
863 const u32 lid = get_local_id (0);
867 w0[0] = pws[gid].i[ 0];
868 w0[1] = pws[gid].i[ 1];
869 w0[2] = pws[gid].i[ 2];
870 w0[3] = pws[gid].i[ 3];
890 w3[2] = pws[gid].i[14];
893 const u32 pw_len = pws[gid].pw_len;
899 __local u32 l_bin2asc[256];
901 const u32 lid4 = lid * 4;
903 const u32 lid40 = lid4 + 0;
904 const u32 lid41 = lid4 + 1;
905 const u32 lid42 = lid4 + 2;
906 const u32 lid43 = lid4 + 3;
908 const u32 v400 = (lid40 >> 0) & 15;
909 const u32 v401 = (lid40 >> 4) & 15;
910 const u32 v410 = (lid41 >> 0) & 15;
911 const u32 v411 = (lid41 >> 4) & 15;
912 const u32 v420 = (lid42 >> 0) & 15;
913 const u32 v421 = (lid42 >> 4) & 15;
914 const u32 v430 = (lid43 >> 0) & 15;
915 const u32 v431 = (lid43 >> 4) & 15;
917 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
918 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
919 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
920 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
921 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
922 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
923 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
924 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
926 barrier (CLK_LOCAL_MEM_FENCE);
928 if (gid >= gid_max) return;
934 m03710s (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, l_bin2asc);
937 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_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)
943 const u32 gid = get_global_id (0);
949 const u32 lid = get_local_id (0);
953 w0[0] = pws[gid].i[ 0];
954 w0[1] = pws[gid].i[ 1];
955 w0[2] = pws[gid].i[ 2];
956 w0[3] = pws[gid].i[ 3];
960 w1[0] = pws[gid].i[ 4];
961 w1[1] = pws[gid].i[ 5];
962 w1[2] = pws[gid].i[ 6];
963 w1[3] = pws[gid].i[ 7];
976 w3[2] = pws[gid].i[14];
979 const u32 pw_len = pws[gid].pw_len;
985 __local u32 l_bin2asc[256];
987 const u32 lid4 = lid * 4;
989 const u32 lid40 = lid4 + 0;
990 const u32 lid41 = lid4 + 1;
991 const u32 lid42 = lid4 + 2;
992 const u32 lid43 = lid4 + 3;
994 const u32 v400 = (lid40 >> 0) & 15;
995 const u32 v401 = (lid40 >> 4) & 15;
996 const u32 v410 = (lid41 >> 0) & 15;
997 const u32 v411 = (lid41 >> 4) & 15;
998 const u32 v420 = (lid42 >> 0) & 15;
999 const u32 v421 = (lid42 >> 4) & 15;
1000 const u32 v430 = (lid43 >> 0) & 15;
1001 const u32 v431 = (lid43 >> 4) & 15;
1003 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1004 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1005 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1006 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1007 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1008 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1009 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1010 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1012 barrier (CLK_LOCAL_MEM_FENCE);
1014 if (gid >= gid_max) return;
1020 m03710s (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, l_bin2asc);
1023 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m03710_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)
1029 const u32 gid = get_global_id (0);
1035 const u32 lid = get_local_id (0);
1039 w0[0] = pws[gid].i[ 0];
1040 w0[1] = pws[gid].i[ 1];
1041 w0[2] = pws[gid].i[ 2];
1042 w0[3] = pws[gid].i[ 3];
1046 w1[0] = pws[gid].i[ 4];
1047 w1[1] = pws[gid].i[ 5];
1048 w1[2] = pws[gid].i[ 6];
1049 w1[3] = pws[gid].i[ 7];
1053 w2[0] = pws[gid].i[ 8];
1054 w2[1] = pws[gid].i[ 9];
1055 w2[2] = pws[gid].i[10];
1056 w2[3] = pws[gid].i[11];
1060 w3[0] = pws[gid].i[12];
1061 w3[1] = pws[gid].i[13];
1062 w3[2] = pws[gid].i[14];
1063 w3[3] = pws[gid].i[15];
1065 const u32 pw_len = pws[gid].pw_len;
1071 __local u32 l_bin2asc[256];
1073 const u32 lid4 = lid * 4;
1075 const u32 lid40 = lid4 + 0;
1076 const u32 lid41 = lid4 + 1;
1077 const u32 lid42 = lid4 + 2;
1078 const u32 lid43 = lid4 + 3;
1080 const u32 v400 = (lid40 >> 0) & 15;
1081 const u32 v401 = (lid40 >> 4) & 15;
1082 const u32 v410 = (lid41 >> 0) & 15;
1083 const u32 v411 = (lid41 >> 4) & 15;
1084 const u32 v420 = (lid42 >> 0) & 15;
1085 const u32 v421 = (lid42 >> 4) & 15;
1086 const u32 v430 = (lid43 >> 0) & 15;
1087 const u32 v431 = (lid43 >> 4) & 15;
1089 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1090 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1091 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1092 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1093 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1094 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1095 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1096 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1098 barrier (CLK_LOCAL_MEM_FENCE);
1100 if (gid >= gid_max) return;
1106 m03710s (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, l_bin2asc);