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 "types_ocl.c"
20 #define COMPARE_S "check_single_comp4.c"
21 #define COMPARE_M "check_multi_comp4.c"
24 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
28 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
32 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
35 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])
41 const u32 gid = get_global_id (0);
42 const u32 lid = get_local_id (0);
50 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
51 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
52 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
53 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
57 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
58 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
59 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
60 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
76 const u32 salt_len = salt_bufs[salt_pos].salt_len;
78 const u32 pw_salt_len = 32 + salt_len;
86 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
88 const u32 w0r = bfs_buf[il_pos].i;
97 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
98 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
99 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
100 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
101 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
102 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
103 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
104 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
105 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
106 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
107 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
108 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
109 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
110 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
111 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
112 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
114 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
115 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
116 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
117 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
118 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
119 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
120 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
121 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
122 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
123 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
124 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
125 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
126 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
127 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
128 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
129 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
131 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
132 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
133 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
134 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
135 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
136 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
137 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
138 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
139 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
140 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
141 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
142 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
143 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
144 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
145 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
146 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
148 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
149 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
150 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
151 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
152 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
153 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
154 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
155 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
156 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
157 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
158 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
159 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
160 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
161 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
162 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
163 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
175 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
176 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
177 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
178 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
179 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
180 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
181 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
182 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
183 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
184 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
185 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
186 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
187 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
188 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
189 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
190 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
192 w2_t[0] = 0x00000080;
206 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
208 w3_t[2] = pw_salt_len * 8;
210 w0_t[0] |= salt_buf0[0];
211 w0_t[1] |= salt_buf0[1];
212 w0_t[2] |= salt_buf0[2];
213 w0_t[3] |= salt_buf0[3];
214 w1_t[0] |= salt_buf1[0];
215 w1_t[1] |= salt_buf1[1];
216 w1_t[2] |= salt_buf1[2];
217 w1_t[3] |= salt_buf1[3];
218 w2_t[0] |= salt_buf2[0];
219 w2_t[1] |= salt_buf2[1];
220 w2_t[2] |= salt_buf2[2];
221 w2_t[3] |= salt_buf2[3];
222 w3_t[0] |= salt_buf3[0];
223 w3_t[1] |= salt_buf3[1];
224 w3_t[2] |= salt_buf3[2];
225 w3_t[3] |= salt_buf3[3];
236 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
237 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
238 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
239 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
240 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
241 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
242 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
243 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
244 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
245 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
246 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
247 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
248 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
249 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
250 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
251 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
253 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
254 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
255 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
256 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
257 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
258 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
259 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
260 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
261 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
262 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
263 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
264 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
265 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
266 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
267 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
268 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
270 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
271 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
272 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
273 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
274 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
275 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
276 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
277 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
278 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
279 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
280 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
281 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
282 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
283 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
284 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
285 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
287 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
288 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
289 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
290 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
291 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
292 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
293 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
294 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
295 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
296 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
297 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
298 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
299 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
300 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
301 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
302 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
313 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])
319 const u32 gid = get_global_id (0);
320 const u32 lid = get_local_id (0);
326 const u32 search[4] =
328 digests_buf[digests_offset].digest_buf[DGST_R0],
329 digests_buf[digests_offset].digest_buf[DGST_R1],
330 digests_buf[digests_offset].digest_buf[DGST_R2],
331 digests_buf[digests_offset].digest_buf[DGST_R3]
340 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
341 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
342 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
343 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
347 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
348 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
349 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
350 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
366 const u32 salt_len = salt_bufs[salt_pos].salt_len;
368 const u32 pw_salt_len = 32 + salt_len;
376 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
378 const u32 w0r = bfs_buf[il_pos].i;
387 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
388 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
389 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
390 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
391 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
392 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
393 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
394 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
395 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
396 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
397 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
398 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
399 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
400 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
401 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
402 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
404 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
405 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
406 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
407 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
408 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
409 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
410 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
411 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
412 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
413 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
414 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
415 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
416 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
417 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
418 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
419 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
421 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
422 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
423 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
424 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
425 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
426 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
427 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
428 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
429 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
430 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
431 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
432 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
433 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
434 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
435 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
436 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
438 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
439 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
440 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
441 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
442 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
443 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
444 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
445 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
446 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
447 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
448 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
449 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
450 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
451 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
452 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
453 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
465 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
466 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
467 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
468 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
469 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
470 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
471 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
472 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
473 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
474 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
475 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
476 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
477 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
478 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
479 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
480 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
482 w2_t[0] = 0x00000080;
496 switch_buffer_by_offset (w0_t, w1_t, w2_t, w3_t, salt_len);
498 w3_t[2] = pw_salt_len * 8;
500 w0_t[0] |= salt_buf0[0];
501 w0_t[1] |= salt_buf0[1];
502 w0_t[2] |= salt_buf0[2];
503 w0_t[3] |= salt_buf0[3];
504 w1_t[0] |= salt_buf1[0];
505 w1_t[1] |= salt_buf1[1];
506 w1_t[2] |= salt_buf1[2];
507 w1_t[3] |= salt_buf1[3];
508 w2_t[0] |= salt_buf2[0];
509 w2_t[1] |= salt_buf2[1];
510 w2_t[2] |= salt_buf2[2];
511 w2_t[3] |= salt_buf2[3];
512 w3_t[0] |= salt_buf3[0];
513 w3_t[1] |= salt_buf3[1];
514 w3_t[2] |= salt_buf3[2];
515 w3_t[3] |= salt_buf3[3];
526 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
527 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
528 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
529 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
530 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
531 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
532 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
533 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
534 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
535 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
536 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
537 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
538 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
539 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
540 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
541 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
543 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
544 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
545 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
546 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
547 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
548 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
549 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
550 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
551 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
552 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
553 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
554 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
555 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
556 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
557 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
558 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
560 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
561 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
562 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
563 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
564 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
565 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
566 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
567 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
568 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
569 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
570 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
571 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
572 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
573 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
574 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
575 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
577 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
578 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
579 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
580 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
581 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
582 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
583 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
584 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
585 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
586 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
587 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
588 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
589 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
590 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
591 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
592 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
603 __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)
609 const u32 gid = get_global_id (0);
615 const u32 lid = get_local_id (0);
619 w0[0] = pws[gid].i[ 0];
620 w0[1] = pws[gid].i[ 1];
621 w0[2] = pws[gid].i[ 2];
622 w0[3] = pws[gid].i[ 3];
642 w3[2] = pws[gid].i[14];
645 const u32 pw_len = pws[gid].pw_len;
651 __local u32 l_bin2asc[256];
653 const u32 lid4 = lid * 4;
655 const u32 lid40 = lid4 + 0;
656 const u32 lid41 = lid4 + 1;
657 const u32 lid42 = lid4 + 2;
658 const u32 lid43 = lid4 + 3;
660 const u32 v400 = (lid40 >> 0) & 15;
661 const u32 v401 = (lid40 >> 4) & 15;
662 const u32 v410 = (lid41 >> 0) & 15;
663 const u32 v411 = (lid41 >> 4) & 15;
664 const u32 v420 = (lid42 >> 0) & 15;
665 const u32 v421 = (lid42 >> 4) & 15;
666 const u32 v430 = (lid43 >> 0) & 15;
667 const u32 v431 = (lid43 >> 4) & 15;
669 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
670 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
671 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
672 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
673 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
674 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
675 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
676 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
678 barrier (CLK_LOCAL_MEM_FENCE);
680 if (gid >= gid_max) return;
686 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);
689 __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)
695 const u32 gid = get_global_id (0);
701 const u32 lid = get_local_id (0);
705 w0[0] = pws[gid].i[ 0];
706 w0[1] = pws[gid].i[ 1];
707 w0[2] = pws[gid].i[ 2];
708 w0[3] = pws[gid].i[ 3];
712 w1[0] = pws[gid].i[ 4];
713 w1[1] = pws[gid].i[ 5];
714 w1[2] = pws[gid].i[ 6];
715 w1[3] = pws[gid].i[ 7];
728 w3[2] = pws[gid].i[14];
731 const u32 pw_len = pws[gid].pw_len;
737 __local u32 l_bin2asc[256];
739 const u32 lid4 = lid * 4;
741 const u32 lid40 = lid4 + 0;
742 const u32 lid41 = lid4 + 1;
743 const u32 lid42 = lid4 + 2;
744 const u32 lid43 = lid4 + 3;
746 const u32 v400 = (lid40 >> 0) & 15;
747 const u32 v401 = (lid40 >> 4) & 15;
748 const u32 v410 = (lid41 >> 0) & 15;
749 const u32 v411 = (lid41 >> 4) & 15;
750 const u32 v420 = (lid42 >> 0) & 15;
751 const u32 v421 = (lid42 >> 4) & 15;
752 const u32 v430 = (lid43 >> 0) & 15;
753 const u32 v431 = (lid43 >> 4) & 15;
755 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
756 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
757 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
758 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
759 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
760 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
761 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
762 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
764 barrier (CLK_LOCAL_MEM_FENCE);
766 if (gid >= gid_max) return;
772 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);
775 __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)
781 const u32 gid = get_global_id (0);
787 const u32 lid = get_local_id (0);
791 w0[0] = pws[gid].i[ 0];
792 w0[1] = pws[gid].i[ 1];
793 w0[2] = pws[gid].i[ 2];
794 w0[3] = pws[gid].i[ 3];
798 w1[0] = pws[gid].i[ 4];
799 w1[1] = pws[gid].i[ 5];
800 w1[2] = pws[gid].i[ 6];
801 w1[3] = pws[gid].i[ 7];
805 w2[0] = pws[gid].i[ 8];
806 w2[1] = pws[gid].i[ 9];
807 w2[2] = pws[gid].i[10];
808 w2[3] = pws[gid].i[11];
812 w3[0] = pws[gid].i[12];
813 w3[1] = pws[gid].i[13];
814 w3[2] = pws[gid].i[14];
815 w3[3] = pws[gid].i[15];
817 const u32 pw_len = pws[gid].pw_len;
823 __local u32 l_bin2asc[256];
825 const u32 lid4 = lid * 4;
827 const u32 lid40 = lid4 + 0;
828 const u32 lid41 = lid4 + 1;
829 const u32 lid42 = lid4 + 2;
830 const u32 lid43 = lid4 + 3;
832 const u32 v400 = (lid40 >> 0) & 15;
833 const u32 v401 = (lid40 >> 4) & 15;
834 const u32 v410 = (lid41 >> 0) & 15;
835 const u32 v411 = (lid41 >> 4) & 15;
836 const u32 v420 = (lid42 >> 0) & 15;
837 const u32 v421 = (lid42 >> 4) & 15;
838 const u32 v430 = (lid43 >> 0) & 15;
839 const u32 v431 = (lid43 >> 4) & 15;
841 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
842 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
843 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
844 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
845 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
846 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
847 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
848 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
850 barrier (CLK_LOCAL_MEM_FENCE);
852 if (gid >= gid_max) return;
858 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);
861 __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)
867 const u32 gid = get_global_id (0);
873 const u32 lid = get_local_id (0);
877 w0[0] = pws[gid].i[ 0];
878 w0[1] = pws[gid].i[ 1];
879 w0[2] = pws[gid].i[ 2];
880 w0[3] = pws[gid].i[ 3];
900 w3[2] = pws[gid].i[14];
903 const u32 pw_len = pws[gid].pw_len;
909 __local u32 l_bin2asc[256];
911 const u32 lid4 = lid * 4;
913 const u32 lid40 = lid4 + 0;
914 const u32 lid41 = lid4 + 1;
915 const u32 lid42 = lid4 + 2;
916 const u32 lid43 = lid4 + 3;
918 const u32 v400 = (lid40 >> 0) & 15;
919 const u32 v401 = (lid40 >> 4) & 15;
920 const u32 v410 = (lid41 >> 0) & 15;
921 const u32 v411 = (lid41 >> 4) & 15;
922 const u32 v420 = (lid42 >> 0) & 15;
923 const u32 v421 = (lid42 >> 4) & 15;
924 const u32 v430 = (lid43 >> 0) & 15;
925 const u32 v431 = (lid43 >> 4) & 15;
927 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
928 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
929 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
930 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
931 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
932 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
933 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
934 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
936 barrier (CLK_LOCAL_MEM_FENCE);
938 if (gid >= gid_max) return;
944 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);
947 __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)
953 const u32 gid = get_global_id (0);
959 const u32 lid = get_local_id (0);
963 w0[0] = pws[gid].i[ 0];
964 w0[1] = pws[gid].i[ 1];
965 w0[2] = pws[gid].i[ 2];
966 w0[3] = pws[gid].i[ 3];
970 w1[0] = pws[gid].i[ 4];
971 w1[1] = pws[gid].i[ 5];
972 w1[2] = pws[gid].i[ 6];
973 w1[3] = pws[gid].i[ 7];
986 w3[2] = pws[gid].i[14];
989 const u32 pw_len = pws[gid].pw_len;
995 __local u32 l_bin2asc[256];
997 const u32 lid4 = lid * 4;
999 const u32 lid40 = lid4 + 0;
1000 const u32 lid41 = lid4 + 1;
1001 const u32 lid42 = lid4 + 2;
1002 const u32 lid43 = lid4 + 3;
1004 const u32 v400 = (lid40 >> 0) & 15;
1005 const u32 v401 = (lid40 >> 4) & 15;
1006 const u32 v410 = (lid41 >> 0) & 15;
1007 const u32 v411 = (lid41 >> 4) & 15;
1008 const u32 v420 = (lid42 >> 0) & 15;
1009 const u32 v421 = (lid42 >> 4) & 15;
1010 const u32 v430 = (lid43 >> 0) & 15;
1011 const u32 v431 = (lid43 >> 4) & 15;
1013 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1014 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1015 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1016 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1017 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1018 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1019 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1020 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1022 barrier (CLK_LOCAL_MEM_FENCE);
1024 if (gid >= gid_max) return;
1030 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);
1033 __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)
1039 const u32 gid = get_global_id (0);
1045 const u32 lid = get_local_id (0);
1049 w0[0] = pws[gid].i[ 0];
1050 w0[1] = pws[gid].i[ 1];
1051 w0[2] = pws[gid].i[ 2];
1052 w0[3] = pws[gid].i[ 3];
1056 w1[0] = pws[gid].i[ 4];
1057 w1[1] = pws[gid].i[ 5];
1058 w1[2] = pws[gid].i[ 6];
1059 w1[3] = pws[gid].i[ 7];
1063 w2[0] = pws[gid].i[ 8];
1064 w2[1] = pws[gid].i[ 9];
1065 w2[2] = pws[gid].i[10];
1066 w2[3] = pws[gid].i[11];
1070 w3[0] = pws[gid].i[12];
1071 w3[1] = pws[gid].i[13];
1072 w3[2] = pws[gid].i[14];
1073 w3[3] = pws[gid].i[15];
1075 const u32 pw_len = pws[gid].pw_len;
1081 __local u32 l_bin2asc[256];
1083 const u32 lid4 = lid * 4;
1085 const u32 lid40 = lid4 + 0;
1086 const u32 lid41 = lid4 + 1;
1087 const u32 lid42 = lid4 + 2;
1088 const u32 lid43 = lid4 + 3;
1090 const u32 v400 = (lid40 >> 0) & 15;
1091 const u32 v401 = (lid40 >> 4) & 15;
1092 const u32 v410 = (lid41 >> 0) & 15;
1093 const u32 v411 = (lid41 >> 4) & 15;
1094 const u32 v420 = (lid42 >> 0) & 15;
1095 const u32 v421 = (lid42 >> 4) & 15;
1096 const u32 v430 = (lid43 >> 0) & 15;
1097 const u32 v431 = (lid43 >> 4) & 15;
1099 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1100 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1101 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1102 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1103 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1104 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1105 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1106 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1108 barrier (CLK_LOCAL_MEM_FENCE);
1110 if (gid >= gid_max) return;
1116 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);