2 * Author......: Jens Steube <jens.steube@gmail.com>
10 #include "include/constants.h"
11 #include "include/kernel_vendor.h"
18 #include "include/kernel_functions.c"
19 #include "OpenCL/types_ocl.c"
20 #include "OpenCL/common.c"
21 #include "OpenCL/simd.c"
23 __constant u32 k_sha256[64] =
25 SHA256C00, SHA256C01, SHA256C02, SHA256C03,
26 SHA256C04, SHA256C05, SHA256C06, SHA256C07,
27 SHA256C08, SHA256C09, SHA256C0a, SHA256C0b,
28 SHA256C0c, SHA256C0d, SHA256C0e, SHA256C0f,
29 SHA256C10, SHA256C11, SHA256C12, SHA256C13,
30 SHA256C14, SHA256C15, SHA256C16, SHA256C17,
31 SHA256C18, SHA256C19, SHA256C1a, SHA256C1b,
32 SHA256C1c, SHA256C1d, SHA256C1e, SHA256C1f,
33 SHA256C20, SHA256C21, SHA256C22, SHA256C23,
34 SHA256C24, SHA256C25, SHA256C26, SHA256C27,
35 SHA256C28, SHA256C29, SHA256C2a, SHA256C2b,
36 SHA256C2c, SHA256C2d, SHA256C2e, SHA256C2f,
37 SHA256C30, SHA256C31, SHA256C32, SHA256C33,
38 SHA256C34, SHA256C35, SHA256C36, SHA256C37,
39 SHA256C38, SHA256C39, SHA256C3a, SHA256C3b,
40 SHA256C3c, SHA256C3d, SHA256C3e, SHA256C3f,
43 #define SHA256_S0_S(x) (rotl32_S ((x), 25u) ^ rotl32_S ((x), 14u) ^ SHIFT_RIGHT_32 ((x), 3u))
44 #define SHA256_S1_S(x) (rotl32_S ((x), 15u) ^ rotl32_S ((x), 13u) ^ SHIFT_RIGHT_32 ((x), 10u))
46 #define SHA256_EXPAND_S(x,y,z,w) (SHA256_S1_S (x) + y + SHA256_S0_S (z) + w)
48 static void sha256_transform (u32x digest[8], const u32x w[16])
76 #define ROUND_EXPAND() \
78 w0_t = SHA256_EXPAND (we_t, w9_t, w1_t, w0_t); \
79 w1_t = SHA256_EXPAND (wf_t, wa_t, w2_t, w1_t); \
80 w2_t = SHA256_EXPAND (w0_t, wb_t, w3_t, w2_t); \
81 w3_t = SHA256_EXPAND (w1_t, wc_t, w4_t, w3_t); \
82 w4_t = SHA256_EXPAND (w2_t, wd_t, w5_t, w4_t); \
83 w5_t = SHA256_EXPAND (w3_t, we_t, w6_t, w5_t); \
84 w6_t = SHA256_EXPAND (w4_t, wf_t, w7_t, w6_t); \
85 w7_t = SHA256_EXPAND (w5_t, w0_t, w8_t, w7_t); \
86 w8_t = SHA256_EXPAND (w6_t, w1_t, w9_t, w8_t); \
87 w9_t = SHA256_EXPAND (w7_t, w2_t, wa_t, w9_t); \
88 wa_t = SHA256_EXPAND (w8_t, w3_t, wb_t, wa_t); \
89 wb_t = SHA256_EXPAND (w9_t, w4_t, wc_t, wb_t); \
90 wc_t = SHA256_EXPAND (wa_t, w5_t, wd_t, wc_t); \
91 wd_t = SHA256_EXPAND (wb_t, w6_t, we_t, wd_t); \
92 we_t = SHA256_EXPAND (wc_t, w7_t, wf_t, we_t); \
93 wf_t = SHA256_EXPAND (wd_t, w8_t, w0_t, wf_t); \
96 #define ROUND_STEP(i) \
98 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, k_sha256[i + 0]); \
99 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, k_sha256[i + 1]); \
100 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, k_sha256[i + 2]); \
101 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, k_sha256[i + 3]); \
102 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, k_sha256[i + 4]); \
103 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, k_sha256[i + 5]); \
104 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, k_sha256[i + 6]); \
105 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, k_sha256[i + 7]); \
106 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, k_sha256[i + 8]); \
107 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, k_sha256[i + 9]); \
108 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, k_sha256[i + 10]); \
109 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, k_sha256[i + 11]); \
110 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, k_sha256[i + 12]); \
111 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, k_sha256[i + 13]); \
112 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, k_sha256[i + 14]); \
113 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, k_sha256[i + 15]); \
119 for (int i = 16; i < 64; i += 16)
121 ROUND_EXPAND (); ROUND_STEP (i);
134 static void sha256_transform_z (u32x digest[8])
145 #define ROUND_STEP_Z(i) \
147 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, 0, k_sha256[i + 0]); \
148 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, 0, k_sha256[i + 1]); \
149 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, 0, k_sha256[i + 2]); \
150 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, 0, k_sha256[i + 3]); \
151 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, 0, k_sha256[i + 4]); \
152 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, 0, k_sha256[i + 5]); \
153 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, 0, k_sha256[i + 6]); \
154 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, 0, k_sha256[i + 7]); \
155 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, 0, k_sha256[i + 8]); \
156 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, 0, k_sha256[i + 9]); \
157 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, 0, k_sha256[i + 10]); \
158 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, 0, k_sha256[i + 11]); \
159 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, 0, k_sha256[i + 12]); \
160 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, 0, k_sha256[i + 13]); \
161 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, 0, k_sha256[i + 14]); \
162 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, 0, k_sha256[i + 15]); \
168 for (int i = 16; i < 64; i += 16)
183 static void sha256_transform_s (u32x digest[8], __local u32 w[64])
194 #define ROUND_STEP_S(i) \
196 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w[i + 0], k_sha256[i + 0]); \
197 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w[i + 1], k_sha256[i + 1]); \
198 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w[i + 2], k_sha256[i + 2]); \
199 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w[i + 3], k_sha256[i + 3]); \
200 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w[i + 4], k_sha256[i + 4]); \
201 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w[i + 5], k_sha256[i + 5]); \
202 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w[i + 6], k_sha256[i + 6]); \
203 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w[i + 7], k_sha256[i + 7]); \
204 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w[i + 8], k_sha256[i + 8]); \
205 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w[i + 9], k_sha256[i + 9]); \
206 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w[i + 10], k_sha256[i + 10]); \
207 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w[i + 11], k_sha256[i + 11]); \
208 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w[i + 12], k_sha256[i + 12]); \
209 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w[i + 13], k_sha256[i + 13]); \
210 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w[i + 14], k_sha256[i + 14]); \
211 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w[i + 15], k_sha256[i + 15]); \
217 for (int i = 16; i < 64; i += 16)
232 static void m08000m (__local u32 w_s1[64], __local u32 w_s2[64], u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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 gid_max)
238 const u32 gid = get_global_id (0);
239 const u32 lid = get_local_id (0);
240 const u32 lsz = get_local_size (0);
246 const u32 salt_buf0 = swap32_S (salt_bufs[salt_pos].salt_buf[ 0]);
247 const u32 salt_buf1 = swap32_S (salt_bufs[salt_pos].salt_buf[ 1]);
248 const u32 salt_buf2 = swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); // 0x80
251 * precompute final msg blocks
254 for (u32 i = lid; i < 64; i += lsz)
260 barrier (CLK_LOCAL_MEM_FENCE);
264 w_s1[15] = 0 | salt_buf0 >> 16;
267 for (int i = 16; i < 64; i++)
269 w_s1[i] = SHA256_EXPAND_S (w_s1[i - 2], w_s1[i - 7], w_s1[i - 15], w_s1[i - 16]);
272 w_s2[ 0] = salt_buf0 << 16 | salt_buf1 >> 16;
273 w_s2[ 1] = salt_buf1 << 16 | salt_buf2 >> 16;
274 w_s2[ 2] = salt_buf2 << 16 | 0;
275 w_s2[15] = (510 + 8) * 8;
278 for (int i = 16; i < 64; i++)
280 w_s2[i] = SHA256_EXPAND_S (w_s2[i - 2], w_s2[i - 7], w_s2[i - 15], w_s2[i - 16]);
284 barrier (CLK_LOCAL_MEM_FENCE);
286 if (gid >= gid_max) return;
294 w_t[ 0] = w[ 0] >> 8;
295 w_t[ 1] = w[ 1] >> 8;
296 w_t[ 2] = w[ 2] >> 8;
297 w_t[ 3] = w[ 3] >> 8;
298 w_t[ 4] = w[ 4] >> 8;
299 w_t[ 5] = w[ 5] >> 8;
300 w_t[ 6] = w[ 6] >> 8;
301 w_t[ 7] = w[ 7] >> 8;
302 w_t[ 8] = w[ 8] >> 8;
303 w_t[ 9] = w[ 9] >> 8;
304 w_t[10] = w[10] >> 8;
305 w_t[11] = w[11] >> 8;
306 w_t[12] = w[12] >> 8;
307 w_t[13] = w[13] >> 8;
308 w_t[14] = w[14] >> 8;
309 w_t[15] = w[15] >> 8;
317 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
319 const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
321 const u32x w0lr = w0l | w0r;
327 digest[0] = SHA256M_A;
328 digest[1] = SHA256M_B;
329 digest[2] = SHA256M_C;
330 digest[3] = SHA256M_D;
331 digest[4] = SHA256M_E;
332 digest[5] = SHA256M_F;
333 digest[6] = SHA256M_G;
334 digest[7] = SHA256M_H;
336 sha256_transform (digest, w_t); // 0 - 64
337 sha256_transform_z (digest); // 64 - 128
338 sha256_transform_z (digest); // 128 - 192
339 sha256_transform_z (digest); // 192 - 256
340 sha256_transform_z (digest); // 256 - 320
341 sha256_transform_z (digest); // 320 - 384
342 sha256_transform_z (digest); // 384 - 448
343 sha256_transform_s (digest, w_s1); // 448 - 512
344 sha256_transform_s (digest, w_s2); // 512 - 576
346 COMPARE_M_SIMD (digest[3], digest[7], digest[2], digest[6]);
350 static void m08000s (__local u32 w_s1[64], __local u32 w_s2[64], u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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 gid_max)
356 const u32 gid = get_global_id (0);
357 const u32 lid = get_local_id (0);
358 const u32 lsz = get_local_size (0);
364 const u32 salt_buf0 = swap32_S (salt_bufs[salt_pos].salt_buf[ 0]);
365 const u32 salt_buf1 = swap32_S (salt_bufs[salt_pos].salt_buf[ 1]);
366 const u32 salt_buf2 = swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); // 0x80
369 * precompute final msg blocks
372 for (u32 i = lid; i < 64; i += lsz)
378 barrier (CLK_LOCAL_MEM_FENCE);
382 w_s1[15] = 0 | salt_buf0 >> 16;
385 for (int i = 16; i < 64; i++)
387 w_s1[i] = SHA256_EXPAND_S (w_s1[i - 2], w_s1[i - 7], w_s1[i - 15], w_s1[i - 16]);
390 w_s2[ 0] = salt_buf0 << 16 | salt_buf1 >> 16;
391 w_s2[ 1] = salt_buf1 << 16 | salt_buf2 >> 16;
392 w_s2[ 2] = salt_buf2 << 16 | 0;
393 w_s2[15] = (510 + 8) * 8;
396 for (int i = 16; i < 64; i++)
398 w_s2[i] = SHA256_EXPAND_S (w_s2[i - 2], w_s2[i - 7], w_s2[i - 15], w_s2[i - 16]);
402 barrier (CLK_LOCAL_MEM_FENCE);
404 if (gid >= gid_max) return;
412 w_t[ 0] = w[ 0] >> 8;
413 w_t[ 1] = w[ 1] >> 8;
414 w_t[ 2] = w[ 2] >> 8;
415 w_t[ 3] = w[ 3] >> 8;
416 w_t[ 4] = w[ 4] >> 8;
417 w_t[ 5] = w[ 5] >> 8;
418 w_t[ 6] = w[ 6] >> 8;
419 w_t[ 7] = w[ 7] >> 8;
420 w_t[ 8] = w[ 8] >> 8;
421 w_t[ 9] = w[ 9] >> 8;
422 w_t[10] = w[10] >> 8;
423 w_t[11] = w[11] >> 8;
424 w_t[12] = w[12] >> 8;
425 w_t[13] = w[13] >> 8;
426 w_t[14] = w[14] >> 8;
427 w_t[15] = w[15] >> 8;
433 const u32 search[4] =
435 digests_buf[digests_offset].digest_buf[DGST_R0],
436 digests_buf[digests_offset].digest_buf[DGST_R1],
437 digests_buf[digests_offset].digest_buf[DGST_R2],
438 digests_buf[digests_offset].digest_buf[DGST_R3]
447 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
449 const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
451 const u32x w0lr = w0l | w0r;
457 digest[0] = SHA256M_A;
458 digest[1] = SHA256M_B;
459 digest[2] = SHA256M_C;
460 digest[3] = SHA256M_D;
461 digest[4] = SHA256M_E;
462 digest[5] = SHA256M_F;
463 digest[6] = SHA256M_G;
464 digest[7] = SHA256M_H;
466 sha256_transform (digest, w_t); // 0 - 64
467 sha256_transform_z (digest); // 64 - 128
468 sha256_transform_z (digest); // 128 - 192
469 sha256_transform_z (digest); // 192 - 256
470 sha256_transform_z (digest); // 256 - 320
471 sha256_transform_z (digest); // 320 - 384
472 sha256_transform_z (digest); // 384 - 448
473 sha256_transform_s (digest, w_s1); // 448 - 512
474 sha256_transform_s (digest, w_s2); // 512 - 576
476 COMPARE_S_SIMD (digest[3], digest[7], digest[2], digest[6]);
480 __kernel void m08000_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
486 const u32 gid = get_global_id (0);
490 w[ 0] = pws[gid].i[ 0];
491 w[ 1] = pws[gid].i[ 1];
492 w[ 2] = pws[gid].i[ 2];
493 w[ 3] = pws[gid].i[ 3];
507 const u32 pw_len = pws[gid].pw_len;
509 __local u32 w_s1[64];
510 __local u32 w_s2[64];
516 m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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, gid_max);
519 __kernel void m08000_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
525 const u32 gid = get_global_id (0);
529 w[ 0] = pws[gid].i[ 0];
530 w[ 1] = pws[gid].i[ 1];
531 w[ 2] = pws[gid].i[ 2];
532 w[ 3] = pws[gid].i[ 3];
533 w[ 4] = pws[gid].i[ 4];
534 w[ 5] = pws[gid].i[ 5];
535 w[ 6] = pws[gid].i[ 6];
536 w[ 7] = pws[gid].i[ 7];
546 const u32 pw_len = pws[gid].pw_len;
548 __local u32 w_s1[64];
549 __local u32 w_s2[64];
555 m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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, gid_max);
558 __kernel void m08000_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
564 const u32 gid = get_global_id (0);
568 w[ 0] = pws[gid].i[ 0];
569 w[ 1] = pws[gid].i[ 1];
570 w[ 2] = pws[gid].i[ 2];
571 w[ 3] = pws[gid].i[ 3];
572 w[ 4] = pws[gid].i[ 4];
573 w[ 5] = pws[gid].i[ 5];
574 w[ 6] = pws[gid].i[ 6];
575 w[ 7] = pws[gid].i[ 7];
576 w[ 8] = pws[gid].i[ 8];
577 w[ 9] = pws[gid].i[ 9];
578 w[10] = pws[gid].i[10];
579 w[11] = pws[gid].i[11];
580 w[12] = pws[gid].i[12];
581 w[13] = pws[gid].i[13];
582 w[14] = pws[gid].i[14];
583 w[15] = pws[gid].i[15];
585 const u32 pw_len = pws[gid].pw_len;
587 __local u32 w_s1[64];
588 __local u32 w_s2[64];
594 m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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, gid_max);
597 __kernel void m08000_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
603 const u32 gid = get_global_id (0);
607 w[ 0] = pws[gid].i[ 0];
608 w[ 1] = pws[gid].i[ 1];
609 w[ 2] = pws[gid].i[ 2];
610 w[ 3] = pws[gid].i[ 3];
624 const u32 pw_len = pws[gid].pw_len;
626 __local u32 w_s1[64];
627 __local u32 w_s2[64];
633 m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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, gid_max);
636 __kernel void m08000_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
642 const u32 gid = get_global_id (0);
646 w[ 0] = pws[gid].i[ 0];
647 w[ 1] = pws[gid].i[ 1];
648 w[ 2] = pws[gid].i[ 2];
649 w[ 3] = pws[gid].i[ 3];
650 w[ 4] = pws[gid].i[ 4];
651 w[ 5] = pws[gid].i[ 5];
652 w[ 6] = pws[gid].i[ 6];
653 w[ 7] = pws[gid].i[ 7];
663 const u32 pw_len = pws[gid].pw_len;
665 __local u32 w_s1[64];
666 __local u32 w_s2[64];
672 m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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, gid_max);
675 __kernel void m08000_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
681 const u32 gid = get_global_id (0);
685 w[ 0] = pws[gid].i[ 0];
686 w[ 1] = pws[gid].i[ 1];
687 w[ 2] = pws[gid].i[ 2];
688 w[ 3] = pws[gid].i[ 3];
689 w[ 4] = pws[gid].i[ 4];
690 w[ 5] = pws[gid].i[ 5];
691 w[ 6] = pws[gid].i[ 6];
692 w[ 7] = pws[gid].i[ 7];
693 w[ 8] = pws[gid].i[ 8];
694 w[ 9] = pws[gid].i[ 9];
695 w[10] = pws[gid].i[10];
696 w[11] = pws[gid].i[11];
697 w[12] = pws[gid].i[12];
698 w[13] = pws[gid].i[13];
699 w[14] = pws[gid].i[14];
700 w[15] = pws[gid].i[15];
702 const u32 pw_len = pws[gid].pw_len;
704 __local u32 w_s1[64];
705 __local u32 w_s2[64];
711 m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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, gid_max);