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 m11100m (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 il_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);
53 challenge = salt_bufs[salt_pos].salt_buf[0];
62 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug, see challenge
63 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
64 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
65 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
66 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
67 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
68 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
69 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
71 const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
95 switch_buffer_by_offset_le_S (s0, s1, s2, s3, pw_len);
97 const u32 pw_salt_len = pw_len + salt_len;
113 w3[2] = pw_salt_len * 8;
122 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
124 const u32x w0r = ix_create_bft (bfs_buf, il_pos);
126 const u32x w0lr = w0l | w0r;
159 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
160 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
161 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
162 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
163 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
164 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
165 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
166 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
167 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
168 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
169 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
170 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
171 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
172 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
173 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
174 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
176 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
177 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
178 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
179 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
180 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
181 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
182 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
183 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
184 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
185 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
186 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
187 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
188 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
189 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
190 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
191 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
193 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
194 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
195 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
196 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
197 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
198 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
199 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
200 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
201 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
202 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
203 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
204 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
205 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
206 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
207 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
208 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
210 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
211 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
212 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
213 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
214 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
215 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
216 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
217 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
218 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
219 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
220 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
221 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
222 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
223 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
224 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
225 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
232 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
233 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
234 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
235 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
236 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
237 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
238 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
239 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
240 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
241 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
242 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
243 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
244 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
245 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
246 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
247 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
249 // add the 4 byte challenge here
252 w2_t[1] = 0x00000080;
257 w3_t[2] = (32 + 4) * 8;
261 * md5 ($hash.$challenge)
269 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
270 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
271 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
272 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
273 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
274 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
275 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
276 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
277 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
278 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
279 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
280 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
281 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
282 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
283 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
284 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
286 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
287 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
288 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
289 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
290 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
291 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
292 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
293 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
294 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
295 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
296 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
297 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
298 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
299 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
300 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
301 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
303 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
304 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
305 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
306 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
307 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
308 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
309 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
310 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
311 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
312 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
313 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
314 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
315 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
316 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
317 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
318 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
320 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
321 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
322 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
323 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
324 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
325 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
326 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
327 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
328 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
329 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
330 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
331 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
332 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
333 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
334 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
335 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
337 COMPARE_M_SIMD (a, d, c, b);
341 static void m11100s (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 il_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 *l_bin2asc)
347 const u32 gid = get_global_id (0);
348 const u32 lid = get_local_id (0);
356 challenge = salt_bufs[salt_pos].salt_buf[0];
365 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug, see challenge
366 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
367 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
368 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
369 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
370 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
371 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
372 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
374 const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
381 s0[0] = salt_buf0[0];
382 s0[1] = salt_buf0[1];
383 s0[2] = salt_buf0[2];
384 s0[3] = salt_buf0[3];
385 s1[0] = salt_buf1[0];
386 s1[1] = salt_buf1[1];
387 s1[2] = salt_buf1[2];
388 s1[3] = salt_buf1[3];
398 switch_buffer_by_offset_le_S (s0, s1, s2, s3, pw_len);
400 const u32 pw_salt_len = pw_len + salt_len;
416 w3[2] = pw_salt_len * 8;
423 const u32 search[4] =
425 digests_buf[digests_offset].digest_buf[DGST_R0],
426 digests_buf[digests_offset].digest_buf[DGST_R1],
427 digests_buf[digests_offset].digest_buf[DGST_R2],
428 digests_buf[digests_offset].digest_buf[DGST_R3]
437 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
439 const u32x w0r = ix_create_bft (bfs_buf, il_pos);
441 const u32x w0lr = w0l | w0r;
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);
547 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
548 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
549 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
550 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
551 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
552 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
553 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
554 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
555 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
556 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
557 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
558 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
559 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
560 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
561 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
562 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
564 // add the 4 byte challenge here
567 w2_t[1] = 0x00000080;
572 w3_t[2] = (32 + 4) * 8;
576 * md5 ($hash.$challenge)
584 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
585 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
586 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
587 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
588 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
589 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
590 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
591 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
592 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
593 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
594 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
595 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
596 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
597 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
598 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
599 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
601 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
602 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
603 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
604 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
605 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
606 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
607 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
608 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
609 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
610 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
611 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
612 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
613 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
614 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
615 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
616 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
618 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
619 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
620 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
621 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
622 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
623 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
624 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
625 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
626 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
627 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
628 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
629 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
630 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
631 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
632 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
633 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
635 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
636 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
637 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
638 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
639 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
640 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
641 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
642 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
643 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
644 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
645 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
646 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
647 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
649 if (MATCHES_NONE_VS (a, search[0])) continue;
651 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
652 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
653 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
655 COMPARE_S_SIMD (a, d, c, b);
659 __kernel void m11100_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
665 const u32 gid = get_global_id (0);
666 const u32 lid = get_local_id (0);
667 const u32 lsz = get_local_size (0);
673 __local u32 l_bin2asc[256];
675 for (u32 i = lid; i < 256; i += lsz)
677 const u32 i0 = (i >> 0) & 15;
678 const u32 i1 = (i >> 4) & 15;
680 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
681 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
684 barrier (CLK_LOCAL_MEM_FENCE);
686 if (gid >= gid_max) return;
694 w0[0] = pws[gid].i[ 0];
695 w0[1] = pws[gid].i[ 1];
696 w0[2] = pws[gid].i[ 2];
697 w0[3] = pws[gid].i[ 3];
717 w3[2] = pws[gid].i[14];
720 const u32 pw_len = pws[gid].pw_len;
726 m11100m (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, il_cnt, digests_cnt, digests_offset, l_bin2asc);
729 __kernel void m11100_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
735 const u32 gid = get_global_id (0);
736 const u32 lid = get_local_id (0);
737 const u32 lsz = get_local_size (0);
743 __local u32 l_bin2asc[256];
745 for (u32 i = lid; i < 256; i += lsz)
747 const u32 i0 = (i >> 0) & 15;
748 const u32 i1 = (i >> 4) & 15;
750 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
751 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
754 barrier (CLK_LOCAL_MEM_FENCE);
756 if (gid >= gid_max) return;
764 w0[0] = pws[gid].i[ 0];
765 w0[1] = pws[gid].i[ 1];
766 w0[2] = pws[gid].i[ 2];
767 w0[3] = pws[gid].i[ 3];
771 w1[0] = pws[gid].i[ 4];
772 w1[1] = pws[gid].i[ 5];
773 w1[2] = pws[gid].i[ 6];
774 w1[3] = pws[gid].i[ 7];
787 w3[2] = pws[gid].i[14];
790 const u32 pw_len = pws[gid].pw_len;
796 m11100m (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, il_cnt, digests_cnt, digests_offset, l_bin2asc);
799 __kernel void m11100_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
805 const u32 gid = get_global_id (0);
806 const u32 lid = get_local_id (0);
807 const u32 lsz = get_local_size (0);
813 __local u32 l_bin2asc[256];
815 for (u32 i = lid; i < 256; i += lsz)
817 const u32 i0 = (i >> 0) & 15;
818 const u32 i1 = (i >> 4) & 15;
820 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
821 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
824 barrier (CLK_LOCAL_MEM_FENCE);
826 if (gid >= gid_max) return;
834 w0[0] = pws[gid].i[ 0];
835 w0[1] = pws[gid].i[ 1];
836 w0[2] = pws[gid].i[ 2];
837 w0[3] = pws[gid].i[ 3];
841 w1[0] = pws[gid].i[ 4];
842 w1[1] = pws[gid].i[ 5];
843 w1[2] = pws[gid].i[ 6];
844 w1[3] = pws[gid].i[ 7];
848 w2[0] = pws[gid].i[ 8];
849 w2[1] = pws[gid].i[ 9];
850 w2[2] = pws[gid].i[10];
851 w2[3] = pws[gid].i[11];
855 w3[0] = pws[gid].i[12];
856 w3[1] = pws[gid].i[13];
857 w3[2] = pws[gid].i[14];
858 w3[3] = pws[gid].i[15];
860 const u32 pw_len = pws[gid].pw_len;
866 m11100m (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, il_cnt, digests_cnt, digests_offset, l_bin2asc);
869 __kernel void m11100_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
875 const u32 gid = get_global_id (0);
876 const u32 lid = get_local_id (0);
877 const u32 lsz = get_local_size (0);
883 __local u32 l_bin2asc[256];
885 for (u32 i = lid; i < 256; i += lsz)
887 const u32 i0 = (i >> 0) & 15;
888 const u32 i1 = (i >> 4) & 15;
890 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
891 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
894 barrier (CLK_LOCAL_MEM_FENCE);
896 if (gid >= gid_max) return;
904 w0[0] = pws[gid].i[ 0];
905 w0[1] = pws[gid].i[ 1];
906 w0[2] = pws[gid].i[ 2];
907 w0[3] = pws[gid].i[ 3];
927 w3[2] = pws[gid].i[14];
930 const u32 pw_len = pws[gid].pw_len;
936 m11100s (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, il_cnt, digests_cnt, digests_offset, l_bin2asc);
939 __kernel void m11100_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
945 const u32 gid = get_global_id (0);
946 const u32 lid = get_local_id (0);
947 const u32 lsz = get_local_size (0);
953 __local u32 l_bin2asc[256];
955 for (u32 i = lid; i < 256; i += lsz)
957 const u32 i0 = (i >> 0) & 15;
958 const u32 i1 = (i >> 4) & 15;
960 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
961 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
964 barrier (CLK_LOCAL_MEM_FENCE);
966 if (gid >= gid_max) return;
974 w0[0] = pws[gid].i[ 0];
975 w0[1] = pws[gid].i[ 1];
976 w0[2] = pws[gid].i[ 2];
977 w0[3] = pws[gid].i[ 3];
981 w1[0] = pws[gid].i[ 4];
982 w1[1] = pws[gid].i[ 5];
983 w1[2] = pws[gid].i[ 6];
984 w1[3] = pws[gid].i[ 7];
997 w3[2] = pws[gid].i[14];
1000 const u32 pw_len = pws[gid].pw_len;
1006 m11100s (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, il_cnt, digests_cnt, digests_offset, l_bin2asc);
1009 __kernel void m11100_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
1015 const u32 gid = get_global_id (0);
1016 const u32 lid = get_local_id (0);
1017 const u32 lsz = get_local_size (0);
1023 __local u32 l_bin2asc[256];
1025 for (u32 i = lid; i < 256; i += lsz)
1027 const u32 i0 = (i >> 0) & 15;
1028 const u32 i1 = (i >> 4) & 15;
1030 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
1031 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
1034 barrier (CLK_LOCAL_MEM_FENCE);
1036 if (gid >= gid_max) return;
1044 w0[0] = pws[gid].i[ 0];
1045 w0[1] = pws[gid].i[ 1];
1046 w0[2] = pws[gid].i[ 2];
1047 w0[3] = pws[gid].i[ 3];
1051 w1[0] = pws[gid].i[ 4];
1052 w1[1] = pws[gid].i[ 5];
1053 w1[2] = pws[gid].i[ 6];
1054 w1[3] = pws[gid].i[ 7];
1058 w2[0] = pws[gid].i[ 8];
1059 w2[1] = pws[gid].i[ 9];
1060 w2[2] = pws[gid].i[10];
1061 w2[3] = pws[gid].i[11];
1065 w3[0] = pws[gid].i[12];
1066 w3[1] = pws[gid].i[13];
1067 w3[2] = pws[gid].i[14];
1068 w3[3] = pws[gid].i[15];
1070 const u32 pw_len = pws[gid].pw_len;
1076 m11100s (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, il_cnt, digests_cnt, digests_offset, l_bin2asc);