2 * Author......: Jens Steube <jens.steube@gmail.com>
10 #include "inc_vendor.cl"
11 #include "inc_hash_constants.h"
12 #include "inc_hash_functions.cl"
13 #include "inc_types.cl"
14 #include "inc_common.cl"
15 #include "inc_simd.cl"
17 void m04900m (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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
23 const u32 gid = get_global_id (0);
24 const u32 lid = get_local_id (0);
35 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
36 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
37 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
38 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
39 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
40 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
41 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
42 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
43 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
44 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
45 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
46 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
47 salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
48 salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
49 salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14];
50 salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15];
57 salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0];
58 salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1];
59 salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2];
60 salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3];
61 salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4];
62 salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5];
63 salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6];
64 salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7];
65 salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8];
66 salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9];
67 salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10];
68 salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11];
69 salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12];
70 salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13];
71 salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14];
72 salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15];
74 const u32 salt_len = salt_bufs[salt_pos].salt_len;
76 const u32 pw_salt_len = pw_len + salt_len;
78 const u32 salt_pw_salt_len = salt_len + pw_len + salt_len;
80 switch_buffer_by_offset_le_S (salt_buf0_t, salt_buf1_t, salt_buf2_t, salt_buf3_t, pw_salt_len);
82 salt_buf0[0] |= salt_buf0_t[0];
83 salt_buf0[1] |= salt_buf0_t[1];
84 salt_buf0[2] |= salt_buf0_t[2];
85 salt_buf0[3] |= salt_buf0_t[3];
86 salt_buf1[0] |= salt_buf1_t[0];
87 salt_buf1[1] |= salt_buf1_t[1];
88 salt_buf1[2] |= salt_buf1_t[2];
89 salt_buf1[3] |= salt_buf1_t[3];
90 salt_buf2[0] |= salt_buf2_t[0];
91 salt_buf2[1] |= salt_buf2_t[1];
92 salt_buf2[2] |= salt_buf2_t[2];
93 salt_buf2[3] |= salt_buf2_t[3];
94 salt_buf3[0] |= salt_buf3_t[0];
95 salt_buf3[1] |= salt_buf3_t[1];
96 salt_buf3[2] |= salt_buf3_t[2];
97 salt_buf3[3] |= salt_buf3_t[3];
99 append_0x80_4x4_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, salt_pw_salt_len);
107 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
109 const u32x w0r = ix_create_bft (bfs_buf, il_pos);
111 const u32x w0lr = w0l | w0r;
136 * put the password after the first salt but before the second salt
139 switch_buffer_by_offset_le (t0, t1, t2, t3, salt_len);
141 t0[0] |= salt_buf0[0];
142 t0[1] |= salt_buf0[1];
143 t0[2] |= salt_buf0[2];
144 t0[3] |= salt_buf0[3];
145 t1[0] |= salt_buf1[0];
146 t1[1] |= salt_buf1[1];
147 t1[2] |= salt_buf1[2];
148 t1[3] |= salt_buf1[3];
149 t2[0] |= salt_buf2[0];
150 t2[1] |= salt_buf2[1];
151 t2[2] |= salt_buf2[2];
152 t2[3] |= salt_buf2[3];
153 t3[0] |= salt_buf3[0];
154 t3[1] |= salt_buf3[1];
155 t3[2] |= salt_buf3[2];
161 u32x w0_t = swap32 (t0[0]);
162 u32x w1_t = swap32 (t0[1]);
163 u32x w2_t = swap32 (t0[2]);
164 u32x w3_t = swap32 (t0[3]);
165 u32x w4_t = swap32 (t1[0]);
166 u32x w5_t = swap32 (t1[1]);
167 u32x w6_t = swap32 (t1[2]);
168 u32x w7_t = swap32 (t1[3]);
169 u32x w8_t = swap32 (t2[0]);
170 u32x w9_t = swap32 (t2[1]);
171 u32x wa_t = swap32 (t2[2]);
172 u32x wb_t = swap32 (t2[3]);
173 u32x wc_t = swap32 (t3[0]);
174 u32x wd_t = swap32 (t3[1]);
176 u32x wf_t = salt_pw_salt_len * 8;
187 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t);
188 SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t);
189 SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t);
190 SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t);
191 SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t);
192 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t);
193 SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t);
194 SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t);
195 SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t);
196 SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t);
197 SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t);
198 SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t);
199 SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t);
200 SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t);
201 SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t);
202 SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t);
203 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t);
204 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t);
205 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t);
206 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t);
211 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t);
212 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t);
213 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t);
214 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t);
215 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t);
216 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t);
217 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t);
218 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t);
219 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t);
220 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t);
221 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t);
222 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t);
223 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t);
224 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t);
225 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t);
226 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t);
227 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t);
228 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t);
229 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t);
230 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t);
235 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t);
236 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t);
237 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t);
238 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t);
239 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t);
240 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t);
241 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t);
242 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t);
243 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t);
244 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t);
245 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t);
246 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t);
247 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t);
248 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t);
249 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t);
250 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t);
251 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t);
252 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t);
253 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t);
254 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t);
259 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t);
260 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t);
261 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t);
262 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t);
263 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t);
264 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t);
265 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t);
266 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t);
267 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t);
268 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t);
269 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t);
270 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t);
271 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t);
272 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t);
273 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t);
274 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t);
275 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t);
276 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t);
277 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t);
278 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t);
280 COMPARE_M_SIMD (d, e, c, b);
284 void m04900s (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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
290 const u32 gid = get_global_id (0);
291 const u32 lid = get_local_id (0);
302 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
303 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
304 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
305 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
306 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
307 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
308 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
309 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
310 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
311 salt_buf2[1] = salt_bufs[salt_pos].salt_buf[ 9];
312 salt_buf2[2] = salt_bufs[salt_pos].salt_buf[10];
313 salt_buf2[3] = salt_bufs[salt_pos].salt_buf[11];
314 salt_buf3[0] = salt_bufs[salt_pos].salt_buf[12];
315 salt_buf3[1] = salt_bufs[salt_pos].salt_buf[13];
316 salt_buf3[2] = salt_bufs[salt_pos].salt_buf[14];
317 salt_buf3[3] = salt_bufs[salt_pos].salt_buf[15];
324 salt_buf0_t[0] = salt_bufs[salt_pos].salt_buf[ 0];
325 salt_buf0_t[1] = salt_bufs[salt_pos].salt_buf[ 1];
326 salt_buf0_t[2] = salt_bufs[salt_pos].salt_buf[ 2];
327 salt_buf0_t[3] = salt_bufs[salt_pos].salt_buf[ 3];
328 salt_buf1_t[0] = salt_bufs[salt_pos].salt_buf[ 4];
329 salt_buf1_t[1] = salt_bufs[salt_pos].salt_buf[ 5];
330 salt_buf1_t[2] = salt_bufs[salt_pos].salt_buf[ 6];
331 salt_buf1_t[3] = salt_bufs[salt_pos].salt_buf[ 7];
332 salt_buf2_t[0] = salt_bufs[salt_pos].salt_buf[ 8];
333 salt_buf2_t[1] = salt_bufs[salt_pos].salt_buf[ 9];
334 salt_buf2_t[2] = salt_bufs[salt_pos].salt_buf[10];
335 salt_buf2_t[3] = salt_bufs[salt_pos].salt_buf[11];
336 salt_buf3_t[0] = salt_bufs[salt_pos].salt_buf[12];
337 salt_buf3_t[1] = salt_bufs[salt_pos].salt_buf[13];
338 salt_buf3_t[2] = salt_bufs[salt_pos].salt_buf[14];
339 salt_buf3_t[3] = salt_bufs[salt_pos].salt_buf[15];
341 const u32 salt_len = salt_bufs[salt_pos].salt_len;
343 const u32 pw_salt_len = pw_len + salt_len;
345 const u32 salt_pw_salt_len = salt_len + pw_len + salt_len;
347 switch_buffer_by_offset_le_S (salt_buf0_t, salt_buf1_t, salt_buf2_t, salt_buf3_t, pw_salt_len);
349 salt_buf0[0] |= salt_buf0_t[0];
350 salt_buf0[1] |= salt_buf0_t[1];
351 salt_buf0[2] |= salt_buf0_t[2];
352 salt_buf0[3] |= salt_buf0_t[3];
353 salt_buf1[0] |= salt_buf1_t[0];
354 salt_buf1[1] |= salt_buf1_t[1];
355 salt_buf1[2] |= salt_buf1_t[2];
356 salt_buf1[3] |= salt_buf1_t[3];
357 salt_buf2[0] |= salt_buf2_t[0];
358 salt_buf2[1] |= salt_buf2_t[1];
359 salt_buf2[2] |= salt_buf2_t[2];
360 salt_buf2[3] |= salt_buf2_t[3];
361 salt_buf3[0] |= salt_buf3_t[0];
362 salt_buf3[1] |= salt_buf3_t[1];
363 salt_buf3[2] |= salt_buf3_t[2];
364 salt_buf3[3] |= salt_buf3_t[3];
366 append_0x80_4x4_S (salt_buf0, salt_buf1, salt_buf2, salt_buf3, salt_pw_salt_len);
372 const u32 search[4] =
374 digests_buf[digests_offset].digest_buf[DGST_R0],
375 digests_buf[digests_offset].digest_buf[DGST_R1],
376 digests_buf[digests_offset].digest_buf[DGST_R2],
377 digests_buf[digests_offset].digest_buf[DGST_R3]
384 const u32 e_rev = rotl32_S (search[1], 2u);
392 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
394 const u32x w0r = ix_create_bft (bfs_buf, il_pos);
396 const u32x w0lr = w0l | w0r;
421 * put the password after the first salt but before the second salt
424 switch_buffer_by_offset_le (t0, t1, t2, t3, salt_len);
426 t0[0] |= salt_buf0[0];
427 t0[1] |= salt_buf0[1];
428 t0[2] |= salt_buf0[2];
429 t0[3] |= salt_buf0[3];
430 t1[0] |= salt_buf1[0];
431 t1[1] |= salt_buf1[1];
432 t1[2] |= salt_buf1[2];
433 t1[3] |= salt_buf1[3];
434 t2[0] |= salt_buf2[0];
435 t2[1] |= salt_buf2[1];
436 t2[2] |= salt_buf2[2];
437 t2[3] |= salt_buf2[3];
438 t3[0] |= salt_buf3[0];
439 t3[1] |= salt_buf3[1];
440 t3[2] |= salt_buf3[2];
446 u32x w0_t = swap32 (t0[0]);
447 u32x w1_t = swap32 (t0[1]);
448 u32x w2_t = swap32 (t0[2]);
449 u32x w3_t = swap32 (t0[3]);
450 u32x w4_t = swap32 (t1[0]);
451 u32x w5_t = swap32 (t1[1]);
452 u32x w6_t = swap32 (t1[2]);
453 u32x w7_t = swap32 (t1[3]);
454 u32x w8_t = swap32 (t2[0]);
455 u32x w9_t = swap32 (t2[1]);
456 u32x wa_t = swap32 (t2[2]);
457 u32x wb_t = swap32 (t2[3]);
458 u32x wc_t = swap32 (t3[0]);
459 u32x wd_t = swap32 (t3[1]);
461 u32x wf_t = salt_pw_salt_len * 8;
472 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t);
473 SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t);
474 SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t);
475 SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t);
476 SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t);
477 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t);
478 SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t);
479 SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t);
480 SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t);
481 SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t);
482 SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t);
483 SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t);
484 SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t);
485 SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t);
486 SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t);
487 SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t);
488 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t);
489 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t);
490 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t);
491 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t);
496 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t);
497 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t);
498 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t);
499 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t);
500 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t);
501 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t);
502 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t);
503 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t);
504 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t);
505 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t);
506 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t);
507 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t);
508 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t);
509 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t);
510 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t);
511 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t);
512 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t);
513 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t);
514 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t);
515 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t);
520 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t);
521 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t);
522 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t);
523 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t);
524 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t);
525 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t);
526 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t);
527 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t);
528 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t);
529 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t);
530 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t);
531 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t);
532 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t);
533 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t);
534 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t);
535 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t);
536 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t);
537 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t);
538 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t);
539 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t);
544 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t);
545 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t);
546 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t);
547 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t);
548 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t);
549 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t);
550 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t);
551 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t);
552 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t);
553 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t);
554 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t);
555 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t);
556 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t);
557 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t);
558 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t);
559 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t);
561 if (MATCHES_NONE_VS (e, e_rev)) continue;
563 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t);
564 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t);
565 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t);
566 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t);
568 COMPARE_S_SIMD (d, e, c, b);
572 __kernel void m04900_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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
578 const u32 gid = get_global_id (0);
580 if (gid >= gid_max) return;
586 const u32 lid = get_local_id (0);
590 w0[0] = pws[gid].i[ 0];
591 w0[1] = pws[gid].i[ 1];
592 w0[2] = pws[gid].i[ 2];
593 w0[3] = pws[gid].i[ 3];
613 w3[2] = pws[gid].i[14];
616 const u32 pw_len = pws[gid].pw_len;
622 m04900m (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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
625 __kernel void m04900_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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
631 const u32 gid = get_global_id (0);
633 if (gid >= gid_max) return;
639 const u32 lid = get_local_id (0);
643 w0[0] = pws[gid].i[ 0];
644 w0[1] = pws[gid].i[ 1];
645 w0[2] = pws[gid].i[ 2];
646 w0[3] = pws[gid].i[ 3];
650 w1[0] = pws[gid].i[ 4];
651 w1[1] = pws[gid].i[ 5];
652 w1[2] = pws[gid].i[ 6];
653 w1[3] = pws[gid].i[ 7];
666 w3[2] = pws[gid].i[14];
669 const u32 pw_len = pws[gid].pw_len;
675 m04900m (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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
678 __kernel void m04900_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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
684 const u32 gid = get_global_id (0);
686 if (gid >= gid_max) return;
692 const u32 lid = get_local_id (0);
696 w0[0] = pws[gid].i[ 0];
697 w0[1] = pws[gid].i[ 1];
698 w0[2] = pws[gid].i[ 2];
699 w0[3] = pws[gid].i[ 3];
703 w1[0] = pws[gid].i[ 4];
704 w1[1] = pws[gid].i[ 5];
705 w1[2] = pws[gid].i[ 6];
706 w1[3] = pws[gid].i[ 7];
710 w2[0] = pws[gid].i[ 8];
711 w2[1] = pws[gid].i[ 9];
712 w2[2] = pws[gid].i[10];
713 w2[3] = pws[gid].i[11];
717 w3[0] = pws[gid].i[12];
718 w3[1] = pws[gid].i[13];
719 w3[2] = pws[gid].i[14];
720 w3[3] = pws[gid].i[15];
722 const u32 pw_len = pws[gid].pw_len;
728 m04900m (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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
731 __kernel void m04900_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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
737 const u32 gid = get_global_id (0);
739 if (gid >= gid_max) return;
745 const u32 lid = get_local_id (0);
749 w0[0] = pws[gid].i[ 0];
750 w0[1] = pws[gid].i[ 1];
751 w0[2] = pws[gid].i[ 2];
752 w0[3] = pws[gid].i[ 3];
772 w3[2] = pws[gid].i[14];
775 const u32 pw_len = pws[gid].pw_len;
781 m04900s (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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
784 __kernel void m04900_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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
790 const u32 gid = get_global_id (0);
792 if (gid >= gid_max) return;
798 const u32 lid = get_local_id (0);
802 w0[0] = pws[gid].i[ 0];
803 w0[1] = pws[gid].i[ 1];
804 w0[2] = pws[gid].i[ 2];
805 w0[3] = pws[gid].i[ 3];
809 w1[0] = pws[gid].i[ 4];
810 w1[1] = pws[gid].i[ 5];
811 w1[2] = pws[gid].i[ 6];
812 w1[3] = pws[gid].i[ 7];
825 w3[2] = pws[gid].i[14];
828 const u32 pw_len = pws[gid].pw_len;
834 m04900s (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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
837 __kernel void m04900_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_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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)
843 const u32 gid = get_global_id (0);
845 if (gid >= gid_max) return;
851 const u32 lid = get_local_id (0);
855 w0[0] = pws[gid].i[ 0];
856 w0[1] = pws[gid].i[ 1];
857 w0[2] = pws[gid].i[ 2];
858 w0[3] = pws[gid].i[ 3];
862 w1[0] = pws[gid].i[ 4];
863 w1[1] = pws[gid].i[ 5];
864 w1[2] = pws[gid].i[ 6];
865 w1[3] = pws[gid].i[ 7];
869 w2[0] = pws[gid].i[ 8];
870 w2[1] = pws[gid].i[ 9];
871 w2[2] = pws[gid].i[10];
872 w2[3] = pws[gid].i[11];
876 w3[0] = pws[gid].i[12];
877 w3[1] = pws[gid].i[13];
878 w3[2] = pws[gid].i[14];
879 w3[3] = pws[gid].i[15];
881 const u32 pw_len = pws[gid].pw_len;
887 m04900s (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_scryptV0_buf, d_scryptV1_buf, d_scryptV2_buf, d_scryptV3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);