2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
28 #include "include/kernel_functions.c"
29 #include "types_amd.c"
30 #include "common_amd.c"
33 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
34 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
38 #define VECT_COMPARE_S "check_single_vect2_comp4.c"
39 #define VECT_COMPARE_M "check_multi_vect2_comp4.c"
43 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
44 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
48 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
52 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
56 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
59 static void m03710m (u32x w0[4], u32x w1[4], u32x w2[4], u32x 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])
65 const u32 gid = get_global_id (0);
66 const u32 lid = get_local_id (0);
74 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
75 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
76 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
77 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
81 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
82 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
83 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
84 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
100 const u32 salt_len = salt_bufs[salt_pos].salt_len;
102 const u32 pw_salt_len = 32 + salt_len;
110 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
112 const u32 w0r = bfs_buf[il_pos].i;
121 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
122 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
123 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
124 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
125 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
126 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
127 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
128 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
129 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
130 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
131 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
132 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
133 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
134 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
135 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
136 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
138 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
139 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
140 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
141 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
142 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
143 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
144 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
145 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
146 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
147 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
148 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
149 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
150 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
151 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
152 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
153 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
155 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
156 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
157 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
158 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
159 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
160 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
161 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
162 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
163 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
164 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
165 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
166 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
167 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
168 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
169 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
170 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
172 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
173 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
174 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
175 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
176 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
177 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
178 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
179 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
180 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
181 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
182 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
183 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
184 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
185 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
186 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
187 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
199 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
200 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
201 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
202 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
203 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
204 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
205 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
206 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
207 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
208 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
209 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
210 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
211 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
212 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
213 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
214 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
216 w2_t[0] = 0x00000080;
230 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
232 w3_t[2] = pw_salt_len * 8;
234 w0_t[0] |= salt_buf0[0];
235 w0_t[1] |= salt_buf0[1];
236 w0_t[2] |= salt_buf0[2];
237 w0_t[3] |= salt_buf0[3];
238 w1_t[0] |= salt_buf1[0];
239 w1_t[1] |= salt_buf1[1];
240 w1_t[2] |= salt_buf1[2];
241 w1_t[3] |= salt_buf1[3];
242 w2_t[0] |= salt_buf2[0];
243 w2_t[1] |= salt_buf2[1];
244 w2_t[2] |= salt_buf2[2];
245 w2_t[3] |= salt_buf2[3];
246 w3_t[0] |= salt_buf3[0];
247 w3_t[1] |= salt_buf3[1];
248 w3_t[2] |= salt_buf3[2];
249 w3_t[3] |= salt_buf3[3];
260 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
261 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
262 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
263 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
264 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
265 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
266 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
267 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
268 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
269 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
270 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
271 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
272 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
273 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
274 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
275 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
277 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
278 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
279 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
280 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
281 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
282 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
283 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
284 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
285 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
286 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
287 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
288 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
289 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
290 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
291 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
292 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
294 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
295 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
296 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
297 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
298 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
299 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
300 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
301 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
302 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
303 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
304 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
305 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
306 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
307 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
308 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
309 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
311 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
312 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
313 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
314 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
315 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
316 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
317 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
318 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
319 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
320 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
321 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
322 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
323 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
324 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
325 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
326 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
333 #include VECT_COMPARE_M
337 static void m03710s (u32x w0[4], u32x w1[4], u32x w2[4], u32x 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])
343 const u32 gid = get_global_id (0);
344 const u32 lid = get_local_id (0);
350 const u32 search[4] =
352 digests_buf[digests_offset].digest_buf[DGST_R0],
353 digests_buf[digests_offset].digest_buf[DGST_R1],
354 digests_buf[digests_offset].digest_buf[DGST_R2],
355 digests_buf[digests_offset].digest_buf[DGST_R3]
364 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
365 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
366 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
367 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
371 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
372 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
373 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
374 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
390 const u32 salt_len = salt_bufs[salt_pos].salt_len;
392 const u32 pw_salt_len = 32 + salt_len;
400 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
402 const u32 w0r = bfs_buf[il_pos].i;
411 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
412 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
413 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
414 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
415 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
416 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
417 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
418 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
419 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
420 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
421 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
422 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
423 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
424 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
425 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
426 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
428 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
429 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
430 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
431 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
432 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
433 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
434 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
435 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
436 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
437 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
438 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
439 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
440 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
441 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
442 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
443 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
445 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
446 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
447 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
448 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
449 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
450 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
451 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
452 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
453 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
454 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
455 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
456 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
457 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
458 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
459 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
460 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
462 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
463 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
464 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
465 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
466 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
467 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
468 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
469 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
470 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
471 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
472 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
473 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
474 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
475 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
476 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
477 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
489 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
490 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
491 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
492 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
493 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
494 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
495 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
496 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
497 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
498 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
499 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
500 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
501 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
502 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
503 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
504 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
506 w2_t[0] = 0x00000080;
520 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
522 w3_t[2] = pw_salt_len * 8;
524 w0_t[0] |= salt_buf0[0];
525 w0_t[1] |= salt_buf0[1];
526 w0_t[2] |= salt_buf0[2];
527 w0_t[3] |= salt_buf0[3];
528 w1_t[0] |= salt_buf1[0];
529 w1_t[1] |= salt_buf1[1];
530 w1_t[2] |= salt_buf1[2];
531 w1_t[3] |= salt_buf1[3];
532 w2_t[0] |= salt_buf2[0];
533 w2_t[1] |= salt_buf2[1];
534 w2_t[2] |= salt_buf2[2];
535 w2_t[3] |= salt_buf2[3];
536 w3_t[0] |= salt_buf3[0];
537 w3_t[1] |= salt_buf3[1];
538 w3_t[2] |= salt_buf3[2];
539 w3_t[3] |= salt_buf3[3];
550 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
551 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
552 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
553 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
554 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
555 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
556 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
557 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
558 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
559 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
560 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
561 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
562 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
563 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
564 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
565 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
567 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
568 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
569 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
570 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
571 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
572 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
573 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
574 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
575 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
576 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
577 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
578 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
579 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
580 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
581 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
582 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
584 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
585 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
586 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
587 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
588 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
589 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
590 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
591 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
592 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
593 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
594 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
595 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
596 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
597 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
598 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
599 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
601 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
602 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
603 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
604 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
605 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
606 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
607 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
608 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
609 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
610 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
611 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
612 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
613 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
614 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
615 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
616 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
623 #include VECT_COMPARE_S
627 __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)
633 const u32 gid = get_global_id (0);
639 const u32 lid = get_local_id (0);
643 w0[0] = pws[gid].i[ 0];
644 w0[1] = pws[gid].i[ 1];
645 w0[2] = pws[gid].i[ 2];
646 w0[3] = pws[gid].i[ 3];
666 w3[2] = pws[gid].i[14];
669 const u32 pw_len = pws[gid].pw_len;
675 __local u32 l_bin2asc[256];
677 const u32 lid4 = lid * 4;
679 const u32 lid40 = lid4 + 0;
680 const u32 lid41 = lid4 + 1;
681 const u32 lid42 = lid4 + 2;
682 const u32 lid43 = lid4 + 3;
684 const u32 v400 = (lid40 >> 0) & 15;
685 const u32 v401 = (lid40 >> 4) & 15;
686 const u32 v410 = (lid41 >> 0) & 15;
687 const u32 v411 = (lid41 >> 4) & 15;
688 const u32 v420 = (lid42 >> 0) & 15;
689 const u32 v421 = (lid42 >> 4) & 15;
690 const u32 v430 = (lid43 >> 0) & 15;
691 const u32 v431 = (lid43 >> 4) & 15;
693 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
694 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
695 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
696 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
697 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
698 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
699 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
700 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
702 barrier (CLK_LOCAL_MEM_FENCE);
704 if (gid >= gid_max) return;
710 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);
713 __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)
719 const u32 gid = get_global_id (0);
725 const u32 lid = get_local_id (0);
729 w0[0] = pws[gid].i[ 0];
730 w0[1] = pws[gid].i[ 1];
731 w0[2] = pws[gid].i[ 2];
732 w0[3] = pws[gid].i[ 3];
736 w1[0] = pws[gid].i[ 4];
737 w1[1] = pws[gid].i[ 5];
738 w1[2] = pws[gid].i[ 6];
739 w1[3] = pws[gid].i[ 7];
752 w3[2] = pws[gid].i[14];
755 const u32 pw_len = pws[gid].pw_len;
761 __local u32 l_bin2asc[256];
763 const u32 lid4 = lid * 4;
765 const u32 lid40 = lid4 + 0;
766 const u32 lid41 = lid4 + 1;
767 const u32 lid42 = lid4 + 2;
768 const u32 lid43 = lid4 + 3;
770 const u32 v400 = (lid40 >> 0) & 15;
771 const u32 v401 = (lid40 >> 4) & 15;
772 const u32 v410 = (lid41 >> 0) & 15;
773 const u32 v411 = (lid41 >> 4) & 15;
774 const u32 v420 = (lid42 >> 0) & 15;
775 const u32 v421 = (lid42 >> 4) & 15;
776 const u32 v430 = (lid43 >> 0) & 15;
777 const u32 v431 = (lid43 >> 4) & 15;
779 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
780 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
781 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
782 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
783 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
784 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
785 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
786 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
788 barrier (CLK_LOCAL_MEM_FENCE);
790 if (gid >= gid_max) return;
796 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);
799 __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)
805 const u32 gid = get_global_id (0);
811 const u32 lid = get_local_id (0);
815 w0[0] = pws[gid].i[ 0];
816 w0[1] = pws[gid].i[ 1];
817 w0[2] = pws[gid].i[ 2];
818 w0[3] = pws[gid].i[ 3];
822 w1[0] = pws[gid].i[ 4];
823 w1[1] = pws[gid].i[ 5];
824 w1[2] = pws[gid].i[ 6];
825 w1[3] = pws[gid].i[ 7];
829 w2[0] = pws[gid].i[ 8];
830 w2[1] = pws[gid].i[ 9];
831 w2[2] = pws[gid].i[10];
832 w2[3] = pws[gid].i[11];
836 w3[0] = pws[gid].i[12];
837 w3[1] = pws[gid].i[13];
838 w3[2] = pws[gid].i[14];
839 w3[3] = pws[gid].i[15];
841 const u32 pw_len = pws[gid].pw_len;
847 __local u32 l_bin2asc[256];
849 const u32 lid4 = lid * 4;
851 const u32 lid40 = lid4 + 0;
852 const u32 lid41 = lid4 + 1;
853 const u32 lid42 = lid4 + 2;
854 const u32 lid43 = lid4 + 3;
856 const u32 v400 = (lid40 >> 0) & 15;
857 const u32 v401 = (lid40 >> 4) & 15;
858 const u32 v410 = (lid41 >> 0) & 15;
859 const u32 v411 = (lid41 >> 4) & 15;
860 const u32 v420 = (lid42 >> 0) & 15;
861 const u32 v421 = (lid42 >> 4) & 15;
862 const u32 v430 = (lid43 >> 0) & 15;
863 const u32 v431 = (lid43 >> 4) & 15;
865 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
866 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
867 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
868 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
869 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
870 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
871 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
872 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
874 barrier (CLK_LOCAL_MEM_FENCE);
876 if (gid >= gid_max) return;
882 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);
885 __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)
891 const u32 gid = get_global_id (0);
897 const u32 lid = get_local_id (0);
901 w0[0] = pws[gid].i[ 0];
902 w0[1] = pws[gid].i[ 1];
903 w0[2] = pws[gid].i[ 2];
904 w0[3] = pws[gid].i[ 3];
924 w3[2] = pws[gid].i[14];
927 const u32 pw_len = pws[gid].pw_len;
933 __local u32 l_bin2asc[256];
935 const u32 lid4 = lid * 4;
937 const u32 lid40 = lid4 + 0;
938 const u32 lid41 = lid4 + 1;
939 const u32 lid42 = lid4 + 2;
940 const u32 lid43 = lid4 + 3;
942 const u32 v400 = (lid40 >> 0) & 15;
943 const u32 v401 = (lid40 >> 4) & 15;
944 const u32 v410 = (lid41 >> 0) & 15;
945 const u32 v411 = (lid41 >> 4) & 15;
946 const u32 v420 = (lid42 >> 0) & 15;
947 const u32 v421 = (lid42 >> 4) & 15;
948 const u32 v430 = (lid43 >> 0) & 15;
949 const u32 v431 = (lid43 >> 4) & 15;
951 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
952 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
953 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
954 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
955 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
956 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
957 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
958 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
960 barrier (CLK_LOCAL_MEM_FENCE);
962 if (gid >= gid_max) return;
968 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);
971 __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)
977 const u32 gid = get_global_id (0);
983 const u32 lid = get_local_id (0);
987 w0[0] = pws[gid].i[ 0];
988 w0[1] = pws[gid].i[ 1];
989 w0[2] = pws[gid].i[ 2];
990 w0[3] = pws[gid].i[ 3];
994 w1[0] = pws[gid].i[ 4];
995 w1[1] = pws[gid].i[ 5];
996 w1[2] = pws[gid].i[ 6];
997 w1[3] = pws[gid].i[ 7];
1010 w3[2] = pws[gid].i[14];
1013 const u32 pw_len = pws[gid].pw_len;
1019 __local u32 l_bin2asc[256];
1021 const u32 lid4 = lid * 4;
1023 const u32 lid40 = lid4 + 0;
1024 const u32 lid41 = lid4 + 1;
1025 const u32 lid42 = lid4 + 2;
1026 const u32 lid43 = lid4 + 3;
1028 const u32 v400 = (lid40 >> 0) & 15;
1029 const u32 v401 = (lid40 >> 4) & 15;
1030 const u32 v410 = (lid41 >> 0) & 15;
1031 const u32 v411 = (lid41 >> 4) & 15;
1032 const u32 v420 = (lid42 >> 0) & 15;
1033 const u32 v421 = (lid42 >> 4) & 15;
1034 const u32 v430 = (lid43 >> 0) & 15;
1035 const u32 v431 = (lid43 >> 4) & 15;
1037 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1038 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1039 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1040 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1041 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1042 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1043 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1044 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1046 barrier (CLK_LOCAL_MEM_FENCE);
1048 if (gid >= gid_max) return;
1054 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);
1057 __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)
1063 const u32 gid = get_global_id (0);
1069 const u32 lid = get_local_id (0);
1073 w0[0] = pws[gid].i[ 0];
1074 w0[1] = pws[gid].i[ 1];
1075 w0[2] = pws[gid].i[ 2];
1076 w0[3] = pws[gid].i[ 3];
1080 w1[0] = pws[gid].i[ 4];
1081 w1[1] = pws[gid].i[ 5];
1082 w1[2] = pws[gid].i[ 6];
1083 w1[3] = pws[gid].i[ 7];
1087 w2[0] = pws[gid].i[ 8];
1088 w2[1] = pws[gid].i[ 9];
1089 w2[2] = pws[gid].i[10];
1090 w2[3] = pws[gid].i[11];
1094 w3[0] = pws[gid].i[12];
1095 w3[1] = pws[gid].i[13];
1096 w3[2] = pws[gid].i[14];
1097 w3[3] = pws[gid].i[15];
1099 const u32 pw_len = pws[gid].pw_len;
1105 __local u32 l_bin2asc[256];
1107 const u32 lid4 = lid * 4;
1109 const u32 lid40 = lid4 + 0;
1110 const u32 lid41 = lid4 + 1;
1111 const u32 lid42 = lid4 + 2;
1112 const u32 lid43 = lid4 + 3;
1114 const u32 v400 = (lid40 >> 0) & 15;
1115 const u32 v401 = (lid40 >> 4) & 15;
1116 const u32 v410 = (lid41 >> 0) & 15;
1117 const u32 v411 = (lid41 >> 4) & 15;
1118 const u32 v420 = (lid42 >> 0) & 15;
1119 const u32 v421 = (lid42 >> 4) & 15;
1120 const u32 v430 = (lid43 >> 0) & 15;
1121 const u32 v431 = (lid43 >> 4) & 15;
1123 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1124 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1125 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1126 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1127 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1128 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1129 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1130 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1132 barrier (CLK_LOCAL_MEM_FENCE);
1134 if (gid >= gid_max) return;
1140 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);