2 * Author......: Jens Steube <jens.steube@gmail.com>
10 #include "include/constants.h"
11 #include "include/kernel_vendor.h"
18 #include "include/kernel_functions.c"
19 #include "OpenCL/types_ocl.c"
20 #include "OpenCL/common.c"
21 #include "OpenCL/simd.c"
24 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
26 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
28 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
30 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
33 static void m02610m (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])
39 const u32 gid = get_global_id (0);
40 const u32 lid = get_local_id (0);
46 const u32 salt_len = salt_bufs[salt_pos].salt_len;
50 s[0] = salt_bufs[salt_pos].salt_buf[0];
51 s[1] = salt_bufs[salt_pos].salt_buf[1];
52 s[2] = salt_bufs[salt_pos].salt_buf[2];
53 s[3] = salt_bufs[salt_pos].salt_buf[3];
54 s[4] = salt_bufs[salt_pos].salt_buf[4];
55 s[5] = salt_bufs[salt_pos].salt_buf[5];
56 s[6] = (32 + salt_len) * 8;
65 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
67 const u32x w0r = w0r_create_bft (bfs_buf, il_pos);
69 const u32x w0lr = w0l | w0r;
104 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
105 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
106 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
107 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
108 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
109 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
110 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
111 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
112 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
113 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
114 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
115 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
116 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
117 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
118 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
119 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
121 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
122 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
123 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
124 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
125 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
126 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
127 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
128 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
129 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
130 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
131 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
132 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
133 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
134 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
135 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
136 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
138 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
139 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
140 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
141 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
142 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
143 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
144 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
145 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
146 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
147 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
148 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
149 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
150 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
151 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
152 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
153 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
155 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
156 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
157 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
158 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
159 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
160 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
161 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
162 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
163 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
164 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
165 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
166 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
167 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
168 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
169 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
170 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
177 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
178 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
179 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
180 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
181 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
182 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
183 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
184 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
185 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
186 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
187 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
188 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
189 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
190 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
191 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
192 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
209 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
210 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
211 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
212 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
213 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
214 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
215 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
216 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
217 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
218 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
219 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
220 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
221 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
222 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
223 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
224 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
226 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
227 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
228 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
229 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
230 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
231 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
232 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
233 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
234 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
235 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
236 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
237 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
238 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
239 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
240 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
241 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
243 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
244 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
245 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
246 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
247 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
248 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
249 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
250 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
251 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
252 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
253 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
254 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
255 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
256 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
257 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
258 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
260 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
261 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
262 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
263 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
264 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
265 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
266 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
267 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
268 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
269 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
270 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
271 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
272 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
273 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
274 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
275 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
277 COMPARE_M_SIMD (a, d, c, b);
281 static void m02610s (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])
287 const u32 gid = get_global_id (0);
288 const u32 lid = get_local_id (0);
294 const u32 search[4] =
296 digests_buf[digests_offset].digest_buf[DGST_R0],
297 digests_buf[digests_offset].digest_buf[DGST_R1],
298 digests_buf[digests_offset].digest_buf[DGST_R2],
299 digests_buf[digests_offset].digest_buf[DGST_R3]
306 const u32 salt_len = salt_bufs[salt_pos].salt_len;
310 s[0] = salt_bufs[salt_pos].salt_buf[0];
311 s[1] = salt_bufs[salt_pos].salt_buf[1];
312 s[2] = salt_bufs[salt_pos].salt_buf[2];
313 s[3] = salt_bufs[salt_pos].salt_buf[3];
314 s[4] = salt_bufs[salt_pos].salt_buf[4];
315 s[5] = salt_bufs[salt_pos].salt_buf[5];
316 s[6] = (32 + salt_len) * 8;
325 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
327 const u32x w0r = w0r_create_bft (bfs_buf, il_pos);
329 const u32x w0lr = w0l | w0r;
364 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
365 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
366 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
367 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
368 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
369 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
370 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
371 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
372 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
373 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
374 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
375 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
376 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
377 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
378 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
379 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
381 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
382 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
383 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
384 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
385 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
386 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
387 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
388 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
389 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
390 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
391 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
392 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
393 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
394 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
395 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
396 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
398 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
399 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
400 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
401 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
402 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
403 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
404 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
405 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
406 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
407 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
408 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
409 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
410 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
411 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
412 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
413 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
415 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
416 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
417 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
418 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
419 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
420 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
421 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
422 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
423 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
424 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
425 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
426 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
427 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
428 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
429 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
430 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
437 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
438 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
439 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
440 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
441 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
442 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
443 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
444 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
445 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
446 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
447 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
448 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
449 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
450 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
451 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
452 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
469 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
470 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
471 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
472 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
473 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
474 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
475 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
476 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
477 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
478 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
479 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
480 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
481 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
482 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
483 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
484 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
486 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
487 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
488 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
489 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
490 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
491 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
492 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
493 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
494 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
495 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
496 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
497 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
498 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
499 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
500 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
501 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
503 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
504 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
505 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
506 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
507 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
508 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
509 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
510 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
511 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
512 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
513 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
514 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
515 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
516 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
517 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
518 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
520 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
521 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
522 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
523 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
524 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
525 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
526 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
527 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
528 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
529 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
530 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
531 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
532 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
533 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
534 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
535 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
537 COMPARE_S_SIMD (a, d, c, b);
541 __kernel void m02610_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)
547 const u32 gid = get_global_id (0);
548 const u32 lid = get_local_id (0);
549 const u32 lsz = get_local_size (0);
557 w0[0] = pws[gid].i[ 0];
558 w0[1] = pws[gid].i[ 1];
559 w0[2] = pws[gid].i[ 2];
560 w0[3] = pws[gid].i[ 3];
580 w3[2] = pws[gid].i[14];
583 const u32 pw_len = pws[gid].pw_len;
589 __local u32 l_bin2asc[256];
591 for (u32 i = lid; i < 256; i += lsz)
593 const u32 i0 = (i >> 0) & 15;
594 const u32 i1 = (i >> 4) & 15;
596 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
597 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
600 barrier (CLK_LOCAL_MEM_FENCE);
602 if (gid >= gid_max) return;
608 m02610m (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);
611 __kernel void m02610_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)
617 const u32 gid = get_global_id (0);
618 const u32 lid = get_local_id (0);
619 const u32 lsz = get_local_size (0);
627 w0[0] = pws[gid].i[ 0];
628 w0[1] = pws[gid].i[ 1];
629 w0[2] = pws[gid].i[ 2];
630 w0[3] = pws[gid].i[ 3];
634 w1[0] = pws[gid].i[ 4];
635 w1[1] = pws[gid].i[ 5];
636 w1[2] = pws[gid].i[ 6];
637 w1[3] = pws[gid].i[ 7];
650 w3[2] = pws[gid].i[14];
653 const u32 pw_len = pws[gid].pw_len;
659 __local u32 l_bin2asc[256];
661 for (u32 i = lid; i < 256; i += lsz)
663 const u32 i0 = (i >> 0) & 15;
664 const u32 i1 = (i >> 4) & 15;
666 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
667 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
670 barrier (CLK_LOCAL_MEM_FENCE);
672 if (gid >= gid_max) return;
678 m02610m (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);
681 __kernel void m02610_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)
687 const u32 gid = get_global_id (0);
688 const u32 lid = get_local_id (0);
689 const u32 lsz = get_local_size (0);
697 w0[0] = pws[gid].i[ 0];
698 w0[1] = pws[gid].i[ 1];
699 w0[2] = pws[gid].i[ 2];
700 w0[3] = pws[gid].i[ 3];
704 w1[0] = pws[gid].i[ 4];
705 w1[1] = pws[gid].i[ 5];
706 w1[2] = pws[gid].i[ 6];
707 w1[3] = pws[gid].i[ 7];
711 w2[0] = pws[gid].i[ 8];
712 w2[1] = pws[gid].i[ 9];
713 w2[2] = pws[gid].i[10];
714 w2[3] = pws[gid].i[11];
718 w3[0] = pws[gid].i[12];
719 w3[1] = pws[gid].i[13];
720 w3[2] = pws[gid].i[14];
721 w3[3] = pws[gid].i[15];
723 const u32 pw_len = pws[gid].pw_len;
729 __local u32 l_bin2asc[256];
731 for (u32 i = lid; i < 256; i += lsz)
733 const u32 i0 = (i >> 0) & 15;
734 const u32 i1 = (i >> 4) & 15;
736 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
737 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
740 barrier (CLK_LOCAL_MEM_FENCE);
742 if (gid >= gid_max) return;
748 m02610m (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);
751 __kernel void m02610_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)
757 const u32 gid = get_global_id (0);
758 const u32 lid = get_local_id (0);
759 const u32 lsz = get_local_size (0);
767 w0[0] = pws[gid].i[ 0];
768 w0[1] = pws[gid].i[ 1];
769 w0[2] = pws[gid].i[ 2];
770 w0[3] = pws[gid].i[ 3];
790 w3[2] = pws[gid].i[14];
793 const u32 pw_len = pws[gid].pw_len;
799 __local u32 l_bin2asc[256];
801 for (u32 i = lid; i < 256; i += lsz)
803 const u32 i0 = (i >> 0) & 15;
804 const u32 i1 = (i >> 4) & 15;
806 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
807 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
810 barrier (CLK_LOCAL_MEM_FENCE);
812 if (gid >= gid_max) return;
818 m02610s (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);
821 __kernel void m02610_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)
827 const u32 gid = get_global_id (0);
828 const u32 lid = get_local_id (0);
829 const u32 lsz = get_local_size (0);
837 w0[0] = pws[gid].i[ 0];
838 w0[1] = pws[gid].i[ 1];
839 w0[2] = pws[gid].i[ 2];
840 w0[3] = pws[gid].i[ 3];
844 w1[0] = pws[gid].i[ 4];
845 w1[1] = pws[gid].i[ 5];
846 w1[2] = pws[gid].i[ 6];
847 w1[3] = pws[gid].i[ 7];
860 w3[2] = pws[gid].i[14];
863 const u32 pw_len = pws[gid].pw_len;
869 __local u32 l_bin2asc[256];
871 for (u32 i = lid; i < 256; i += lsz)
873 const u32 i0 = (i >> 0) & 15;
874 const u32 i1 = (i >> 4) & 15;
876 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
877 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
880 barrier (CLK_LOCAL_MEM_FENCE);
882 if (gid >= gid_max) return;
888 m02610s (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);
891 __kernel void m02610_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)
897 const u32 gid = get_global_id (0);
898 const u32 lid = get_local_id (0);
899 const u32 lsz = get_local_size (0);
907 w0[0] = pws[gid].i[ 0];
908 w0[1] = pws[gid].i[ 1];
909 w0[2] = pws[gid].i[ 2];
910 w0[3] = pws[gid].i[ 3];
914 w1[0] = pws[gid].i[ 4];
915 w1[1] = pws[gid].i[ 5];
916 w1[2] = pws[gid].i[ 6];
917 w1[3] = pws[gid].i[ 7];
921 w2[0] = pws[gid].i[ 8];
922 w2[1] = pws[gid].i[ 9];
923 w2[2] = pws[gid].i[10];
924 w2[3] = pws[gid].i[11];
928 w3[0] = pws[gid].i[12];
929 w3[1] = pws[gid].i[13];
930 w3[2] = pws[gid].i[14];
931 w3[3] = pws[gid].i[15];
933 const u32 pw_len = pws[gid].pw_len;
939 __local u32 l_bin2asc[256];
941 for (u32 i = lid; i < 256; i += lsz)
943 const u32 i0 = (i >> 0) & 15;
944 const u32 i1 = (i >> 4) & 15;
946 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
947 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
950 barrier (CLK_LOCAL_MEM_FENCE);
952 if (gid >= gid_max) return;
958 m02610s (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);