2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
28 #include "include/kernel_functions.c"
29 #include "types_amd.c"
30 #include "common_amd.c"
33 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
34 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
38 #define VECT_COMPARE_S "check_single_vect2_comp4.c"
39 #define VECT_COMPARE_M "check_multi_vect2_comp4.c"
43 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
44 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
48 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
52 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
56 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
59 static void m11100m (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, __global pw_t *pws, __global gpu_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])
65 const u32 gid = get_global_id (0);
66 const u32 lid = get_local_id (0);
74 challenge = salt_bufs[salt_pos].salt_buf[0];
82 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug
83 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
84 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
85 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
89 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
90 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
91 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
92 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
108 const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
110 switch_buffer_by_offset (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len);
112 const u32 pw_salt_len = pw_len + salt_len;
120 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
122 const u32 w0r = bfs_buf[il_pos].i;
128 w0_t[0] = w0[0] | salt_buf0[0];
129 w0_t[1] = w0[1] | salt_buf0[1];
130 w0_t[2] = w0[2] | salt_buf0[2];
131 w0_t[3] = w0[3] | salt_buf0[3];
135 w1_t[0] = w1[0] | salt_buf1[0];
136 w1_t[1] = w1[1] | salt_buf1[1];
137 w1_t[2] = w1[2] | salt_buf1[2];
138 w1_t[3] = w1[3] | salt_buf1[3];
142 w2_t[0] = w2[0] | salt_buf2[0];
143 w2_t[1] = w2[1] | salt_buf2[1];
144 w2_t[2] = w2[2] | salt_buf2[2];
145 w2_t[3] = w2[3] | salt_buf2[3];
149 w3_t[0] = w3[0] | salt_buf3[0];
150 w3_t[1] = w3[1] | salt_buf3[1];
151 w3_t[2] = pw_salt_len * 8;
163 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
164 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
165 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
166 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
167 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
168 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
169 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
170 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
171 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
172 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
173 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
174 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
175 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
176 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
177 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
178 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
180 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
181 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
182 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
183 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
184 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
185 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
186 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
187 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
188 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
189 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
190 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
191 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
192 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
193 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
194 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
195 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
197 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
198 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
199 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
200 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
201 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
202 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
203 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
204 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
205 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
206 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
207 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
208 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
209 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
210 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
211 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
212 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
214 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
215 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
216 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
217 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
218 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
219 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
220 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
221 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
222 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
223 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
224 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
225 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
226 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
227 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
228 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
229 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
236 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
237 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
238 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
239 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
240 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
241 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
242 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
243 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
244 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
245 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
246 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
247 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
248 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
249 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
250 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
251 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
253 // add the 4 byte challenge here
256 w2_t[1] = 0x00000080;
262 w3_t[2] = (32 + 4) * 8;
266 * md5 ($hash.$challenge)
274 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
275 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
276 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
277 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
278 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
279 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
280 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
281 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
282 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
283 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
284 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
285 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
286 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
287 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
288 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
289 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
291 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
292 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
293 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
294 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
295 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
296 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
297 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
298 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
299 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
300 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
301 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
302 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
303 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
304 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
305 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
306 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
308 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
309 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
310 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
311 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
312 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
313 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
314 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
315 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
316 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
317 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
318 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
319 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
320 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
321 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
322 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
323 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
325 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
326 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
327 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
328 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
329 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
330 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
331 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
332 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
333 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
334 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
335 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
336 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
337 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
338 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
339 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
340 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
347 #include VECT_COMPARE_M
351 static void m11100s (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, __global pw_t *pws, __global gpu_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])
357 const u32 gid = get_global_id (0);
358 const u32 lid = get_local_id (0);
364 const u32 search[4] =
366 digests_buf[digests_offset].digest_buf[DGST_R0],
367 digests_buf[digests_offset].digest_buf[DGST_R1],
368 digests_buf[digests_offset].digest_buf[DGST_R2],
369 digests_buf[digests_offset].digest_buf[DGST_R3]
378 challenge = salt_bufs[salt_pos].salt_buf[0];
386 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug
387 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
388 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
389 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
393 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
394 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
395 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
396 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
412 const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
414 switch_buffer_by_offset (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len);
416 const u32 pw_salt_len = pw_len + salt_len;
424 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
426 const u32 w0r = bfs_buf[il_pos].i;
432 w0_t[0] = w0[0] | salt_buf0[0];
433 w0_t[1] = w0[1] | salt_buf0[1];
434 w0_t[2] = w0[2] | salt_buf0[2];
435 w0_t[3] = w0[3] | salt_buf0[3];
439 w1_t[0] = w1[0] | salt_buf1[0];
440 w1_t[1] = w1[1] | salt_buf1[1];
441 w1_t[2] = w1[2] | salt_buf1[2];
442 w1_t[3] = w1[3] | salt_buf1[3];
446 w2_t[0] = w2[0] | salt_buf2[0];
447 w2_t[1] = w2[1] | salt_buf2[1];
448 w2_t[2] = w2[2] | salt_buf2[2];
449 w2_t[3] = w2[3] | salt_buf2[3];
453 w3_t[0] = w3[0] | salt_buf3[0];
454 w3_t[1] = w3[1] | salt_buf3[1];
455 w3_t[2] = pw_salt_len * 8;
467 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
468 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
469 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
470 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
471 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
472 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
473 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
474 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
475 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
476 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
477 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
478 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
479 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
480 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
481 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
482 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
484 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
485 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
486 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
487 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
488 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
489 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
490 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
491 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
492 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
493 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
494 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
495 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
496 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
497 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
498 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
499 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
501 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
502 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
503 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
504 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
505 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
506 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
507 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
508 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
509 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
510 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
511 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
512 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
513 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
514 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
515 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
516 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
518 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
519 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
520 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
521 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
522 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
523 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
524 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
525 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
526 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
527 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
528 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
529 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
530 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
531 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
532 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
533 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
540 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
541 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
542 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
543 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
544 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
545 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
546 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
547 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
548 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
549 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
550 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
551 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
552 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
553 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
554 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
555 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
557 // add the 4 byte challenge here
560 w2_t[1] = 0x00000080;
566 w3_t[2] = (32 + 4) * 8;
570 * md5 ($hash.$challenge)
578 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
579 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
580 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
581 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
582 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
583 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
584 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
585 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
586 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
587 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
588 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
589 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
590 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
591 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
592 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
593 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
595 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
596 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
597 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
598 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
599 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
600 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
601 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
602 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
603 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
604 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
605 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
606 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
607 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
608 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
609 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
610 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
612 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
613 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
614 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
615 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
616 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
617 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
618 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
619 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
620 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
621 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
622 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
623 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
624 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
625 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
626 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
627 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
629 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
630 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
631 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
632 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
633 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
634 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
635 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
636 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
637 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
638 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
639 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
640 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
641 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
642 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
643 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
644 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
651 #include VECT_COMPARE_S
655 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11100_m04 (__global pw_t *pws, __global gpu_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)
661 const u32 gid = get_global_id (0);
667 const u32 lid = get_local_id (0);
671 w0[0] = pws[gid].i[ 0];
672 w0[1] = pws[gid].i[ 1];
673 w0[2] = pws[gid].i[ 2];
674 w0[3] = pws[gid].i[ 3];
694 w3[2] = pws[gid].i[14];
697 const u32 pw_len = pws[gid].pw_len;
703 __local u32 l_bin2asc[256];
705 const u32 lid4 = lid * 4;
707 const u32 lid40 = lid4 + 0;
708 const u32 lid41 = lid4 + 1;
709 const u32 lid42 = lid4 + 2;
710 const u32 lid43 = lid4 + 3;
712 const u32 v400 = (lid40 >> 0) & 15;
713 const u32 v401 = (lid40 >> 4) & 15;
714 const u32 v410 = (lid41 >> 0) & 15;
715 const u32 v411 = (lid41 >> 4) & 15;
716 const u32 v420 = (lid42 >> 0) & 15;
717 const u32 v421 = (lid42 >> 4) & 15;
718 const u32 v430 = (lid43 >> 0) & 15;
719 const u32 v431 = (lid43 >> 4) & 15;
721 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
722 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
723 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
724 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
725 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
726 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
727 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
728 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
730 barrier (CLK_LOCAL_MEM_FENCE);
732 if (gid >= gid_max) return;
738 m11100m (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);
741 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11100_m08 (__global pw_t *pws, __global gpu_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)
747 const u32 gid = get_global_id (0);
753 const u32 lid = get_local_id (0);
757 w0[0] = pws[gid].i[ 0];
758 w0[1] = pws[gid].i[ 1];
759 w0[2] = pws[gid].i[ 2];
760 w0[3] = pws[gid].i[ 3];
764 w1[0] = pws[gid].i[ 4];
765 w1[1] = pws[gid].i[ 5];
766 w1[2] = pws[gid].i[ 6];
767 w1[3] = pws[gid].i[ 7];
780 w3[2] = pws[gid].i[14];
783 const u32 pw_len = pws[gid].pw_len;
789 __local u32 l_bin2asc[256];
791 const u32 lid4 = lid * 4;
793 const u32 lid40 = lid4 + 0;
794 const u32 lid41 = lid4 + 1;
795 const u32 lid42 = lid4 + 2;
796 const u32 lid43 = lid4 + 3;
798 const u32 v400 = (lid40 >> 0) & 15;
799 const u32 v401 = (lid40 >> 4) & 15;
800 const u32 v410 = (lid41 >> 0) & 15;
801 const u32 v411 = (lid41 >> 4) & 15;
802 const u32 v420 = (lid42 >> 0) & 15;
803 const u32 v421 = (lid42 >> 4) & 15;
804 const u32 v430 = (lid43 >> 0) & 15;
805 const u32 v431 = (lid43 >> 4) & 15;
807 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
808 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
809 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
810 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
811 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
812 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
813 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
814 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
816 barrier (CLK_LOCAL_MEM_FENCE);
818 if (gid >= gid_max) return;
824 m11100m (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);
827 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11100_m16 (__global pw_t *pws, __global gpu_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)
833 const u32 gid = get_global_id (0);
839 const u32 lid = get_local_id (0);
843 w0[0] = pws[gid].i[ 0];
844 w0[1] = pws[gid].i[ 1];
845 w0[2] = pws[gid].i[ 2];
846 w0[3] = pws[gid].i[ 3];
850 w1[0] = pws[gid].i[ 4];
851 w1[1] = pws[gid].i[ 5];
852 w1[2] = pws[gid].i[ 6];
853 w1[3] = pws[gid].i[ 7];
857 w2[0] = pws[gid].i[ 8];
858 w2[1] = pws[gid].i[ 9];
859 w2[2] = pws[gid].i[10];
860 w2[3] = pws[gid].i[11];
864 w3[0] = pws[gid].i[12];
865 w3[1] = pws[gid].i[13];
866 w3[2] = pws[gid].i[14];
867 w3[3] = pws[gid].i[15];
869 const u32 pw_len = pws[gid].pw_len;
875 __local u32 l_bin2asc[256];
877 const u32 lid4 = lid * 4;
879 const u32 lid40 = lid4 + 0;
880 const u32 lid41 = lid4 + 1;
881 const u32 lid42 = lid4 + 2;
882 const u32 lid43 = lid4 + 3;
884 const u32 v400 = (lid40 >> 0) & 15;
885 const u32 v401 = (lid40 >> 4) & 15;
886 const u32 v410 = (lid41 >> 0) & 15;
887 const u32 v411 = (lid41 >> 4) & 15;
888 const u32 v420 = (lid42 >> 0) & 15;
889 const u32 v421 = (lid42 >> 4) & 15;
890 const u32 v430 = (lid43 >> 0) & 15;
891 const u32 v431 = (lid43 >> 4) & 15;
893 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
894 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
895 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
896 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
897 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
898 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
899 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
900 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
902 barrier (CLK_LOCAL_MEM_FENCE);
904 if (gid >= gid_max) return;
910 m11100m (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);
913 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11100_s04 (__global pw_t *pws, __global gpu_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)
919 const u32 gid = get_global_id (0);
925 const u32 lid = get_local_id (0);
929 w0[0] = pws[gid].i[ 0];
930 w0[1] = pws[gid].i[ 1];
931 w0[2] = pws[gid].i[ 2];
932 w0[3] = pws[gid].i[ 3];
952 w3[2] = pws[gid].i[14];
955 const u32 pw_len = pws[gid].pw_len;
961 __local u32 l_bin2asc[256];
963 const u32 lid4 = lid * 4;
965 const u32 lid40 = lid4 + 0;
966 const u32 lid41 = lid4 + 1;
967 const u32 lid42 = lid4 + 2;
968 const u32 lid43 = lid4 + 3;
970 const u32 v400 = (lid40 >> 0) & 15;
971 const u32 v401 = (lid40 >> 4) & 15;
972 const u32 v410 = (lid41 >> 0) & 15;
973 const u32 v411 = (lid41 >> 4) & 15;
974 const u32 v420 = (lid42 >> 0) & 15;
975 const u32 v421 = (lid42 >> 4) & 15;
976 const u32 v430 = (lid43 >> 0) & 15;
977 const u32 v431 = (lid43 >> 4) & 15;
979 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
980 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
981 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
982 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
983 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
984 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
985 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
986 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
988 barrier (CLK_LOCAL_MEM_FENCE);
990 if (gid >= gid_max) return;
996 m11100s (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);
999 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11100_s08 (__global pw_t *pws, __global gpu_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)
1005 const u32 gid = get_global_id (0);
1011 const u32 lid = get_local_id (0);
1015 w0[0] = pws[gid].i[ 0];
1016 w0[1] = pws[gid].i[ 1];
1017 w0[2] = pws[gid].i[ 2];
1018 w0[3] = pws[gid].i[ 3];
1022 w1[0] = pws[gid].i[ 4];
1023 w1[1] = pws[gid].i[ 5];
1024 w1[2] = pws[gid].i[ 6];
1025 w1[3] = pws[gid].i[ 7];
1038 w3[2] = pws[gid].i[14];
1041 const u32 pw_len = pws[gid].pw_len;
1047 __local u32 l_bin2asc[256];
1049 const u32 lid4 = lid * 4;
1051 const u32 lid40 = lid4 + 0;
1052 const u32 lid41 = lid4 + 1;
1053 const u32 lid42 = lid4 + 2;
1054 const u32 lid43 = lid4 + 3;
1056 const u32 v400 = (lid40 >> 0) & 15;
1057 const u32 v401 = (lid40 >> 4) & 15;
1058 const u32 v410 = (lid41 >> 0) & 15;
1059 const u32 v411 = (lid41 >> 4) & 15;
1060 const u32 v420 = (lid42 >> 0) & 15;
1061 const u32 v421 = (lid42 >> 4) & 15;
1062 const u32 v430 = (lid43 >> 0) & 15;
1063 const u32 v431 = (lid43 >> 4) & 15;
1065 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1066 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1067 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1068 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1069 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1070 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1071 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1072 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1074 barrier (CLK_LOCAL_MEM_FENCE);
1076 if (gid >= gid_max) return;
1082 m11100s (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);
1085 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m11100_s16 (__global pw_t *pws, __global gpu_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)
1091 const u32 gid = get_global_id (0);
1097 const u32 lid = get_local_id (0);
1101 w0[0] = pws[gid].i[ 0];
1102 w0[1] = pws[gid].i[ 1];
1103 w0[2] = pws[gid].i[ 2];
1104 w0[3] = pws[gid].i[ 3];
1108 w1[0] = pws[gid].i[ 4];
1109 w1[1] = pws[gid].i[ 5];
1110 w1[2] = pws[gid].i[ 6];
1111 w1[3] = pws[gid].i[ 7];
1115 w2[0] = pws[gid].i[ 8];
1116 w2[1] = pws[gid].i[ 9];
1117 w2[2] = pws[gid].i[10];
1118 w2[3] = pws[gid].i[11];
1122 w3[0] = pws[gid].i[12];
1123 w3[1] = pws[gid].i[13];
1124 w3[2] = pws[gid].i[14];
1125 w3[3] = pws[gid].i[15];
1127 const u32 pw_len = pws[gid].pw_len;
1133 __local u32 l_bin2asc[256];
1135 const u32 lid4 = lid * 4;
1137 const u32 lid40 = lid4 + 0;
1138 const u32 lid41 = lid4 + 1;
1139 const u32 lid42 = lid4 + 2;
1140 const u32 lid43 = lid4 + 3;
1142 const u32 v400 = (lid40 >> 0) & 15;
1143 const u32 v401 = (lid40 >> 4) & 15;
1144 const u32 v410 = (lid41 >> 0) & 15;
1145 const u32 v411 = (lid41 >> 4) & 15;
1146 const u32 v420 = (lid42 >> 0) & 15;
1147 const u32 v421 = (lid42 >> 4) & 15;
1148 const u32 v430 = (lid43 >> 0) & 15;
1149 const u32 v431 = (lid43 >> 4) & 15;
1151 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1152 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1153 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1154 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1155 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1156 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1157 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1158 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1160 barrier (CLK_LOCAL_MEM_FENCE);
1162 if (gid >= gid_max) return;
1168 m11100s (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);