2 * Authors.....: Jens Steube <jens.steube@gmail.com>
3 * Gabriele Gristina <matrix@hashcat.net>
4 * magnum <john.magnum@hushmail.com>
13 #include "inc_vendor.cl"
14 #include "inc_hash_constants.h"
15 #include "inc_hash_functions.cl"
16 #include "inc_types.cl"
17 #include "inc_common.cl"
18 #include "inc_simd.cl"
21 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
23 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
25 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
27 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
29 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf])
32 void m02610m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_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, __local u32 *l_bin2asc)
38 const u32 gid = get_global_id (0);
39 const u32 lid = get_local_id (0);
50 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
51 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
52 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
53 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
54 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
55 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
67 const u32 salt_len = salt_bufs[salt_pos].salt_len;
75 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
77 const u32x w0r = ix_create_bft (bfs_buf, il_pos);
79 const u32x w0lr = w0l | w0r;
112 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
113 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
114 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
115 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
116 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
117 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
118 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
119 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
120 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
121 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
122 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
123 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
124 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
125 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
126 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
127 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
129 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
130 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
131 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
132 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
133 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
134 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
135 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
136 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
137 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
138 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
139 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
140 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
141 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
142 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
143 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
144 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
146 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
147 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
148 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
149 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
150 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
151 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
152 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
153 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
154 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
155 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
156 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
157 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
158 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
159 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
160 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
161 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
163 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
164 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
165 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
166 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
167 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
168 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
169 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
170 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
171 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
172 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
173 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
174 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
175 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
176 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
177 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
178 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
185 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
186 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
187 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
188 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
189 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
190 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
191 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
192 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
193 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
194 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
195 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
196 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
197 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
198 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
199 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
200 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
202 w2_t[0] = salt_buf0[0];
203 w2_t[1] = salt_buf0[1];
204 w2_t[2] = salt_buf0[2];
205 w2_t[3] = salt_buf0[3];
206 w3_t[0] = salt_buf1[0];
207 w3_t[1] = salt_buf1[1];
208 w3_t[2] = (32 + salt_len) * 8;
216 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
217 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
218 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
219 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
220 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
221 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
222 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
223 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
224 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
225 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
226 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
227 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
228 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
229 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
230 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
231 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
233 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
234 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
235 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
236 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
237 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
238 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
239 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
240 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
241 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
242 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
243 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
244 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
245 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
246 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
247 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
248 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
250 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
251 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
252 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
253 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
254 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
255 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
256 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
257 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
258 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
259 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
260 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
261 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
262 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
263 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
264 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
265 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
267 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
268 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
269 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
270 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
271 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
272 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
273 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
274 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
275 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
276 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
277 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
278 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
279 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
280 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
281 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
282 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
284 COMPARE_M_SIMD (a, d, c, b);
288 void m02610s (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_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, __local u32 *l_bin2asc)
294 const u32 gid = get_global_id (0);
295 const u32 lid = get_local_id (0);
306 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[0];
307 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[1];
308 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[2];
309 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[3];
310 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[4];
311 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[5];
323 const u32 salt_len = salt_bufs[salt_pos].salt_len;
329 const u32 search[4] =
331 digests_buf[digests_offset].digest_buf[DGST_R0],
332 digests_buf[digests_offset].digest_buf[DGST_R1],
333 digests_buf[digests_offset].digest_buf[DGST_R2],
334 digests_buf[digests_offset].digest_buf[DGST_R3]
343 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
345 const u32x w0r = ix_create_bft (bfs_buf, il_pos);
347 const u32x w0lr = w0l | w0r;
380 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
381 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
382 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
383 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
384 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
385 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
386 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
387 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
388 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
389 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
390 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
391 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
392 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
393 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
394 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
395 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
397 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
398 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
399 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
400 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
401 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
402 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
403 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
404 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
405 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
406 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
407 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
408 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
409 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
410 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
411 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
412 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
414 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
415 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
416 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
417 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
418 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
419 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
420 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
421 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
422 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
423 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
424 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
425 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
426 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
427 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
428 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
429 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
431 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
432 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
433 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
434 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
435 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
436 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
437 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
438 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
439 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
440 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
441 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
442 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
443 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
444 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
445 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
446 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
453 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
454 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
455 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
456 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
457 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
458 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
459 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
460 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
461 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
462 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
463 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
464 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
465 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
466 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
467 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
468 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
470 w2_t[0] = salt_buf0[0];
471 w2_t[1] = salt_buf0[1];
472 w2_t[2] = salt_buf0[2];
473 w2_t[3] = salt_buf0[3];
474 w3_t[0] = salt_buf1[0];
475 w3_t[1] = salt_buf1[1];
476 w3_t[2] = (32 + salt_len) * 8;
484 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
485 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
486 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
487 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
488 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
489 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
490 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
491 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
492 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
493 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
494 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
495 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
496 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
497 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
498 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
499 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
501 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
502 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
503 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
504 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
505 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
506 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
507 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
508 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
509 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
510 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
511 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
512 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
513 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
514 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
515 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
516 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
518 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
519 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
520 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
521 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
522 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
523 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
524 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
525 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
526 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
527 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
528 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
529 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
530 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
531 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
532 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
533 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
535 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
536 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
537 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
538 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
539 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
540 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
541 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
542 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
543 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
544 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
545 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
546 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
547 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
549 if (MATCHES_NONE_VS (a, search[0])) continue;
551 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
552 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
553 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
555 COMPARE_S_SIMD (a, d, c, b);
560 __kernel void m02610_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_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)
566 const u32 gid = get_global_id (0);
567 const u32 lid = get_local_id (0);
568 const u32 lsz = get_local_size (0);
576 w0[0] = pws[gid].i[ 0];
577 w0[1] = pws[gid].i[ 1];
578 w0[2] = pws[gid].i[ 2];
579 w0[3] = pws[gid].i[ 3];
599 w3[2] = pws[gid].i[14];
602 const u32 pw_len = pws[gid].pw_len;
608 __local u32 l_bin2asc[256];
610 for (u32 i = lid; i < 256; i += lsz)
612 const u32 i0 = (i >> 0) & 15;
613 const u32 i1 = (i >> 4) & 15;
615 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
616 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
619 barrier (CLK_LOCAL_MEM_FENCE);
621 if (gid >= gid_max) return;
627 m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_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, l_bin2asc);
630 __kernel void m02610_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_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)
636 const u32 gid = get_global_id (0);
637 const u32 lid = get_local_id (0);
638 const u32 lsz = get_local_size (0);
646 w0[0] = pws[gid].i[ 0];
647 w0[1] = pws[gid].i[ 1];
648 w0[2] = pws[gid].i[ 2];
649 w0[3] = pws[gid].i[ 3];
653 w1[0] = pws[gid].i[ 4];
654 w1[1] = pws[gid].i[ 5];
655 w1[2] = pws[gid].i[ 6];
656 w1[3] = pws[gid].i[ 7];
669 w3[2] = pws[gid].i[14];
672 const u32 pw_len = pws[gid].pw_len;
678 __local u32 l_bin2asc[256];
680 for (u32 i = lid; i < 256; i += lsz)
682 const u32 i0 = (i >> 0) & 15;
683 const u32 i1 = (i >> 4) & 15;
685 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
686 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
689 barrier (CLK_LOCAL_MEM_FENCE);
691 if (gid >= gid_max) return;
697 m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_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, l_bin2asc);
700 __kernel void m02610_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_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)
706 const u32 gid = get_global_id (0);
707 const u32 lid = get_local_id (0);
708 const u32 lsz = get_local_size (0);
716 w0[0] = pws[gid].i[ 0];
717 w0[1] = pws[gid].i[ 1];
718 w0[2] = pws[gid].i[ 2];
719 w0[3] = pws[gid].i[ 3];
723 w1[0] = pws[gid].i[ 4];
724 w1[1] = pws[gid].i[ 5];
725 w1[2] = pws[gid].i[ 6];
726 w1[3] = pws[gid].i[ 7];
730 w2[0] = pws[gid].i[ 8];
731 w2[1] = pws[gid].i[ 9];
732 w2[2] = pws[gid].i[10];
733 w2[3] = pws[gid].i[11];
737 w3[0] = pws[gid].i[12];
738 w3[1] = pws[gid].i[13];
739 w3[2] = pws[gid].i[14];
740 w3[3] = pws[gid].i[15];
742 const u32 pw_len = pws[gid].pw_len;
748 __local u32 l_bin2asc[256];
750 for (u32 i = lid; i < 256; i += lsz)
752 const u32 i0 = (i >> 0) & 15;
753 const u32 i1 = (i >> 4) & 15;
755 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
756 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
759 barrier (CLK_LOCAL_MEM_FENCE);
761 if (gid >= gid_max) return;
767 m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_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, l_bin2asc);
770 __kernel void m02610_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_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)
776 const u32 gid = get_global_id (0);
777 const u32 lid = get_local_id (0);
778 const u32 lsz = get_local_size (0);
786 w0[0] = pws[gid].i[ 0];
787 w0[1] = pws[gid].i[ 1];
788 w0[2] = pws[gid].i[ 2];
789 w0[3] = pws[gid].i[ 3];
809 w3[2] = pws[gid].i[14];
812 const u32 pw_len = pws[gid].pw_len;
818 __local u32 l_bin2asc[256];
820 for (u32 i = lid; i < 256; i += lsz)
822 const u32 i0 = (i >> 0) & 15;
823 const u32 i1 = (i >> 4) & 15;
825 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
826 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
829 barrier (CLK_LOCAL_MEM_FENCE);
831 if (gid >= gid_max) return;
837 m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_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, l_bin2asc);
840 __kernel void m02610_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_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)
846 const u32 gid = get_global_id (0);
847 const u32 lid = get_local_id (0);
848 const u32 lsz = get_local_size (0);
856 w0[0] = pws[gid].i[ 0];
857 w0[1] = pws[gid].i[ 1];
858 w0[2] = pws[gid].i[ 2];
859 w0[3] = pws[gid].i[ 3];
863 w1[0] = pws[gid].i[ 4];
864 w1[1] = pws[gid].i[ 5];
865 w1[2] = pws[gid].i[ 6];
866 w1[3] = pws[gid].i[ 7];
879 w3[2] = pws[gid].i[14];
882 const u32 pw_len = pws[gid].pw_len;
888 __local u32 l_bin2asc[256];
890 for (u32 i = lid; i < 256; i += lsz)
892 const u32 i0 = (i >> 0) & 15;
893 const u32 i1 = (i >> 4) & 15;
895 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
896 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
899 barrier (CLK_LOCAL_MEM_FENCE);
901 if (gid >= gid_max) return;
907 m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_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, l_bin2asc);
910 __kernel void m02610_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_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)
916 const u32 gid = get_global_id (0);
917 const u32 lid = get_local_id (0);
918 const u32 lsz = get_local_size (0);
926 w0[0] = pws[gid].i[ 0];
927 w0[1] = pws[gid].i[ 1];
928 w0[2] = pws[gid].i[ 2];
929 w0[3] = pws[gid].i[ 3];
933 w1[0] = pws[gid].i[ 4];
934 w1[1] = pws[gid].i[ 5];
935 w1[2] = pws[gid].i[ 6];
936 w1[3] = pws[gid].i[ 7];
940 w2[0] = pws[gid].i[ 8];
941 w2[1] = pws[gid].i[ 9];
942 w2[2] = pws[gid].i[10];
943 w2[3] = pws[gid].i[11];
947 w3[0] = pws[gid].i[12];
948 w3[1] = pws[gid].i[13];
949 w3[2] = pws[gid].i[14];
950 w3[3] = pws[gid].i[15];
952 const u32 pw_len = pws[gid].pw_len;
958 __local u32 l_bin2asc[256];
960 for (u32 i = lid; i < 256; i += lsz)
962 const u32 i0 = (i >> 0) & 15;
963 const u32 i1 = (i >> 4) & 15;
965 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
966 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
969 barrier (CLK_LOCAL_MEM_FENCE);
971 if (gid >= gid_max) return;
977 m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_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, l_bin2asc);