2 * Authors.....: Jens Steube <jens.steube@gmail.com>
3 * Gabriele Gristina <matrix@hashcat.net>
12 #include "include/constants.h"
13 #include "include/kernel_vendor.h"
20 #include "include/kernel_functions.c"
21 #include "OpenCL/types_ocl.c"
22 #include "OpenCL/common.c"
23 #include "OpenCL/simd.c"
26 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
28 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
30 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
32 #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])
35 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)
41 const u32 gid = get_global_id (0);
42 const u32 lid = get_local_id (0);
48 const u32 salt_len = salt_bufs[salt_pos].salt_len;
52 s[0] = salt_bufs[salt_pos].salt_buf[0];
53 s[1] = salt_bufs[salt_pos].salt_buf[1];
54 s[2] = salt_bufs[salt_pos].salt_buf[2];
55 s[3] = salt_bufs[salt_pos].salt_buf[3];
56 s[4] = salt_bufs[salt_pos].salt_buf[4];
57 s[5] = salt_bufs[salt_pos].salt_buf[5];
58 s[6] = (32 + salt_len) * 8;
67 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
69 const u32x w0r = w0r_create_bft (bfs_buf, il_pos);
71 const u32x w0lr = w0l | w0r;
106 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
107 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
108 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
109 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
110 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
111 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
112 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
113 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
114 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
115 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
116 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
117 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
118 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
119 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
120 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
121 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
123 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
124 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
125 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
126 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
127 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
128 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
129 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
130 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
131 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
132 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
133 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
134 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
135 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
136 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
137 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
138 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
140 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
141 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
142 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
143 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
144 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
145 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
146 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
147 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
148 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
149 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
150 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
151 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
152 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
153 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
154 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
155 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
157 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
158 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
159 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
160 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
161 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
162 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
163 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
164 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
165 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
166 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
167 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
168 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
169 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
170 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
171 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
172 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
179 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
180 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
181 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
182 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
183 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
184 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
185 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
186 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
187 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
188 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
189 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
190 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
191 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
192 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
193 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
194 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
211 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
212 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
213 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
214 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
215 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
216 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
217 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
218 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
219 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
220 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
221 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
222 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
223 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
224 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
225 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
226 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
228 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
229 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
230 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
231 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
232 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
233 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
234 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
235 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
236 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
237 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
238 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
239 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
240 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
241 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
242 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
243 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
245 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
246 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
247 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
248 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
249 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
250 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
251 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
252 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
253 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
254 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
255 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
256 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
257 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
258 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
259 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
260 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
262 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
263 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
264 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
265 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
266 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
267 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
268 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
269 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
270 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
271 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
272 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
273 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
274 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
275 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
276 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
277 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
279 COMPARE_M_SIMD (a, d, c, b);
283 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)
289 const u32 gid = get_global_id (0);
290 const u32 lid = get_local_id (0);
296 const u32 search[4] =
298 digests_buf[digests_offset].digest_buf[DGST_R0],
299 digests_buf[digests_offset].digest_buf[DGST_R1],
300 digests_buf[digests_offset].digest_buf[DGST_R2],
301 digests_buf[digests_offset].digest_buf[DGST_R3]
308 const u32 salt_len = salt_bufs[salt_pos].salt_len;
312 s[0] = salt_bufs[salt_pos].salt_buf[0];
313 s[1] = salt_bufs[salt_pos].salt_buf[1];
314 s[2] = salt_bufs[salt_pos].salt_buf[2];
315 s[3] = salt_bufs[salt_pos].salt_buf[3];
316 s[4] = salt_bufs[salt_pos].salt_buf[4];
317 s[5] = salt_bufs[salt_pos].salt_buf[5];
318 s[6] = (32 + salt_len) * 8;
327 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
329 const u32x w0r = w0r_create_bft (bfs_buf, il_pos);
331 const u32x w0lr = w0l | w0r;
366 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
367 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
368 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
369 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
370 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
371 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
372 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
373 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
374 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
375 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
376 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
377 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
378 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
379 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
380 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
381 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
383 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
384 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
385 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
386 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
387 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
388 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
389 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
390 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
391 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
392 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
393 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
394 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
395 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
396 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
397 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
398 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
400 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
401 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
402 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
403 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
404 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
405 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
406 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
407 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
408 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
409 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
410 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
411 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
412 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
413 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
414 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
415 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
417 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
418 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
419 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
420 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
421 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
422 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
423 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
424 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
425 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
426 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
427 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
428 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
429 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
430 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
431 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
432 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
439 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
440 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
441 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
442 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
443 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
444 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
445 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
446 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
447 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
448 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
449 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
450 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
451 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
452 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
453 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
454 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
471 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
472 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
473 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
474 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
475 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
476 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
477 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
478 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
479 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
480 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
481 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
482 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
483 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
484 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
485 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
486 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
488 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
489 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
490 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
491 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
492 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
493 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
494 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
495 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
496 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
497 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
498 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
499 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
500 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
501 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
502 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
503 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
505 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
506 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
507 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
508 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
509 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
510 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
511 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
512 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
513 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
514 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
515 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
516 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
517 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
518 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
519 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
520 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
522 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
523 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
524 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
525 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
526 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
527 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
528 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
529 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
530 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
531 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
532 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
533 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
534 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
535 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
536 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
537 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
539 COMPARE_S_SIMD (a, d, c, b);
543 __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)
549 const u32 gid = get_global_id (0);
550 const u32 lid = get_local_id (0);
551 const u32 lsz = get_local_size (0);
559 w0[0] = pws[gid].i[ 0];
560 w0[1] = pws[gid].i[ 1];
561 w0[2] = pws[gid].i[ 2];
562 w0[3] = pws[gid].i[ 3];
582 w3[2] = pws[gid].i[14];
585 const u32 pw_len = pws[gid].pw_len;
591 __local u32 l_bin2asc[256];
593 for (u32 i = lid; i < 256; i += lsz)
595 const u32 i0 = (i >> 0) & 15;
596 const u32 i1 = (i >> 4) & 15;
598 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
599 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
602 barrier (CLK_LOCAL_MEM_FENCE);
604 if (gid >= gid_max) return;
610 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);
613 __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)
619 const u32 gid = get_global_id (0);
620 const u32 lid = get_local_id (0);
621 const u32 lsz = get_local_size (0);
629 w0[0] = pws[gid].i[ 0];
630 w0[1] = pws[gid].i[ 1];
631 w0[2] = pws[gid].i[ 2];
632 w0[3] = pws[gid].i[ 3];
636 w1[0] = pws[gid].i[ 4];
637 w1[1] = pws[gid].i[ 5];
638 w1[2] = pws[gid].i[ 6];
639 w1[3] = pws[gid].i[ 7];
652 w3[2] = pws[gid].i[14];
655 const u32 pw_len = pws[gid].pw_len;
661 __local u32 l_bin2asc[256];
663 for (u32 i = lid; i < 256; i += lsz)
665 const u32 i0 = (i >> 0) & 15;
666 const u32 i1 = (i >> 4) & 15;
668 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
669 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
672 barrier (CLK_LOCAL_MEM_FENCE);
674 if (gid >= gid_max) return;
680 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);
683 __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)
689 const u32 gid = get_global_id (0);
690 const u32 lid = get_local_id (0);
691 const u32 lsz = get_local_size (0);
699 w0[0] = pws[gid].i[ 0];
700 w0[1] = pws[gid].i[ 1];
701 w0[2] = pws[gid].i[ 2];
702 w0[3] = pws[gid].i[ 3];
706 w1[0] = pws[gid].i[ 4];
707 w1[1] = pws[gid].i[ 5];
708 w1[2] = pws[gid].i[ 6];
709 w1[3] = pws[gid].i[ 7];
713 w2[0] = pws[gid].i[ 8];
714 w2[1] = pws[gid].i[ 9];
715 w2[2] = pws[gid].i[10];
716 w2[3] = pws[gid].i[11];
720 w3[0] = pws[gid].i[12];
721 w3[1] = pws[gid].i[13];
722 w3[2] = pws[gid].i[14];
723 w3[3] = pws[gid].i[15];
725 const u32 pw_len = pws[gid].pw_len;
731 __local u32 l_bin2asc[256];
733 for (u32 i = lid; i < 256; i += lsz)
735 const u32 i0 = (i >> 0) & 15;
736 const u32 i1 = (i >> 4) & 15;
738 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
739 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
742 barrier (CLK_LOCAL_MEM_FENCE);
744 if (gid >= gid_max) return;
750 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);
753 __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)
759 const u32 gid = get_global_id (0);
760 const u32 lid = get_local_id (0);
761 const u32 lsz = get_local_size (0);
769 w0[0] = pws[gid].i[ 0];
770 w0[1] = pws[gid].i[ 1];
771 w0[2] = pws[gid].i[ 2];
772 w0[3] = pws[gid].i[ 3];
792 w3[2] = pws[gid].i[14];
795 const u32 pw_len = pws[gid].pw_len;
801 __local u32 l_bin2asc[256];
803 for (u32 i = lid; i < 256; i += lsz)
805 const u32 i0 = (i >> 0) & 15;
806 const u32 i1 = (i >> 4) & 15;
808 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
809 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
812 barrier (CLK_LOCAL_MEM_FENCE);
814 if (gid >= gid_max) return;
820 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);
823 __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)
829 const u32 gid = get_global_id (0);
830 const u32 lid = get_local_id (0);
831 const u32 lsz = get_local_size (0);
839 w0[0] = pws[gid].i[ 0];
840 w0[1] = pws[gid].i[ 1];
841 w0[2] = pws[gid].i[ 2];
842 w0[3] = pws[gid].i[ 3];
846 w1[0] = pws[gid].i[ 4];
847 w1[1] = pws[gid].i[ 5];
848 w1[2] = pws[gid].i[ 6];
849 w1[3] = pws[gid].i[ 7];
862 w3[2] = pws[gid].i[14];
865 const u32 pw_len = pws[gid].pw_len;
871 __local u32 l_bin2asc[256];
873 for (u32 i = lid; i < 256; i += lsz)
875 const u32 i0 = (i >> 0) & 15;
876 const u32 i1 = (i >> 4) & 15;
878 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
879 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
882 barrier (CLK_LOCAL_MEM_FENCE);
884 if (gid >= gid_max) return;
890 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);
893 __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)
899 const u32 gid = get_global_id (0);
900 const u32 lid = get_local_id (0);
901 const u32 lsz = get_local_size (0);
909 w0[0] = pws[gid].i[ 0];
910 w0[1] = pws[gid].i[ 1];
911 w0[2] = pws[gid].i[ 2];
912 w0[3] = pws[gid].i[ 3];
916 w1[0] = pws[gid].i[ 4];
917 w1[1] = pws[gid].i[ 5];
918 w1[2] = pws[gid].i[ 6];
919 w1[3] = pws[gid].i[ 7];
923 w2[0] = pws[gid].i[ 8];
924 w2[1] = pws[gid].i[ 9];
925 w2[2] = pws[gid].i[10];
926 w2[3] = pws[gid].i[11];
930 w3[0] = pws[gid].i[12];
931 w3[1] = pws[gid].i[13];
932 w3[2] = pws[gid].i[14];
933 w3[3] = pws[gid].i[15];
935 const u32 pw_len = pws[gid].pw_len;
941 __local u32 l_bin2asc[256];
943 for (u32 i = lid; i < 256; i += lsz)
945 const u32 i0 = (i >> 0) & 15;
946 const u32 i1 = (i >> 4) & 15;
948 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
949 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
952 barrier (CLK_LOCAL_MEM_FENCE);
954 if (gid >= gid_max) return;
960 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);