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 kernel_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 kernel_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 m03710_m04 (__global pw_t *pws, __global kernel_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);
600 const u32 lid = get_local_id (0);
601 const u32 lsz = get_local_size (0);
607 __local u32 l_bin2asc[256];
609 for (u32 i = lid; i < 256; i += lsz)
611 const u32 i0 = (i >> 0) & 15;
612 const u32 i1 = (i >> 4) & 15;
614 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
615 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
618 barrier (CLK_LOCAL_MEM_FENCE);
620 if (gid >= gid_max) return;
628 w0[0] = pws[gid].i[ 0];
629 w0[1] = pws[gid].i[ 1];
630 w0[2] = pws[gid].i[ 2];
631 w0[3] = pws[gid].i[ 3];
651 w3[2] = pws[gid].i[14];
654 const u32 pw_len = pws[gid].pw_len;
660 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);
663 __kernel void m03710_m08 (__global pw_t *pws, __global kernel_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)
669 const u32 gid = get_global_id (0);
670 const u32 lid = get_local_id (0);
671 const u32 lsz = get_local_size (0);
679 w0[0] = pws[gid].i[ 0];
680 w0[1] = pws[gid].i[ 1];
681 w0[2] = pws[gid].i[ 2];
682 w0[3] = pws[gid].i[ 3];
686 w1[0] = pws[gid].i[ 4];
687 w1[1] = pws[gid].i[ 5];
688 w1[2] = pws[gid].i[ 6];
689 w1[3] = pws[gid].i[ 7];
702 w3[2] = pws[gid].i[14];
705 const u32 pw_len = pws[gid].pw_len;
711 __local u32 l_bin2asc[256];
713 const u32 lid4 = lid * 4;
715 const u32 lid40 = lid4 + 0;
716 const u32 lid41 = lid4 + 1;
717 const u32 lid42 = lid4 + 2;
718 const u32 lid43 = lid4 + 3;
720 const u32 v400 = (lid40 >> 0) & 15;
721 const u32 v401 = (lid40 >> 4) & 15;
722 const u32 v410 = (lid41 >> 0) & 15;
723 const u32 v411 = (lid41 >> 4) & 15;
724 const u32 v420 = (lid42 >> 0) & 15;
725 const u32 v421 = (lid42 >> 4) & 15;
726 const u32 v430 = (lid43 >> 0) & 15;
727 const u32 v431 = (lid43 >> 4) & 15;
729 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
730 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
731 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
732 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
733 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
734 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
735 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
736 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
738 barrier (CLK_LOCAL_MEM_FENCE);
740 if (gid >= gid_max) return;
746 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);
749 __kernel void m03710_m16 (__global pw_t *pws, __global kernel_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)
755 const u32 gid = get_global_id (0);
756 const u32 lid = get_local_id (0);
757 const u32 lsz = get_local_size (0);
765 w0[0] = pws[gid].i[ 0];
766 w0[1] = pws[gid].i[ 1];
767 w0[2] = pws[gid].i[ 2];
768 w0[3] = pws[gid].i[ 3];
772 w1[0] = pws[gid].i[ 4];
773 w1[1] = pws[gid].i[ 5];
774 w1[2] = pws[gid].i[ 6];
775 w1[3] = pws[gid].i[ 7];
779 w2[0] = pws[gid].i[ 8];
780 w2[1] = pws[gid].i[ 9];
781 w2[2] = pws[gid].i[10];
782 w2[3] = pws[gid].i[11];
786 w3[0] = pws[gid].i[12];
787 w3[1] = pws[gid].i[13];
788 w3[2] = pws[gid].i[14];
789 w3[3] = pws[gid].i[15];
791 const u32 pw_len = pws[gid].pw_len;
797 __local u32 l_bin2asc[256];
799 const u32 lid4 = lid * 4;
801 const u32 lid40 = lid4 + 0;
802 const u32 lid41 = lid4 + 1;
803 const u32 lid42 = lid4 + 2;
804 const u32 lid43 = lid4 + 3;
806 const u32 v400 = (lid40 >> 0) & 15;
807 const u32 v401 = (lid40 >> 4) & 15;
808 const u32 v410 = (lid41 >> 0) & 15;
809 const u32 v411 = (lid41 >> 4) & 15;
810 const u32 v420 = (lid42 >> 0) & 15;
811 const u32 v421 = (lid42 >> 4) & 15;
812 const u32 v430 = (lid43 >> 0) & 15;
813 const u32 v431 = (lid43 >> 4) & 15;
815 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
816 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
817 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
818 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
819 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
820 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
821 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
822 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
824 barrier (CLK_LOCAL_MEM_FENCE);
826 if (gid >= gid_max) return;
832 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);
835 __kernel void m03710_s04 (__global pw_t *pws, __global kernel_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)
841 const u32 gid = get_global_id (0);
842 const u32 lid = get_local_id (0);
843 const u32 lsz = get_local_size (0);
851 w0[0] = pws[gid].i[ 0];
852 w0[1] = pws[gid].i[ 1];
853 w0[2] = pws[gid].i[ 2];
854 w0[3] = pws[gid].i[ 3];
874 w3[2] = pws[gid].i[14];
877 const u32 pw_len = pws[gid].pw_len;
883 __local u32 l_bin2asc[256];
885 const u32 lid4 = lid * 4;
887 const u32 lid40 = lid4 + 0;
888 const u32 lid41 = lid4 + 1;
889 const u32 lid42 = lid4 + 2;
890 const u32 lid43 = lid4 + 3;
892 const u32 v400 = (lid40 >> 0) & 15;
893 const u32 v401 = (lid40 >> 4) & 15;
894 const u32 v410 = (lid41 >> 0) & 15;
895 const u32 v411 = (lid41 >> 4) & 15;
896 const u32 v420 = (lid42 >> 0) & 15;
897 const u32 v421 = (lid42 >> 4) & 15;
898 const u32 v430 = (lid43 >> 0) & 15;
899 const u32 v431 = (lid43 >> 4) & 15;
901 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
902 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
903 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
904 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
905 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
906 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
907 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
908 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
910 barrier (CLK_LOCAL_MEM_FENCE);
912 if (gid >= gid_max) return;
918 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);
921 __kernel void m03710_s08 (__global pw_t *pws, __global kernel_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)
927 const u32 gid = get_global_id (0);
928 const u32 lid = get_local_id (0);
929 const u32 lsz = get_local_size (0);
937 w0[0] = pws[gid].i[ 0];
938 w0[1] = pws[gid].i[ 1];
939 w0[2] = pws[gid].i[ 2];
940 w0[3] = pws[gid].i[ 3];
944 w1[0] = pws[gid].i[ 4];
945 w1[1] = pws[gid].i[ 5];
946 w1[2] = pws[gid].i[ 6];
947 w1[3] = pws[gid].i[ 7];
960 w3[2] = pws[gid].i[14];
963 const u32 pw_len = pws[gid].pw_len;
969 __local u32 l_bin2asc[256];
971 const u32 lid4 = lid * 4;
973 const u32 lid40 = lid4 + 0;
974 const u32 lid41 = lid4 + 1;
975 const u32 lid42 = lid4 + 2;
976 const u32 lid43 = lid4 + 3;
978 const u32 v400 = (lid40 >> 0) & 15;
979 const u32 v401 = (lid40 >> 4) & 15;
980 const u32 v410 = (lid41 >> 0) & 15;
981 const u32 v411 = (lid41 >> 4) & 15;
982 const u32 v420 = (lid42 >> 0) & 15;
983 const u32 v421 = (lid42 >> 4) & 15;
984 const u32 v430 = (lid43 >> 0) & 15;
985 const u32 v431 = (lid43 >> 4) & 15;
987 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
988 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
989 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
990 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
991 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
992 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
993 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
994 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
996 barrier (CLK_LOCAL_MEM_FENCE);
998 if (gid >= gid_max) return;
1004 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);
1007 __kernel void m03710_s16 (__global pw_t *pws, __global kernel_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)
1013 const u32 gid = get_global_id (0);
1014 const u32 lid = get_local_id (0);
1015 const u32 lsz = get_local_size (0);
1021 __local u32 l_bin2asc[256];
1023 for (u32 i = lid; i < 256; i += lsz)
1025 const u32 i0 = (i >> 0) & 15;
1026 const u32 i1 = (i >> 4) & 15;
1028 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
1029 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
1032 barrier (CLK_LOCAL_MEM_FENCE);
1034 if (gid >= gid_max) return;
1042 w0[0] = pws[gid].i[ 0];
1043 w0[1] = pws[gid].i[ 1];
1044 w0[2] = pws[gid].i[ 2];
1045 w0[3] = pws[gid].i[ 3];
1049 w1[0] = pws[gid].i[ 4];
1050 w1[1] = pws[gid].i[ 5];
1051 w1[2] = pws[gid].i[ 6];
1052 w1[3] = pws[gid].i[ 7];
1056 w2[0] = pws[gid].i[ 8];
1057 w2[1] = pws[gid].i[ 9];
1058 w2[2] = pws[gid].i[10];
1059 w2[3] = pws[gid].i[11];
1063 w3[0] = pws[gid].i[12];
1064 w3[1] = pws[gid].i[13];
1065 w3[2] = pws[gid].i[14];
1066 w3[3] = pws[gid].i[15];
1068 const u32 pw_len = pws[gid].pw_len;
1074 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);