2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
16 #include "include/kernel_functions.c"
17 #include "OpenCL/types_ocl.c"
18 #include "OpenCL/common.c"
20 #define COMPARE_S "OpenCL/check_single_comp4.c"
21 #define COMPARE_M "OpenCL/check_multi_comp4.c"
23 static void m00300m (u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32 * 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)
29 const u32 gid = get_global_id (0);
30 const u32 lid = get_local_id (0);
36 const u32 c_16s = rotl32 ((w[13] ^ w[ 8] ^ w[ 2] ), 1u);
37 const u32 c_17s = rotl32 ((w[14] ^ w[ 9] ^ w[ 3] ^ w[ 1]), 1u);
38 const u32 c_18s = rotl32 ((w[15] ^ w[10] ^ w[ 4] ^ w[ 2]), 1u);
39 const u32 c_19s = rotl32 ((c_16s ^ w[11] ^ w[ 5] ^ w[ 3]), 1u);
40 const u32 c_20s = rotl32 ((c_17s ^ w[12] ^ w[ 6] ^ w[ 4]), 1u);
41 const u32 c_21s = rotl32 ((c_18s ^ w[13] ^ w[ 7] ^ w[ 5]), 1u);
42 const u32 c_22s = rotl32 ((c_19s ^ w[14] ^ w[ 8] ^ w[ 6]), 1u);
43 const u32 c_23s = rotl32 ((c_20s ^ w[15] ^ w[ 9] ^ w[ 7]), 1u);
44 const u32 c_24s = rotl32 ((c_21s ^ c_16s ^ w[10] ^ w[ 8]), 1u);
45 const u32 c_25s = rotl32 ((c_22s ^ c_17s ^ w[11] ^ w[ 9]), 1u);
46 const u32 c_26s = rotl32 ((c_23s ^ c_18s ^ w[12] ^ w[10]), 1u);
47 const u32 c_27s = rotl32 ((c_24s ^ c_19s ^ w[13] ^ w[11]), 1u);
48 const u32 c_28s = rotl32 ((c_25s ^ c_20s ^ w[14] ^ w[12]), 1u);
49 const u32 c_29s = rotl32 ((c_26s ^ c_21s ^ w[15] ^ w[13]), 1u);
50 const u32 c_30s = rotl32 ((c_27s ^ c_22s ^ c_16s ^ w[14]), 1u);
51 const u32 c_31s = rotl32 ((c_28s ^ c_23s ^ c_17s ^ w[15]), 1u);
52 const u32 c_32s = rotl32 ((c_29s ^ c_24s ^ c_18s ^ c_16s), 1u);
53 const u32 c_33s = rotl32 ((c_30s ^ c_25s ^ c_19s ^ c_17s), 1u);
54 const u32 c_34s = rotl32 ((c_31s ^ c_26s ^ c_20s ^ c_18s), 1u);
55 const u32 c_35s = rotl32 ((c_32s ^ c_27s ^ c_21s ^ c_19s), 1u);
56 const u32 c_36s = rotl32 ((c_33s ^ c_28s ^ c_22s ^ c_20s), 1u);
57 const u32 c_37s = rotl32 ((c_34s ^ c_29s ^ c_23s ^ c_21s), 1u);
58 const u32 c_38s = rotl32 ((c_35s ^ c_30s ^ c_24s ^ c_22s), 1u);
59 const u32 c_39s = rotl32 ((c_36s ^ c_31s ^ c_25s ^ c_23s), 1u);
60 const u32 c_40s = rotl32 ((c_37s ^ c_32s ^ c_26s ^ c_24s), 1u);
61 const u32 c_41s = rotl32 ((c_38s ^ c_33s ^ c_27s ^ c_25s), 1u);
62 const u32 c_42s = rotl32 ((c_39s ^ c_34s ^ c_28s ^ c_26s), 1u);
63 const u32 c_43s = rotl32 ((c_40s ^ c_35s ^ c_29s ^ c_27s), 1u);
64 const u32 c_44s = rotl32 ((c_41s ^ c_36s ^ c_30s ^ c_28s), 1u);
65 const u32 c_45s = rotl32 ((c_42s ^ c_37s ^ c_31s ^ c_29s), 1u);
66 const u32 c_46s = rotl32 ((c_43s ^ c_38s ^ c_32s ^ c_30s), 1u);
67 const u32 c_47s = rotl32 ((c_44s ^ c_39s ^ c_33s ^ c_31s), 1u);
68 const u32 c_48s = rotl32 ((c_45s ^ c_40s ^ c_34s ^ c_32s), 1u);
69 const u32 c_49s = rotl32 ((c_46s ^ c_41s ^ c_35s ^ c_33s), 1u);
70 const u32 c_50s = rotl32 ((c_47s ^ c_42s ^ c_36s ^ c_34s), 1u);
71 const u32 c_51s = rotl32 ((c_48s ^ c_43s ^ c_37s ^ c_35s), 1u);
72 const u32 c_52s = rotl32 ((c_49s ^ c_44s ^ c_38s ^ c_36s), 1u);
73 const u32 c_53s = rotl32 ((c_50s ^ c_45s ^ c_39s ^ c_37s), 1u);
74 const u32 c_54s = rotl32 ((c_51s ^ c_46s ^ c_40s ^ c_38s), 1u);
75 const u32 c_55s = rotl32 ((c_52s ^ c_47s ^ c_41s ^ c_39s), 1u);
76 const u32 c_56s = rotl32 ((c_53s ^ c_48s ^ c_42s ^ c_40s), 1u);
77 const u32 c_57s = rotl32 ((c_54s ^ c_49s ^ c_43s ^ c_41s), 1u);
78 const u32 c_58s = rotl32 ((c_55s ^ c_50s ^ c_44s ^ c_42s), 1u);
79 const u32 c_59s = rotl32 ((c_56s ^ c_51s ^ c_45s ^ c_43s), 1u);
80 const u32 c_60s = rotl32 ((c_57s ^ c_52s ^ c_46s ^ c_44s), 1u);
81 const u32 c_61s = rotl32 ((c_58s ^ c_53s ^ c_47s ^ c_45s), 1u);
82 const u32 c_62s = rotl32 ((c_59s ^ c_54s ^ c_48s ^ c_46s), 1u);
83 const u32 c_63s = rotl32 ((c_60s ^ c_55s ^ c_49s ^ c_47s), 1u);
84 const u32 c_64s = rotl32 ((c_61s ^ c_56s ^ c_50s ^ c_48s), 1u);
85 const u32 c_65s = rotl32 ((c_62s ^ c_57s ^ c_51s ^ c_49s), 1u);
86 const u32 c_66s = rotl32 ((c_63s ^ c_58s ^ c_52s ^ c_50s), 1u);
87 const u32 c_67s = rotl32 ((c_64s ^ c_59s ^ c_53s ^ c_51s), 1u);
88 const u32 c_68s = rotl32 ((c_65s ^ c_60s ^ c_54s ^ c_52s), 1u);
89 const u32 c_69s = rotl32 ((c_66s ^ c_61s ^ c_55s ^ c_53s), 1u);
90 const u32 c_70s = rotl32 ((c_67s ^ c_62s ^ c_56s ^ c_54s), 1u);
91 const u32 c_71s = rotl32 ((c_68s ^ c_63s ^ c_57s ^ c_55s), 1u);
92 const u32 c_72s = rotl32 ((c_69s ^ c_64s ^ c_58s ^ c_56s), 1u);
93 const u32 c_73s = rotl32 ((c_70s ^ c_65s ^ c_59s ^ c_57s), 1u);
94 const u32 c_74s = rotl32 ((c_71s ^ c_66s ^ c_60s ^ c_58s), 1u);
95 const u32 c_75s = rotl32 ((c_72s ^ c_67s ^ c_61s ^ c_59s), 1u);
96 const u32 c_76s = rotl32 ((c_73s ^ c_68s ^ c_62s ^ c_60s), 1u);
97 const u32 c_77s = rotl32 ((c_74s ^ c_69s ^ c_63s ^ c_61s), 1u);
98 const u32 c_78s = rotl32 ((c_75s ^ c_70s ^ c_64s ^ c_62s), 1u);
99 const u32 c_79s = rotl32 ((c_76s ^ c_71s ^ c_65s ^ c_63s), 1u);
101 const u32 c_17sK = c_17s + SHA1C00;
102 const u32 c_18sK = c_18s + SHA1C00;
103 const u32 c_20sK = c_20s + SHA1C01;
104 const u32 c_21sK = c_21s + SHA1C01;
105 const u32 c_23sK = c_23s + SHA1C01;
106 const u32 c_26sK = c_26s + SHA1C01;
107 const u32 c_27sK = c_27s + SHA1C01;
108 const u32 c_29sK = c_29s + SHA1C01;
109 const u32 c_33sK = c_33s + SHA1C01;
110 const u32 c_39sK = c_39s + SHA1C01;
111 const u32 c_41sK = c_41s + SHA1C02;
112 const u32 c_45sK = c_45s + SHA1C02;
113 const u32 c_53sK = c_53s + SHA1C02;
114 const u32 c_65sK = c_65s + SHA1C03;
115 const u32 c_69sK = c_69s + SHA1C03;
117 const u32 w1 = w[ 1] + SHA1C00;
118 const u32 w2 = w[ 2] + SHA1C00;
119 const u32 w3 = w[ 3] + SHA1C00;
120 const u32 w4 = w[ 4] + SHA1C00;
121 const u32 w5 = w[ 5] + SHA1C00;
122 const u32 w6 = w[ 6] + SHA1C00;
123 const u32 w7 = w[ 7] + SHA1C00;
124 const u32 w8 = w[ 8] + SHA1C00;
125 const u32 w9 = w[ 9] + SHA1C00;
126 const u32 wa = w[10] + SHA1C00;
127 const u32 wb = w[11] + SHA1C00;
128 const u32 wc = w[12] + SHA1C00;
129 const u32 wd = w[13] + SHA1C00;
130 const u32 we = w[14] + SHA1C00;
131 const u32 wf = w[15] + SHA1C00;
139 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
141 const u32 w0r = words_buf_r[il_pos];
143 const u32 w0 = w0l | w0r;
145 const u32 w0s01 = rotl32 (w0, 1u);
146 const u32 w0s02 = rotl32 (w0, 2u);
147 const u32 w0s03 = rotl32 (w0, 3u);
148 const u32 w0s04 = rotl32 (w0, 4u);
149 const u32 w0s05 = rotl32 (w0, 5u);
150 const u32 w0s06 = rotl32 (w0, 6u);
151 const u32 w0s07 = rotl32 (w0, 7u);
152 const u32 w0s08 = rotl32 (w0, 8u);
153 const u32 w0s09 = rotl32 (w0, 9u);
154 const u32 w0s10 = rotl32 (w0, 10u);
155 const u32 w0s11 = rotl32 (w0, 11u);
156 const u32 w0s12 = rotl32 (w0, 12u);
157 const u32 w0s13 = rotl32 (w0, 13u);
158 const u32 w0s14 = rotl32 (w0, 14u);
159 const u32 w0s15 = rotl32 (w0, 15u);
160 const u32 w0s16 = rotl32 (w0, 16u);
161 const u32 w0s17 = rotl32 (w0, 17u);
162 const u32 w0s18 = rotl32 (w0, 18u);
163 const u32 w0s19 = rotl32 (w0, 19u);
164 const u32 w0s20 = rotl32 (w0, 20u);
165 const u32 w0s21 = rotl32 (w0, 21u);
166 const u32 w0s22 = rotl32 (w0, 22U);
168 const u32 w0s04___w0s06 = w0s04 ^ w0s06;
169 const u32 w0s04___w0s08 = w0s04 ^ w0s08;
170 const u32 w0s08___w0s12 = w0s08 ^ w0s12;
171 const u32 w0s04___w0s06___w0s07 = w0s04___w0s06 ^ w0s07;
182 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0);
183 SHA1_STEPX(SHA1_F0o, e, a, b, c, d, w1);
184 SHA1_STEPX(SHA1_F0o, d, e, a, b, c, w2);
185 SHA1_STEPX(SHA1_F0o, c, d, e, a, b, w3);
186 SHA1_STEPX(SHA1_F0o, b, c, d, e, a, w4);
187 SHA1_STEPX(SHA1_F0o, a, b, c, d, e, w5);
188 SHA1_STEPX(SHA1_F0o, e, a, b, c, d, w6);
189 SHA1_STEPX(SHA1_F0o, d, e, a, b, c, w7);
190 SHA1_STEPX(SHA1_F0o, c, d, e, a, b, w8);
191 SHA1_STEPX(SHA1_F0o, b, c, d, e, a, w9);
192 SHA1_STEPX(SHA1_F0o, a, b, c, d, e, wa);
193 SHA1_STEPX(SHA1_F0o, e, a, b, c, d, wb);
194 SHA1_STEPX(SHA1_F0o, d, e, a, b, c, wc);
195 SHA1_STEPX(SHA1_F0o, c, d, e, a, b, wd);
196 SHA1_STEPX(SHA1_F0o, b, c, d, e, a, we);
197 SHA1_STEPX(SHA1_F0o, a, b, c, d, e, wf);
199 SHA1_STEP (SHA1_F0o, e, a, b, c, d, (c_16s ^ w0s01));
200 SHA1_STEPX(SHA1_F0o, d, e, a, b, c, (c_17sK));
201 SHA1_STEPX(SHA1_F0o, c, d, e, a, b, (c_18sK));
202 SHA1_STEP (SHA1_F0o, b, c, d, e, a, (c_19s ^ w0s02));
207 SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_20sK));
208 SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_21sK));
209 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_22s ^ w0s03));
210 SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_23sK));
211 SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_24s ^ w0s02));
212 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_25s ^ w0s04));
213 SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_26sK));
214 SHA1_STEPX(SHA1_F1 , d, e, a, b, c, (c_27sK));
215 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_28s ^ w0s05));
216 SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_29sK));
217 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_30s ^ w0s02 ^ w0s04));
218 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_31s ^ w0s06));
219 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_32s ^ w0s02 ^ w0s03));
220 SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_33sK));
221 SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_34s ^ w0s07));
222 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_35s ^ w0s04));
223 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_36s ^ w0s04___w0s06));
224 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_37s ^ w0s08));
225 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_38s ^ w0s04));
226 SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_39sK));
231 SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_40s ^ w0s04 ^ w0s09));
232 SHA1_STEPX(SHA1_F2o, e, a, b, c, d, (c_41sK));
233 SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_42s ^ w0s06 ^ w0s08));
234 SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_43s ^ w0s10));
235 SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_44s ^ w0s03 ^ w0s06 ^ w0s07));
236 SHA1_STEPX(SHA1_F2o, a, b, c, d, e, (c_45sK));
237 SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_46s ^ w0s04 ^ w0s11));
238 SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_47s ^ w0s04___w0s08));
239 SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_48s ^ w0s03 ^ w0s04___w0s08 ^ w0s05 ^ w0s10));
240 SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_49s ^ w0s12));
241 SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_50s ^ w0s08));
242 SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_51s ^ w0s04___w0s06));
243 SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_52s ^ w0s04___w0s08 ^ w0s13));
244 SHA1_STEPX(SHA1_F2o, c, d, e, a, b, (c_53sK));
245 SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_54s ^ w0s07 ^ w0s10 ^ w0s12));
246 SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_55s ^ w0s14));
247 SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_56s ^ w0s04___w0s06___w0s07 ^ w0s10 ^ w0s11));
248 SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_57s ^ w0s08));
249 SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_58s ^ w0s04___w0s08 ^ w0s15));
250 SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_59s ^ w0s08___w0s12));
255 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_60s ^ w0s04 ^ w0s08___w0s12 ^ w0s07 ^ w0s14));
256 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_61s ^ w0s16));
257 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_62s ^ w0s04___w0s06 ^ w0s08___w0s12));
258 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_63s ^ w0s08));
259 SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_64s ^ w0s04___w0s06___w0s07 ^ w0s08___w0s12 ^ w0s17));
260 SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_65sK));
261 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_66s ^ w0s14 ^ w0s16));
262 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_67s ^ w0s08 ^ w0s18));
263 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_68s ^ w0s11 ^ w0s14 ^ w0s15));
264 SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_69sK));
265 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_70s ^ w0s12 ^ w0s19));
266 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_71s ^ w0s12 ^ w0s16));
267 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_72s ^ w0s05 ^ w0s11 ^ w0s12 ^ w0s13 ^ w0s16 ^ w0s18));
268 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_73s ^ w0s20));
269 SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_74s ^ w0s08 ^ w0s16));
270 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_75s ^ w0s06 ^ w0s12 ^ w0s14));
271 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_76s ^ w0s07 ^ w0s08___w0s12 ^ w0s16 ^ w0s21));
272 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_77s));
273 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_78s ^ w0s07 ^ w0s08 ^ w0s15 ^ w0s18 ^ w0s20));
274 SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_79s ^ w0s08 ^ w0s22));
287 u32 w5_t = 0x80000000;
308 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t);
309 SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t);
310 SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t);
311 SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t);
312 SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t);
313 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t);
314 SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t);
315 SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t);
316 SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t);
317 SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t);
318 SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t);
319 SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t);
320 SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t);
321 SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t);
322 SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t);
323 SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t);
324 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t);
325 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t);
326 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t);
327 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t);
332 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t);
333 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t);
334 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t);
335 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t);
336 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t);
337 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t);
338 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t);
339 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t);
340 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t);
341 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t);
342 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t);
343 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t);
344 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t);
345 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t);
346 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t);
347 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t);
348 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t);
349 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t);
350 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t);
351 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t);
356 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t);
357 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t);
358 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t);
359 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t);
360 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t);
361 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t);
362 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t);
363 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t);
364 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t);
365 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t);
366 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t);
367 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t);
368 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t);
369 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t);
370 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t);
371 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t);
372 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t);
373 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t);
374 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t);
375 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t);
380 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t);
381 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t);
382 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t);
383 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t);
384 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t);
385 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t);
386 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t);
387 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t);
388 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t);
389 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t);
390 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t);
391 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t);
392 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t);
393 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t);
394 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t);
395 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t);
396 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t);
397 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t);
398 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t);
399 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t);
411 static void m00300s (u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32 * 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)
417 const u32 gid = get_global_id (0);
418 const u32 lid = get_local_id (0);
424 const u32 c_16s = rotl32 ((w[13] ^ w[ 8] ^ w[ 2] ), 1u);
425 const u32 c_17s = rotl32 ((w[14] ^ w[ 9] ^ w[ 3] ^ w[ 1]), 1u);
426 const u32 c_18s = rotl32 ((w[15] ^ w[10] ^ w[ 4] ^ w[ 2]), 1u);
427 const u32 c_19s = rotl32 ((c_16s ^ w[11] ^ w[ 5] ^ w[ 3]), 1u);
428 const u32 c_20s = rotl32 ((c_17s ^ w[12] ^ w[ 6] ^ w[ 4]), 1u);
429 const u32 c_21s = rotl32 ((c_18s ^ w[13] ^ w[ 7] ^ w[ 5]), 1u);
430 const u32 c_22s = rotl32 ((c_19s ^ w[14] ^ w[ 8] ^ w[ 6]), 1u);
431 const u32 c_23s = rotl32 ((c_20s ^ w[15] ^ w[ 9] ^ w[ 7]), 1u);
432 const u32 c_24s = rotl32 ((c_21s ^ c_16s ^ w[10] ^ w[ 8]), 1u);
433 const u32 c_25s = rotl32 ((c_22s ^ c_17s ^ w[11] ^ w[ 9]), 1u);
434 const u32 c_26s = rotl32 ((c_23s ^ c_18s ^ w[12] ^ w[10]), 1u);
435 const u32 c_27s = rotl32 ((c_24s ^ c_19s ^ w[13] ^ w[11]), 1u);
436 const u32 c_28s = rotl32 ((c_25s ^ c_20s ^ w[14] ^ w[12]), 1u);
437 const u32 c_29s = rotl32 ((c_26s ^ c_21s ^ w[15] ^ w[13]), 1u);
438 const u32 c_30s = rotl32 ((c_27s ^ c_22s ^ c_16s ^ w[14]), 1u);
439 const u32 c_31s = rotl32 ((c_28s ^ c_23s ^ c_17s ^ w[15]), 1u);
440 const u32 c_32s = rotl32 ((c_29s ^ c_24s ^ c_18s ^ c_16s), 1u);
441 const u32 c_33s = rotl32 ((c_30s ^ c_25s ^ c_19s ^ c_17s), 1u);
442 const u32 c_34s = rotl32 ((c_31s ^ c_26s ^ c_20s ^ c_18s), 1u);
443 const u32 c_35s = rotl32 ((c_32s ^ c_27s ^ c_21s ^ c_19s), 1u);
444 const u32 c_36s = rotl32 ((c_33s ^ c_28s ^ c_22s ^ c_20s), 1u);
445 const u32 c_37s = rotl32 ((c_34s ^ c_29s ^ c_23s ^ c_21s), 1u);
446 const u32 c_38s = rotl32 ((c_35s ^ c_30s ^ c_24s ^ c_22s), 1u);
447 const u32 c_39s = rotl32 ((c_36s ^ c_31s ^ c_25s ^ c_23s), 1u);
448 const u32 c_40s = rotl32 ((c_37s ^ c_32s ^ c_26s ^ c_24s), 1u);
449 const u32 c_41s = rotl32 ((c_38s ^ c_33s ^ c_27s ^ c_25s), 1u);
450 const u32 c_42s = rotl32 ((c_39s ^ c_34s ^ c_28s ^ c_26s), 1u);
451 const u32 c_43s = rotl32 ((c_40s ^ c_35s ^ c_29s ^ c_27s), 1u);
452 const u32 c_44s = rotl32 ((c_41s ^ c_36s ^ c_30s ^ c_28s), 1u);
453 const u32 c_45s = rotl32 ((c_42s ^ c_37s ^ c_31s ^ c_29s), 1u);
454 const u32 c_46s = rotl32 ((c_43s ^ c_38s ^ c_32s ^ c_30s), 1u);
455 const u32 c_47s = rotl32 ((c_44s ^ c_39s ^ c_33s ^ c_31s), 1u);
456 const u32 c_48s = rotl32 ((c_45s ^ c_40s ^ c_34s ^ c_32s), 1u);
457 const u32 c_49s = rotl32 ((c_46s ^ c_41s ^ c_35s ^ c_33s), 1u);
458 const u32 c_50s = rotl32 ((c_47s ^ c_42s ^ c_36s ^ c_34s), 1u);
459 const u32 c_51s = rotl32 ((c_48s ^ c_43s ^ c_37s ^ c_35s), 1u);
460 const u32 c_52s = rotl32 ((c_49s ^ c_44s ^ c_38s ^ c_36s), 1u);
461 const u32 c_53s = rotl32 ((c_50s ^ c_45s ^ c_39s ^ c_37s), 1u);
462 const u32 c_54s = rotl32 ((c_51s ^ c_46s ^ c_40s ^ c_38s), 1u);
463 const u32 c_55s = rotl32 ((c_52s ^ c_47s ^ c_41s ^ c_39s), 1u);
464 const u32 c_56s = rotl32 ((c_53s ^ c_48s ^ c_42s ^ c_40s), 1u);
465 const u32 c_57s = rotl32 ((c_54s ^ c_49s ^ c_43s ^ c_41s), 1u);
466 const u32 c_58s = rotl32 ((c_55s ^ c_50s ^ c_44s ^ c_42s), 1u);
467 const u32 c_59s = rotl32 ((c_56s ^ c_51s ^ c_45s ^ c_43s), 1u);
468 const u32 c_60s = rotl32 ((c_57s ^ c_52s ^ c_46s ^ c_44s), 1u);
469 const u32 c_61s = rotl32 ((c_58s ^ c_53s ^ c_47s ^ c_45s), 1u);
470 const u32 c_62s = rotl32 ((c_59s ^ c_54s ^ c_48s ^ c_46s), 1u);
471 const u32 c_63s = rotl32 ((c_60s ^ c_55s ^ c_49s ^ c_47s), 1u);
472 const u32 c_64s = rotl32 ((c_61s ^ c_56s ^ c_50s ^ c_48s), 1u);
473 const u32 c_65s = rotl32 ((c_62s ^ c_57s ^ c_51s ^ c_49s), 1u);
474 const u32 c_66s = rotl32 ((c_63s ^ c_58s ^ c_52s ^ c_50s), 1u);
475 const u32 c_67s = rotl32 ((c_64s ^ c_59s ^ c_53s ^ c_51s), 1u);
476 const u32 c_68s = rotl32 ((c_65s ^ c_60s ^ c_54s ^ c_52s), 1u);
477 const u32 c_69s = rotl32 ((c_66s ^ c_61s ^ c_55s ^ c_53s), 1u);
478 const u32 c_70s = rotl32 ((c_67s ^ c_62s ^ c_56s ^ c_54s), 1u);
479 const u32 c_71s = rotl32 ((c_68s ^ c_63s ^ c_57s ^ c_55s), 1u);
480 const u32 c_72s = rotl32 ((c_69s ^ c_64s ^ c_58s ^ c_56s), 1u);
481 const u32 c_73s = rotl32 ((c_70s ^ c_65s ^ c_59s ^ c_57s), 1u);
482 const u32 c_74s = rotl32 ((c_71s ^ c_66s ^ c_60s ^ c_58s), 1u);
483 const u32 c_75s = rotl32 ((c_72s ^ c_67s ^ c_61s ^ c_59s), 1u);
485 const u32 c_17sK = c_17s + SHA1C00;
486 const u32 c_18sK = c_18s + SHA1C00;
487 const u32 c_20sK = c_20s + SHA1C01;
488 const u32 c_21sK = c_21s + SHA1C01;
489 const u32 c_23sK = c_23s + SHA1C01;
490 const u32 c_26sK = c_26s + SHA1C01;
491 const u32 c_27sK = c_27s + SHA1C01;
492 const u32 c_29sK = c_29s + SHA1C01;
493 const u32 c_33sK = c_33s + SHA1C01;
494 const u32 c_39sK = c_39s + SHA1C01;
495 const u32 c_41sK = c_41s + SHA1C02;
496 const u32 c_45sK = c_45s + SHA1C02;
497 const u32 c_53sK = c_53s + SHA1C02;
498 const u32 c_65sK = c_65s + SHA1C03;
499 const u32 c_69sK = c_69s + SHA1C03;
501 const u32 w1 = w[ 1] + SHA1C00;
502 const u32 w2 = w[ 2] + SHA1C00;
503 const u32 w3 = w[ 3] + SHA1C00;
504 const u32 w4 = w[ 4] + SHA1C00;
505 const u32 w5 = w[ 5] + SHA1C00;
506 const u32 w6 = w[ 6] + SHA1C00;
507 const u32 w7 = w[ 7] + SHA1C00;
508 const u32 w8 = w[ 8] + SHA1C00;
509 const u32 w9 = w[ 9] + SHA1C00;
510 const u32 wa = w[10] + SHA1C00;
511 const u32 wb = w[11] + SHA1C00;
512 const u32 wc = w[12] + SHA1C00;
513 const u32 wd = w[13] + SHA1C00;
514 const u32 we = w[14] + SHA1C00;
515 const u32 wf = w[15] + SHA1C00;
521 const u32 search[4] =
523 digests_buf[digests_offset].digest_buf[DGST_R0],
524 digests_buf[digests_offset].digest_buf[DGST_R1],
525 digests_buf[digests_offset].digest_buf[DGST_R2],
526 digests_buf[digests_offset].digest_buf[DGST_R3]
533 const u32 e_rev = rotl32 (search[1], 2u);
541 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
543 const u32 w0r = words_buf_r[il_pos];
545 const u32 w0 = w0l | w0r;
547 const u32 w0s01 = rotl32 (w0, 1u);
548 const u32 w0s02 = rotl32 (w0, 2u);
549 const u32 w0s03 = rotl32 (w0, 3u);
550 const u32 w0s04 = rotl32 (w0, 4u);
551 const u32 w0s05 = rotl32 (w0, 5u);
552 const u32 w0s06 = rotl32 (w0, 6u);
553 const u32 w0s07 = rotl32 (w0, 7u);
554 const u32 w0s08 = rotl32 (w0, 8u);
555 const u32 w0s09 = rotl32 (w0, 9u);
556 const u32 w0s10 = rotl32 (w0, 10u);
557 const u32 w0s11 = rotl32 (w0, 11u);
558 const u32 w0s12 = rotl32 (w0, 12u);
559 const u32 w0s13 = rotl32 (w0, 13u);
560 const u32 w0s14 = rotl32 (w0, 14u);
561 const u32 w0s15 = rotl32 (w0, 15u);
562 const u32 w0s16 = rotl32 (w0, 16u);
563 const u32 w0s17 = rotl32 (w0, 17u);
564 const u32 w0s18 = rotl32 (w0, 18u);
565 const u32 w0s19 = rotl32 (w0, 19u);
566 const u32 w0s20 = rotl32 (w0, 20u);
568 const u32 w0s04___w0s06 = w0s04 ^ w0s06;
569 const u32 w0s04___w0s08 = w0s04 ^ w0s08;
570 const u32 w0s08___w0s12 = w0s08 ^ w0s12;
571 const u32 w0s04___w0s06___w0s07 = w0s04___w0s06 ^ w0s07;
582 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0);
583 SHA1_STEPX(SHA1_F0o, e, a, b, c, d, w1);
584 SHA1_STEPX(SHA1_F0o, d, e, a, b, c, w2);
585 SHA1_STEPX(SHA1_F0o, c, d, e, a, b, w3);
586 SHA1_STEPX(SHA1_F0o, b, c, d, e, a, w4);
587 SHA1_STEPX(SHA1_F0o, a, b, c, d, e, w5);
588 SHA1_STEPX(SHA1_F0o, e, a, b, c, d, w6);
589 SHA1_STEPX(SHA1_F0o, d, e, a, b, c, w7);
590 SHA1_STEPX(SHA1_F0o, c, d, e, a, b, w8);
591 SHA1_STEPX(SHA1_F0o, b, c, d, e, a, w9);
592 SHA1_STEPX(SHA1_F0o, a, b, c, d, e, wa);
593 SHA1_STEPX(SHA1_F0o, e, a, b, c, d, wb);
594 SHA1_STEPX(SHA1_F0o, d, e, a, b, c, wc);
595 SHA1_STEPX(SHA1_F0o, c, d, e, a, b, wd);
596 SHA1_STEPX(SHA1_F0o, b, c, d, e, a, we);
597 SHA1_STEPX(SHA1_F0o, a, b, c, d, e, wf);
599 SHA1_STEP (SHA1_F0o, e, a, b, c, d, (c_16s ^ w0s01));
600 SHA1_STEPX(SHA1_F0o, d, e, a, b, c, (c_17sK));
601 SHA1_STEPX(SHA1_F0o, c, d, e, a, b, (c_18sK));
602 SHA1_STEP (SHA1_F0o, b, c, d, e, a, (c_19s ^ w0s02));
607 SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_20sK));
608 SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_21sK));
609 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_22s ^ w0s03));
610 SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_23sK));
611 SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_24s ^ w0s02));
612 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_25s ^ w0s04));
613 SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_26sK));
614 SHA1_STEPX(SHA1_F1 , d, e, a, b, c, (c_27sK));
615 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_28s ^ w0s05));
616 SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_29sK));
617 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_30s ^ w0s02 ^ w0s04));
618 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_31s ^ w0s06));
619 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_32s ^ w0s02 ^ w0s03));
620 SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_33sK));
621 SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_34s ^ w0s07));
622 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_35s ^ w0s04));
623 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_36s ^ w0s04___w0s06));
624 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_37s ^ w0s08));
625 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_38s ^ w0s04));
626 SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_39sK));
631 SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_40s ^ w0s04 ^ w0s09));
632 SHA1_STEPX(SHA1_F2o, e, a, b, c, d, (c_41sK));
633 SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_42s ^ w0s06 ^ w0s08));
634 SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_43s ^ w0s10));
635 SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_44s ^ w0s03 ^ w0s06 ^ w0s07));
636 SHA1_STEPX(SHA1_F2o, a, b, c, d, e, (c_45sK));
637 SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_46s ^ w0s04 ^ w0s11));
638 SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_47s ^ w0s04___w0s08));
639 SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_48s ^ w0s03 ^ w0s04___w0s08 ^ w0s05 ^ w0s10));
640 SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_49s ^ w0s12));
641 SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_50s ^ w0s08));
642 SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_51s ^ w0s04___w0s06));
643 SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_52s ^ w0s04___w0s08 ^ w0s13));
644 SHA1_STEPX(SHA1_F2o, c, d, e, a, b, (c_53sK));
645 SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_54s ^ w0s07 ^ w0s10 ^ w0s12));
646 SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_55s ^ w0s14));
647 SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_56s ^ w0s04___w0s06___w0s07 ^ w0s10 ^ w0s11));
648 SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_57s ^ w0s08));
649 SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_58s ^ w0s04___w0s08 ^ w0s15));
650 SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_59s ^ w0s08___w0s12));
655 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_60s ^ w0s04 ^ w0s08___w0s12 ^ w0s07 ^ w0s14));
656 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_61s ^ w0s16));
657 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_62s ^ w0s04___w0s06 ^ w0s08___w0s12));
658 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_63s ^ w0s08));
659 SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_64s ^ w0s04___w0s06___w0s07 ^ w0s08___w0s12 ^ w0s17));
660 SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_65sK));
661 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_66s ^ w0s14 ^ w0s16));
662 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_67s ^ w0s08 ^ w0s18));
663 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_68s ^ w0s11 ^ w0s14 ^ w0s15));
664 SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_69sK));
665 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_70s ^ w0s12 ^ w0s19));
666 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_71s ^ w0s12 ^ w0s16));
667 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_72s ^ w0s05 ^ w0s11 ^ w0s12 ^ w0s13 ^ w0s16 ^ w0s18));
668 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_73s ^ w0s20));
669 SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_74s ^ w0s08 ^ w0s16));
670 SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_75s ^ w0s06 ^ w0s12 ^ w0s14));
672 const u32 c_76s = rotl32 ((c_73s ^ c_68s ^ c_62s ^ c_60s), 1u);
673 const u32 c_77s = rotl32 ((c_74s ^ c_69s ^ c_63s ^ c_61s), 1u);
674 const u32 c_78s = rotl32 ((c_75s ^ c_70s ^ c_64s ^ c_62s), 1u);
675 const u32 c_79s = rotl32 ((c_76s ^ c_71s ^ c_65s ^ c_63s), 1u);
677 const u32 w0s21 = rotl32 (w0, 21u);
678 const u32 w0s22 = rotl32 (w0, 22U);
680 SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_76s ^ w0s07 ^ w0s08___w0s12 ^ w0s16 ^ w0s21));
681 SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_77s));
682 SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_78s ^ w0s07 ^ w0s08 ^ w0s15 ^ w0s18 ^ w0s20));
683 SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_79s ^ w0s08 ^ w0s22));
696 u32 w5_t = 0x80000000;
717 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t);
718 SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t);
719 SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t);
720 SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t);
721 SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t);
722 SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t);
723 SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t);
724 SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t);
725 SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t);
726 SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t);
727 SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t);
728 SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t);
729 SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t);
730 SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t);
731 SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t);
732 SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t);
733 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t);
734 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t);
735 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t);
736 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t);
741 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t);
742 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t);
743 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t);
744 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t);
745 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t);
746 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t);
747 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t);
748 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t);
749 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t);
750 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t);
751 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t);
752 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t);
753 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t);
754 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t);
755 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t);
756 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t);
757 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t);
758 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t);
759 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t);
760 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t);
765 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t);
766 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t);
767 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t);
768 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t);
769 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t);
770 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t);
771 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t);
772 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t);
773 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t);
774 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t);
775 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t);
776 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t);
777 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t);
778 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t);
779 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t);
780 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t);
781 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t);
782 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t);
783 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t);
784 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t);
789 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t);
790 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t);
791 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t);
792 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t);
793 w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t);
794 w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t);
795 w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t);
796 w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t);
797 w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t);
798 w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t);
799 w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t);
800 w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t);
801 w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t);
802 w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t);
803 wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t);
804 wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t);
806 bool q_cond = allx (e_rev != e);
808 if (q_cond) continue;
810 wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t);
811 wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t);
812 we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t);
813 wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t);
825 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00300_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32 * 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)
831 const u32 gid = get_global_id (0);
833 if (gid >= gid_max) return;
837 w[ 0] = pws[gid].i[ 0];
838 w[ 1] = pws[gid].i[ 1];
839 w[ 2] = pws[gid].i[ 2];
840 w[ 3] = pws[gid].i[ 3];
852 w[15] = pws[gid].i[15];
854 const u32 pw_len = pws[gid].pw_len;
860 m00300m (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);
863 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00300_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32 * 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)
869 const u32 gid = get_global_id (0);
871 if (gid >= gid_max) return;
875 w[ 0] = pws[gid].i[ 0];
876 w[ 1] = pws[gid].i[ 1];
877 w[ 2] = pws[gid].i[ 2];
878 w[ 3] = pws[gid].i[ 3];
879 w[ 4] = pws[gid].i[ 4];
880 w[ 5] = pws[gid].i[ 5];
881 w[ 6] = pws[gid].i[ 6];
882 w[ 7] = pws[gid].i[ 7];
890 w[15] = pws[gid].i[15];
892 const u32 pw_len = pws[gid].pw_len;
898 m00300m (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);
901 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00300_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32 * 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)
907 const u32 gid = get_global_id (0);
909 if (gid >= gid_max) return;
913 w[ 0] = pws[gid].i[ 0];
914 w[ 1] = pws[gid].i[ 1];
915 w[ 2] = pws[gid].i[ 2];
916 w[ 3] = pws[gid].i[ 3];
917 w[ 4] = pws[gid].i[ 4];
918 w[ 5] = pws[gid].i[ 5];
919 w[ 6] = pws[gid].i[ 6];
920 w[ 7] = pws[gid].i[ 7];
921 w[ 8] = pws[gid].i[ 8];
922 w[ 9] = pws[gid].i[ 9];
923 w[10] = pws[gid].i[10];
924 w[11] = pws[gid].i[11];
925 w[12] = pws[gid].i[12];
926 w[13] = pws[gid].i[13];
927 w[14] = pws[gid].i[14];
928 w[15] = pws[gid].i[15];
930 const u32 pw_len = pws[gid].pw_len;
936 m00300m (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);
939 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00300_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32 * 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)
945 const u32 gid = get_global_id (0);
947 if (gid >= gid_max) return;
951 w[ 0] = pws[gid].i[ 0];
952 w[ 1] = pws[gid].i[ 1];
953 w[ 2] = pws[gid].i[ 2];
954 w[ 3] = pws[gid].i[ 3];
966 w[15] = pws[gid].i[15];
968 const u32 pw_len = pws[gid].pw_len;
974 m00300s (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);
977 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00300_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32 * 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)
983 const u32 gid = get_global_id (0);
985 if (gid >= gid_max) return;
989 w[ 0] = pws[gid].i[ 0];
990 w[ 1] = pws[gid].i[ 1];
991 w[ 2] = pws[gid].i[ 2];
992 w[ 3] = pws[gid].i[ 3];
993 w[ 4] = pws[gid].i[ 4];
994 w[ 5] = pws[gid].i[ 5];
995 w[ 6] = pws[gid].i[ 6];
996 w[ 7] = pws[gid].i[ 7];
1004 w[15] = pws[gid].i[15];
1006 const u32 pw_len = pws[gid].pw_len;
1012 m00300s (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);
1015 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00300_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32 * 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)
1021 const u32 gid = get_global_id (0);
1023 if (gid >= gid_max) return;
1027 w[ 0] = pws[gid].i[ 0];
1028 w[ 1] = pws[gid].i[ 1];
1029 w[ 2] = pws[gid].i[ 2];
1030 w[ 3] = pws[gid].i[ 3];
1031 w[ 4] = pws[gid].i[ 4];
1032 w[ 5] = pws[gid].i[ 5];
1033 w[ 6] = pws[gid].i[ 6];
1034 w[ 7] = pws[gid].i[ 7];
1035 w[ 8] = pws[gid].i[ 8];
1036 w[ 9] = pws[gid].i[ 9];
1037 w[10] = pws[gid].i[10];
1038 w[11] = pws[gid].i[11];
1039 w[12] = pws[gid].i[12];
1040 w[13] = pws[gid].i[13];
1041 w[14] = pws[gid].i[14];
1042 w[15] = pws[gid].i[15];
1044 const u32 pw_len = pws[gid].pw_len;
1050 m00300s (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);