2 * Authors.....: Jens Steube <jens.steube@gmail.com>
3 * Gabriele Gristina <matrix@hashcat.net>
4 * magnum <john.magnum@hushmail.com>
13 #include "include/constants.h"
14 #include "include/kernel_vendor.h"
21 #include "include/kernel_functions.c"
22 #include "OpenCL/types_ocl.c"
23 #include "OpenCL/common.c"
24 #include "OpenCL/simd.c"
27 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
29 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
31 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
33 #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 #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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf])
38 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)
44 const u32 gid = get_global_id (0);
45 const u32 lid = get_local_id (0);
51 const u32 salt_len = salt_bufs[salt_pos].salt_len;
55 s[0] = salt_bufs[salt_pos].salt_buf[0];
56 s[1] = salt_bufs[salt_pos].salt_buf[1];
57 s[2] = salt_bufs[salt_pos].salt_buf[2];
58 s[3] = salt_bufs[salt_pos].salt_buf[3];
59 s[4] = salt_bufs[salt_pos].salt_buf[4];
60 s[5] = salt_bufs[salt_pos].salt_buf[5];
61 s[6] = (32 + salt_len) * 8;
70 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
72 const u32x w0r = w0r_create_bft (bfs_buf, il_pos);
74 const u32x w0lr = w0l | w0r;
109 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
110 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
111 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
112 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
113 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
114 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
115 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
116 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
117 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
118 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
119 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
120 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
121 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
122 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
123 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
124 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
126 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
127 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
128 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
129 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
130 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
131 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
132 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
133 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
134 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
135 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
136 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
137 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
138 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
139 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
140 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
141 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
143 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
144 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
145 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
146 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
147 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
148 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
149 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
150 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
151 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
152 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
153 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
154 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
155 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
156 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
157 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
158 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
160 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
161 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
162 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
163 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
164 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
165 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
166 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
167 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
168 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
169 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
170 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
171 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
172 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
173 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
174 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
175 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
182 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
183 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
184 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
185 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
186 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
187 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
188 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
189 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
190 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
191 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
192 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
193 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
194 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
195 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
196 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
197 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
214 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
215 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
216 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
217 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
218 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
219 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
220 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
221 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
222 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
223 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
224 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
225 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
226 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
227 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
228 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
229 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
231 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
232 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
233 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
234 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
235 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
236 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
237 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
238 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
239 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
240 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
241 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
242 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
243 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
244 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
245 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
246 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
248 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
249 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
250 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
251 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
252 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
253 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
254 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
255 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
256 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
257 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
258 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
259 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
260 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
261 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
262 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
263 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
265 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
266 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
267 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
268 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
269 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
270 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
271 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
272 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
273 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
274 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
275 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
276 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
277 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
278 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
279 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
280 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
282 COMPARE_M_SIMD (a, d, c, b);
286 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)
292 const u32 gid = get_global_id (0);
293 const u32 lid = get_local_id (0);
299 const u32 search[4] =
301 digests_buf[digests_offset].digest_buf[DGST_R0],
302 digests_buf[digests_offset].digest_buf[DGST_R1],
303 digests_buf[digests_offset].digest_buf[DGST_R2],
304 digests_buf[digests_offset].digest_buf[DGST_R3]
311 const u32 salt_len = salt_bufs[salt_pos].salt_len;
315 s[0] = salt_bufs[salt_pos].salt_buf[0];
316 s[1] = salt_bufs[salt_pos].salt_buf[1];
317 s[2] = salt_bufs[salt_pos].salt_buf[2];
318 s[3] = salt_bufs[salt_pos].salt_buf[3];
319 s[4] = salt_bufs[salt_pos].salt_buf[4];
320 s[5] = salt_bufs[salt_pos].salt_buf[5];
321 s[6] = (32 + salt_len) * 8;
330 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
332 const u32x w0r = w0r_create_bft (bfs_buf, il_pos);
334 const u32x w0lr = w0l | w0r;
369 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
370 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
371 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
372 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
373 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
374 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
375 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
376 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
377 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
378 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
379 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
380 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
381 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
382 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
383 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
384 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
386 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
387 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
388 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
389 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
390 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
391 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
392 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
393 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
394 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
395 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
396 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
397 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
398 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
399 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
400 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
401 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
403 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
404 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
405 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
406 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
407 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
408 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
409 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
410 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
411 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
412 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
413 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
414 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
415 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
416 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
417 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
418 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
420 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
421 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
422 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
423 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
424 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
425 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
426 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
427 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
428 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
429 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
430 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
431 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
432 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
433 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
434 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
435 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
442 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
443 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
444 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
445 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
446 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
447 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
448 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
449 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
450 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
451 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
452 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
453 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
454 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
455 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
456 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
457 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
474 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
475 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
476 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
477 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
478 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
479 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
480 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
481 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
482 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
483 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
484 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
485 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
486 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
487 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
488 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
489 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
491 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
492 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
493 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
494 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
495 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
496 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
497 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
498 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
499 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
500 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
501 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
502 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
503 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
504 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
505 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
506 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
508 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
509 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
510 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
511 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
512 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
513 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
514 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
515 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
516 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
517 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
518 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
519 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
520 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
521 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
522 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
523 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
525 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
526 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
527 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
528 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
529 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
530 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
531 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
532 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
533 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
534 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
535 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
536 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
537 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
538 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
539 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
540 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
542 COMPARE_S_SIMD (a, d, c, b);
546 __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)
552 const u32 gid = get_global_id (0);
553 const u32 lid = get_local_id (0);
554 const u32 lsz = get_local_size (0);
562 w0[0] = pws[gid].i[ 0];
563 w0[1] = pws[gid].i[ 1];
564 w0[2] = pws[gid].i[ 2];
565 w0[3] = pws[gid].i[ 3];
585 w3[2] = pws[gid].i[14];
588 const u32 pw_len = pws[gid].pw_len;
594 __local u32 l_bin2asc[256];
596 for (u32 i = lid; i < 256; i += lsz)
598 const u32 i0 = (i >> 0) & 15;
599 const u32 i1 = (i >> 4) & 15;
601 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
602 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
605 barrier (CLK_LOCAL_MEM_FENCE);
607 if (gid >= gid_max) return;
613 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);
616 __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)
622 const u32 gid = get_global_id (0);
623 const u32 lid = get_local_id (0);
624 const u32 lsz = get_local_size (0);
632 w0[0] = pws[gid].i[ 0];
633 w0[1] = pws[gid].i[ 1];
634 w0[2] = pws[gid].i[ 2];
635 w0[3] = pws[gid].i[ 3];
639 w1[0] = pws[gid].i[ 4];
640 w1[1] = pws[gid].i[ 5];
641 w1[2] = pws[gid].i[ 6];
642 w1[3] = pws[gid].i[ 7];
655 w3[2] = pws[gid].i[14];
658 const u32 pw_len = pws[gid].pw_len;
664 __local u32 l_bin2asc[256];
666 for (u32 i = lid; i < 256; i += lsz)
668 const u32 i0 = (i >> 0) & 15;
669 const u32 i1 = (i >> 4) & 15;
671 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
672 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
675 barrier (CLK_LOCAL_MEM_FENCE);
677 if (gid >= gid_max) return;
683 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);
686 __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)
692 const u32 gid = get_global_id (0);
693 const u32 lid = get_local_id (0);
694 const u32 lsz = get_local_size (0);
702 w0[0] = pws[gid].i[ 0];
703 w0[1] = pws[gid].i[ 1];
704 w0[2] = pws[gid].i[ 2];
705 w0[3] = pws[gid].i[ 3];
709 w1[0] = pws[gid].i[ 4];
710 w1[1] = pws[gid].i[ 5];
711 w1[2] = pws[gid].i[ 6];
712 w1[3] = pws[gid].i[ 7];
716 w2[0] = pws[gid].i[ 8];
717 w2[1] = pws[gid].i[ 9];
718 w2[2] = pws[gid].i[10];
719 w2[3] = pws[gid].i[11];
723 w3[0] = pws[gid].i[12];
724 w3[1] = pws[gid].i[13];
725 w3[2] = pws[gid].i[14];
726 w3[3] = pws[gid].i[15];
728 const u32 pw_len = pws[gid].pw_len;
734 __local u32 l_bin2asc[256];
736 for (u32 i = lid; i < 256; i += lsz)
738 const u32 i0 = (i >> 0) & 15;
739 const u32 i1 = (i >> 4) & 15;
741 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
742 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
745 barrier (CLK_LOCAL_MEM_FENCE);
747 if (gid >= gid_max) return;
753 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);
756 __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)
762 const u32 gid = get_global_id (0);
763 const u32 lid = get_local_id (0);
764 const u32 lsz = get_local_size (0);
772 w0[0] = pws[gid].i[ 0];
773 w0[1] = pws[gid].i[ 1];
774 w0[2] = pws[gid].i[ 2];
775 w0[3] = pws[gid].i[ 3];
795 w3[2] = pws[gid].i[14];
798 const u32 pw_len = pws[gid].pw_len;
804 __local u32 l_bin2asc[256];
806 for (u32 i = lid; i < 256; i += lsz)
808 const u32 i0 = (i >> 0) & 15;
809 const u32 i1 = (i >> 4) & 15;
811 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
812 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
815 barrier (CLK_LOCAL_MEM_FENCE);
817 if (gid >= gid_max) return;
823 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);
826 __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)
832 const u32 gid = get_global_id (0);
833 const u32 lid = get_local_id (0);
834 const u32 lsz = get_local_size (0);
842 w0[0] = pws[gid].i[ 0];
843 w0[1] = pws[gid].i[ 1];
844 w0[2] = pws[gid].i[ 2];
845 w0[3] = pws[gid].i[ 3];
849 w1[0] = pws[gid].i[ 4];
850 w1[1] = pws[gid].i[ 5];
851 w1[2] = pws[gid].i[ 6];
852 w1[3] = pws[gid].i[ 7];
865 w3[2] = pws[gid].i[14];
868 const u32 pw_len = pws[gid].pw_len;
874 __local u32 l_bin2asc[256];
876 for (u32 i = lid; i < 256; i += lsz)
878 const u32 i0 = (i >> 0) & 15;
879 const u32 i1 = (i >> 4) & 15;
881 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
882 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
885 barrier (CLK_LOCAL_MEM_FENCE);
887 if (gid >= gid_max) return;
893 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);
896 __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)
902 const u32 gid = get_global_id (0);
903 const u32 lid = get_local_id (0);
904 const u32 lsz = get_local_size (0);
912 w0[0] = pws[gid].i[ 0];
913 w0[1] = pws[gid].i[ 1];
914 w0[2] = pws[gid].i[ 2];
915 w0[3] = pws[gid].i[ 3];
919 w1[0] = pws[gid].i[ 4];
920 w1[1] = pws[gid].i[ 5];
921 w1[2] = pws[gid].i[ 6];
922 w1[3] = pws[gid].i[ 7];
926 w2[0] = pws[gid].i[ 8];
927 w2[1] = pws[gid].i[ 9];
928 w2[2] = pws[gid].i[10];
929 w2[3] = pws[gid].i[11];
933 w3[0] = pws[gid].i[12];
934 w3[1] = pws[gid].i[13];
935 w3[2] = pws[gid].i[14];
936 w3[3] = pws[gid].i[15];
938 const u32 pw_len = pws[gid].pw_len;
944 __local u32 l_bin2asc[256];
946 for (u32 i = lid; i < 256; i += lsz)
948 const u32 i0 = (i >> 0) & 15;
949 const u32 i1 = (i >> 4) & 15;
951 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
952 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
955 barrier (CLK_LOCAL_MEM_FENCE);
957 if (gid >= gid_max) return;
963 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);