2 * Author......: Jens Steube <jens.steube@gmail.com>
10 #include "include/constants.h"
11 #include "include/kernel_vendor.h"
18 #include "include/kernel_functions.c"
19 #include "OpenCL/types_ocl.c"
20 #include "OpenCL/common.c"
21 #include "OpenCL/simd.c"
24 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
26 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
28 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
30 #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])
33 static void m02710m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
39 const u32 gid = get_global_id (0);
40 const u32 lid = get_local_id (0);
48 s[0] = salt_bufs[salt_pos].salt_buf[0];
49 s[1] = salt_bufs[salt_pos].salt_buf[1];
50 s[2] = salt_bufs[salt_pos].salt_buf[2];
51 s[3] = salt_bufs[salt_pos].salt_buf[3];
52 s[4] = salt_bufs[salt_pos].salt_buf[4];
53 s[5] = salt_bufs[salt_pos].salt_buf[5];
54 s[6] = salt_bufs[salt_pos].salt_buf[6];
55 s[7] = salt_bufs[salt_pos].salt_buf[7];
57 const u32 salt_len = salt_bufs[salt_pos].salt_len;
59 const u32 r_14 = (32 + salt_len) * 8;
67 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
69 const u32x w0r = w0r_create_bft (bfs_buf, il_pos);
71 const u32x w0lr = w0l | w0r;
106 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
107 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
108 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
109 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
110 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
111 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
112 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
113 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
114 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
115 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
116 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
117 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
118 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
119 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
120 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
121 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
123 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
124 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
125 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
126 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
127 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
128 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
129 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
130 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
131 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
132 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
133 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
134 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
135 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
136 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
137 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
138 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
140 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
141 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
142 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
143 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
144 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
145 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
146 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
147 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
148 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
149 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
150 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
151 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
152 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
153 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
154 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
155 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
157 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
158 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
159 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
160 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
161 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
162 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
163 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
164 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
165 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
166 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
167 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
168 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
169 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
170 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
171 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
172 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
179 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
180 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
181 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
182 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
183 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
184 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
185 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
186 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
187 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
188 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
189 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
190 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
191 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
192 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
193 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
194 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
211 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
212 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
213 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
214 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
215 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
216 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
217 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
218 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
219 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
220 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
221 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
222 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
223 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
224 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
225 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
226 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
228 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
229 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
230 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
231 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
232 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
233 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
234 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
235 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
236 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
237 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
238 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
239 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
240 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
241 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
242 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
243 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
245 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
246 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
247 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
248 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
249 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
250 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
251 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
252 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
253 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
254 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
255 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
256 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
257 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
258 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
259 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
260 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
262 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
263 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
264 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
265 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
266 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
267 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
268 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
269 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
270 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
271 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
272 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
273 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
274 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
275 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
276 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
277 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
279 const u32x r_a = a + MD5M_A;
280 const u32x r_b = b + MD5M_B;
281 const u32x r_c = c + MD5M_C;
282 const u32x r_d = d + MD5M_D;
289 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C00, MD5S00);
290 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
291 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
292 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
293 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
294 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
295 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
296 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
297 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
298 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
299 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
300 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
301 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
302 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
303 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
304 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
306 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
307 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
308 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
309 MD5_STEP0(MD5_Go, b, c, d, a, MD5C13, MD5S13);
310 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
311 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
312 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
313 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
314 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
315 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
316 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
317 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
318 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
319 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
320 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
321 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
323 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
324 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
325 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
326 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
327 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
328 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
329 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
330 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
331 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
332 MD5_STEP0(MD5_H , d, a, b, c, MD5C29, MD5S21);
333 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
334 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
335 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
336 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
337 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
338 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
340 MD5_STEP0(MD5_I , a, b, c, d, MD5C30, MD5S30);
341 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
342 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
343 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
344 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
345 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
346 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
347 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
348 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
349 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
350 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
351 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
352 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
353 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
354 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
355 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
362 COMPARE_M_SIMD (a, d, c, b);
366 static void m02710s (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
372 const u32 gid = get_global_id (0);
373 const u32 lid = get_local_id (0);
379 const u32 search[4] =
381 digests_buf[digests_offset].digest_buf[DGST_R0],
382 digests_buf[digests_offset].digest_buf[DGST_R1],
383 digests_buf[digests_offset].digest_buf[DGST_R2],
384 digests_buf[digests_offset].digest_buf[DGST_R3]
393 s[0] = salt_bufs[salt_pos].salt_buf[0];
394 s[1] = salt_bufs[salt_pos].salt_buf[1];
395 s[2] = salt_bufs[salt_pos].salt_buf[2];
396 s[3] = salt_bufs[salt_pos].salt_buf[3];
397 s[4] = salt_bufs[salt_pos].salt_buf[4];
398 s[5] = salt_bufs[salt_pos].salt_buf[5];
399 s[6] = salt_bufs[salt_pos].salt_buf[6];
400 s[7] = salt_bufs[salt_pos].salt_buf[7];
402 const u32 salt_len = salt_bufs[salt_pos].salt_len;
404 const u32 r_14 = (32 + salt_len) * 8;
412 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
414 const u32x w0r = w0r_create_bft (bfs_buf, il_pos);
416 const u32x w0lr = w0l | w0r;
451 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
452 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
453 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
454 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
455 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
456 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
457 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
458 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
459 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
460 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
461 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
462 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
463 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
464 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
465 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
466 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
468 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
469 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
470 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
471 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
472 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
473 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
474 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
475 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
476 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
477 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
478 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
479 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
480 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
481 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
482 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
483 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
485 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
486 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
487 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
488 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
489 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
490 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
491 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
492 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
493 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
494 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
495 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
496 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
497 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
498 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
499 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
500 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
502 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
503 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
504 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
505 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
506 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
507 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
508 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
509 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
510 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
511 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
512 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
513 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
514 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
515 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
516 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
517 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
524 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
525 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
526 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
527 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
528 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
529 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
530 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
531 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
532 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
533 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
534 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
535 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
536 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
537 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
538 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
539 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
556 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
557 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
558 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
559 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
560 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
561 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
562 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
563 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
564 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
565 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
566 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
567 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
568 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
569 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
570 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
571 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
573 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
574 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
575 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
576 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
577 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
578 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
579 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
580 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
581 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
582 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
583 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
584 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
585 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
586 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
587 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
588 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
590 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
591 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
592 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
593 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
594 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
595 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
596 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
597 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
598 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
599 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
600 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
601 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
602 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
603 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
604 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
605 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
607 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
608 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
609 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
610 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
611 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
612 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
613 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
614 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
615 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
616 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
617 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
618 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
619 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
620 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
621 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
622 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
624 const u32x r_a = a + MD5M_A;
625 const u32x r_b = b + MD5M_B;
626 const u32x r_c = c + MD5M_C;
627 const u32x r_d = d + MD5M_D;
634 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C00, MD5S00);
635 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
636 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
637 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
638 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
639 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
640 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
641 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
642 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
643 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
644 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
645 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
646 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
647 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
648 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
649 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
651 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
652 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
653 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
654 MD5_STEP0(MD5_Go, b, c, d, a, MD5C13, MD5S13);
655 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
656 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
657 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
658 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
659 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
660 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
661 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
662 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
663 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
664 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
665 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
666 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
668 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
669 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
670 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
671 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
672 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
673 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
674 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
675 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
676 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
677 MD5_STEP0(MD5_H , d, a, b, c, MD5C29, MD5S21);
678 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
679 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
680 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
681 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
682 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
683 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
685 MD5_STEP0(MD5_I , a, b, c, d, MD5C30, MD5S30);
686 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
687 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
688 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
689 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
690 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
691 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
692 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
693 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
694 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
695 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
696 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
697 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
699 if (MATCHES_NONE_VS ((a + r_a), search[0])) continue;
701 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
702 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
703 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
710 COMPARE_S_SIMD (a, d, c, b);
714 __kernel void m02710_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
720 const u32 gid = get_global_id (0);
721 const u32 lid = get_local_id (0);
722 const u32 lsz = get_local_size (0);
730 w0[0] = pws[gid].i[ 0];
731 w0[1] = pws[gid].i[ 1];
732 w0[2] = pws[gid].i[ 2];
733 w0[3] = pws[gid].i[ 3];
753 w3[2] = pws[gid].i[14];
756 const u32 pw_len = pws[gid].pw_len;
762 __local u32 l_bin2asc[256];
764 for (u32 i = lid; i < 256; i += lsz)
766 const u32 i0 = (i >> 0) & 15;
767 const u32 i1 = (i >> 4) & 15;
769 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
770 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
773 barrier (CLK_LOCAL_MEM_FENCE);
775 if (gid >= gid_max) return;
781 m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
784 __kernel void m02710_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_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);
791 const u32 lid = get_local_id (0);
792 const u32 lsz = get_local_size (0);
800 w0[0] = pws[gid].i[ 0];
801 w0[1] = pws[gid].i[ 1];
802 w0[2] = pws[gid].i[ 2];
803 w0[3] = pws[gid].i[ 3];
807 w1[0] = pws[gid].i[ 4];
808 w1[1] = pws[gid].i[ 5];
809 w1[2] = pws[gid].i[ 6];
810 w1[3] = pws[gid].i[ 7];
823 w3[2] = pws[gid].i[14];
826 const u32 pw_len = pws[gid].pw_len;
832 __local u32 l_bin2asc[256];
834 for (u32 i = lid; i < 256; i += lsz)
836 const u32 i0 = (i >> 0) & 15;
837 const u32 i1 = (i >> 4) & 15;
839 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
840 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
843 barrier (CLK_LOCAL_MEM_FENCE);
845 if (gid >= gid_max) return;
851 m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
854 __kernel void m02710_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
860 const u32 gid = get_global_id (0);
861 const u32 lid = get_local_id (0);
862 const u32 lsz = get_local_size (0);
870 w0[0] = pws[gid].i[ 0];
871 w0[1] = pws[gid].i[ 1];
872 w0[2] = pws[gid].i[ 2];
873 w0[3] = pws[gid].i[ 3];
877 w1[0] = pws[gid].i[ 4];
878 w1[1] = pws[gid].i[ 5];
879 w1[2] = pws[gid].i[ 6];
880 w1[3] = pws[gid].i[ 7];
884 w2[0] = pws[gid].i[ 8];
885 w2[1] = pws[gid].i[ 9];
886 w2[2] = pws[gid].i[10];
887 w2[3] = pws[gid].i[11];
891 w3[0] = pws[gid].i[12];
892 w3[1] = pws[gid].i[13];
893 w3[2] = pws[gid].i[14];
894 w3[3] = pws[gid].i[15];
896 const u32 pw_len = pws[gid].pw_len;
902 __local u32 l_bin2asc[256];
904 for (u32 i = lid; i < 256; i += lsz)
906 const u32 i0 = (i >> 0) & 15;
907 const u32 i1 = (i >> 4) & 15;
909 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
910 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
913 barrier (CLK_LOCAL_MEM_FENCE);
915 if (gid >= gid_max) return;
921 m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
924 __kernel void m02710_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
930 const u32 gid = get_global_id (0);
931 const u32 lid = get_local_id (0);
932 const u32 lsz = get_local_size (0);
940 w0[0] = pws[gid].i[ 0];
941 w0[1] = pws[gid].i[ 1];
942 w0[2] = pws[gid].i[ 2];
943 w0[3] = pws[gid].i[ 3];
963 w3[2] = pws[gid].i[14];
966 const u32 pw_len = pws[gid].pw_len;
972 __local u32 l_bin2asc[256];
974 for (u32 i = lid; i < 256; i += lsz)
976 const u32 i0 = (i >> 0) & 15;
977 const u32 i1 = (i >> 4) & 15;
979 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
980 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
983 barrier (CLK_LOCAL_MEM_FENCE);
985 if (gid >= gid_max) return;
991 m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
994 __kernel void m02710_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
1000 const u32 gid = get_global_id (0);
1001 const u32 lid = get_local_id (0);
1002 const u32 lsz = get_local_size (0);
1010 w0[0] = pws[gid].i[ 0];
1011 w0[1] = pws[gid].i[ 1];
1012 w0[2] = pws[gid].i[ 2];
1013 w0[3] = pws[gid].i[ 3];
1017 w1[0] = pws[gid].i[ 4];
1018 w1[1] = pws[gid].i[ 5];
1019 w1[2] = pws[gid].i[ 6];
1020 w1[3] = pws[gid].i[ 7];
1033 w3[2] = pws[gid].i[14];
1036 const u32 pw_len = pws[gid].pw_len;
1042 __local u32 l_bin2asc[256];
1044 for (u32 i = lid; i < 256; i += lsz)
1046 const u32 i0 = (i >> 0) & 15;
1047 const u32 i1 = (i >> 4) & 15;
1049 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
1050 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
1053 barrier (CLK_LOCAL_MEM_FENCE);
1055 if (gid >= gid_max) return;
1061 m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
1064 __kernel void m02710_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
1070 const u32 gid = get_global_id (0);
1071 const u32 lid = get_local_id (0);
1072 const u32 lsz = get_local_size (0);
1080 w0[0] = pws[gid].i[ 0];
1081 w0[1] = pws[gid].i[ 1];
1082 w0[2] = pws[gid].i[ 2];
1083 w0[3] = pws[gid].i[ 3];
1087 w1[0] = pws[gid].i[ 4];
1088 w1[1] = pws[gid].i[ 5];
1089 w1[2] = pws[gid].i[ 6];
1090 w1[3] = pws[gid].i[ 7];
1094 w2[0] = pws[gid].i[ 8];
1095 w2[1] = pws[gid].i[ 9];
1096 w2[2] = pws[gid].i[10];
1097 w2[3] = pws[gid].i[11];
1101 w3[0] = pws[gid].i[12];
1102 w3[1] = pws[gid].i[13];
1103 w3[2] = pws[gid].i[14];
1104 w3[3] = pws[gid].i[15];
1106 const u32 pw_len = pws[gid].pw_len;
1112 __local u32 l_bin2asc[256];
1114 for (u32 i = lid; i < 256; i += lsz)
1116 const u32 i0 = (i >> 0) & 15;
1117 const u32 i1 = (i >> 4) & 15;
1119 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
1120 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
1123 barrier (CLK_LOCAL_MEM_FENCE);
1125 if (gid >= gid_max) return;
1131 m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);