2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
16 #include "include/kernel_functions.c"
17 #include "types_ocl.c"
20 #define COMPARE_S "check_single_comp4.c"
21 #define COMPARE_M "check_multi_comp4.c"
24 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
28 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
32 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
35 static void m11100m (u32 w0[4], u32 w1[4], u32 w2[4], u32 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])
41 const u32 gid = get_global_id (0);
42 const u32 lid = get_local_id (0);
50 challenge = salt_bufs[salt_pos].salt_buf[0];
58 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug
59 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
60 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
61 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
65 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
66 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
67 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
68 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
84 const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
86 switch_buffer_by_offset (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len);
88 const u32 pw_salt_len = pw_len + salt_len;
96 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
98 const u32 w0r = bfs_buf[il_pos].i;
104 w0_t[0] = w0[0] | salt_buf0[0];
105 w0_t[1] = w0[1] | salt_buf0[1];
106 w0_t[2] = w0[2] | salt_buf0[2];
107 w0_t[3] = w0[3] | salt_buf0[3];
111 w1_t[0] = w1[0] | salt_buf1[0];
112 w1_t[1] = w1[1] | salt_buf1[1];
113 w1_t[2] = w1[2] | salt_buf1[2];
114 w1_t[3] = w1[3] | salt_buf1[3];
118 w2_t[0] = w2[0] | salt_buf2[0];
119 w2_t[1] = w2[1] | salt_buf2[1];
120 w2_t[2] = w2[2] | salt_buf2[2];
121 w2_t[3] = w2[3] | salt_buf2[3];
125 w3_t[0] = w3[0] | salt_buf3[0];
126 w3_t[1] = w3[1] | salt_buf3[1];
127 w3_t[2] = pw_salt_len * 8;
139 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
140 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
141 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
142 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
143 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
144 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
145 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
146 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
147 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
148 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
149 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
150 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
151 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
152 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
153 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
154 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
156 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
157 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
158 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
159 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
160 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
161 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
162 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
163 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
164 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
165 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
166 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
167 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
168 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
169 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
170 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
171 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
173 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
174 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
175 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
176 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
177 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
178 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
179 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
180 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
181 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
182 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
183 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
184 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
185 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
186 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
187 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
188 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
190 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
191 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
192 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
193 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
194 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
195 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
196 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
197 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
198 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
199 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
200 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
201 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
202 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
203 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
204 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
205 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
212 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
213 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
214 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
215 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
216 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
217 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
218 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
219 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
220 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
221 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
222 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
223 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
224 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
225 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
226 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
227 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
229 // add the 4 byte challenge here
232 w2_t[1] = 0x00000080;
238 w3_t[2] = (32 + 4) * 8;
242 * md5 ($hash.$challenge)
250 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
251 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
252 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
253 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
254 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
255 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
256 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
257 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
258 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
259 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
260 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
261 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
262 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
263 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
264 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
265 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
267 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
268 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
269 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
270 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
271 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
272 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
273 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
274 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
275 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
276 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
277 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
278 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
279 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
280 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
281 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
282 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
284 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
285 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
286 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
287 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
288 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
289 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
290 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
291 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
292 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
293 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
294 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
295 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
296 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
297 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
298 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
299 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
301 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
302 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
303 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
304 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
305 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
306 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
307 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
308 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
309 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
310 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
311 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
312 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
313 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
314 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
315 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
316 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
327 static void m11100s (u32 w0[4], u32 w1[4], u32 w2[4], u32 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])
333 const u32 gid = get_global_id (0);
334 const u32 lid = get_local_id (0);
340 const u32 search[4] =
342 digests_buf[digests_offset].digest_buf[DGST_R0],
343 digests_buf[digests_offset].digest_buf[DGST_R1],
344 digests_buf[digests_offset].digest_buf[DGST_R2],
345 digests_buf[digests_offset].digest_buf[DGST_R3]
354 challenge = salt_bufs[salt_pos].salt_buf[0];
362 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug
363 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
364 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
365 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
369 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
370 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
371 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
372 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
388 const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
390 switch_buffer_by_offset (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len);
392 const u32 pw_salt_len = pw_len + salt_len;
400 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
402 const u32 w0r = bfs_buf[il_pos].i;
408 w0_t[0] = w0[0] | salt_buf0[0];
409 w0_t[1] = w0[1] | salt_buf0[1];
410 w0_t[2] = w0[2] | salt_buf0[2];
411 w0_t[3] = w0[3] | salt_buf0[3];
415 w1_t[0] = w1[0] | salt_buf1[0];
416 w1_t[1] = w1[1] | salt_buf1[1];
417 w1_t[2] = w1[2] | salt_buf1[2];
418 w1_t[3] = w1[3] | salt_buf1[3];
422 w2_t[0] = w2[0] | salt_buf2[0];
423 w2_t[1] = w2[1] | salt_buf2[1];
424 w2_t[2] = w2[2] | salt_buf2[2];
425 w2_t[3] = w2[3] | salt_buf2[3];
429 w3_t[0] = w3[0] | salt_buf3[0];
430 w3_t[1] = w3[1] | salt_buf3[1];
431 w3_t[2] = pw_salt_len * 8;
443 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
444 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
445 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
446 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
447 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
448 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
449 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
450 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
451 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
452 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
453 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
454 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
455 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
456 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
457 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
458 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
460 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
461 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
462 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
463 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
464 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
465 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
466 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
467 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
468 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
469 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
470 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
471 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
472 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
473 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
474 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
475 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
477 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
478 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
479 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
480 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
481 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
482 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
483 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
484 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
485 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
486 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
487 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
488 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
489 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
490 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
491 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
492 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
494 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
495 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
496 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
497 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
498 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
499 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
500 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
501 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
502 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
503 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
504 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
505 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
506 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
507 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
508 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
509 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
516 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
517 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
518 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
519 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
520 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
521 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
522 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
523 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
524 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
525 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
526 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
527 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
528 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
529 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
530 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
531 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
533 // add the 4 byte challenge here
536 w2_t[1] = 0x00000080;
542 w3_t[2] = (32 + 4) * 8;
546 * md5 ($hash.$challenge)
554 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
555 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
556 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
557 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
558 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
559 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
560 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
561 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
562 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
563 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
564 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
565 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
566 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
567 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
568 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
569 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
571 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
572 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
573 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
574 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
575 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
576 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
577 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
578 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
579 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
580 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
581 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
582 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
583 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
584 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
585 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
586 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
588 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
589 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
590 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
591 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
592 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
593 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
594 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
595 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
596 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
597 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
598 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
599 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
600 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
601 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
602 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
603 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
605 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
606 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
607 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
608 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
609 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
610 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
611 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
612 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
613 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
614 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
615 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
616 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
617 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
618 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
619 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
620 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
631 __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)
637 const u32 gid = get_global_id (0);
643 const u32 lid = get_local_id (0);
647 w0[0] = pws[gid].i[ 0];
648 w0[1] = pws[gid].i[ 1];
649 w0[2] = pws[gid].i[ 2];
650 w0[3] = pws[gid].i[ 3];
670 w3[2] = pws[gid].i[14];
673 const u32 pw_len = pws[gid].pw_len;
679 __local u32 l_bin2asc[256];
681 const u32 lid4 = lid * 4;
683 const u32 lid40 = lid4 + 0;
684 const u32 lid41 = lid4 + 1;
685 const u32 lid42 = lid4 + 2;
686 const u32 lid43 = lid4 + 3;
688 const u32 v400 = (lid40 >> 0) & 15;
689 const u32 v401 = (lid40 >> 4) & 15;
690 const u32 v410 = (lid41 >> 0) & 15;
691 const u32 v411 = (lid41 >> 4) & 15;
692 const u32 v420 = (lid42 >> 0) & 15;
693 const u32 v421 = (lid42 >> 4) & 15;
694 const u32 v430 = (lid43 >> 0) & 15;
695 const u32 v431 = (lid43 >> 4) & 15;
697 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
698 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
699 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
700 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
701 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
702 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
703 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
704 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
706 barrier (CLK_LOCAL_MEM_FENCE);
708 if (gid >= gid_max) return;
714 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);
717 __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)
723 const u32 gid = get_global_id (0);
729 const u32 lid = get_local_id (0);
733 w0[0] = pws[gid].i[ 0];
734 w0[1] = pws[gid].i[ 1];
735 w0[2] = pws[gid].i[ 2];
736 w0[3] = pws[gid].i[ 3];
740 w1[0] = pws[gid].i[ 4];
741 w1[1] = pws[gid].i[ 5];
742 w1[2] = pws[gid].i[ 6];
743 w1[3] = pws[gid].i[ 7];
756 w3[2] = pws[gid].i[14];
759 const u32 pw_len = pws[gid].pw_len;
765 __local u32 l_bin2asc[256];
767 const u32 lid4 = lid * 4;
769 const u32 lid40 = lid4 + 0;
770 const u32 lid41 = lid4 + 1;
771 const u32 lid42 = lid4 + 2;
772 const u32 lid43 = lid4 + 3;
774 const u32 v400 = (lid40 >> 0) & 15;
775 const u32 v401 = (lid40 >> 4) & 15;
776 const u32 v410 = (lid41 >> 0) & 15;
777 const u32 v411 = (lid41 >> 4) & 15;
778 const u32 v420 = (lid42 >> 0) & 15;
779 const u32 v421 = (lid42 >> 4) & 15;
780 const u32 v430 = (lid43 >> 0) & 15;
781 const u32 v431 = (lid43 >> 4) & 15;
783 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
784 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
785 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
786 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
787 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
788 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
789 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
790 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
792 barrier (CLK_LOCAL_MEM_FENCE);
794 if (gid >= gid_max) return;
800 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);
803 __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)
809 const u32 gid = get_global_id (0);
815 const u32 lid = get_local_id (0);
819 w0[0] = pws[gid].i[ 0];
820 w0[1] = pws[gid].i[ 1];
821 w0[2] = pws[gid].i[ 2];
822 w0[3] = pws[gid].i[ 3];
826 w1[0] = pws[gid].i[ 4];
827 w1[1] = pws[gid].i[ 5];
828 w1[2] = pws[gid].i[ 6];
829 w1[3] = pws[gid].i[ 7];
833 w2[0] = pws[gid].i[ 8];
834 w2[1] = pws[gid].i[ 9];
835 w2[2] = pws[gid].i[10];
836 w2[3] = pws[gid].i[11];
840 w3[0] = pws[gid].i[12];
841 w3[1] = pws[gid].i[13];
842 w3[2] = pws[gid].i[14];
843 w3[3] = pws[gid].i[15];
845 const u32 pw_len = pws[gid].pw_len;
851 __local u32 l_bin2asc[256];
853 const u32 lid4 = lid * 4;
855 const u32 lid40 = lid4 + 0;
856 const u32 lid41 = lid4 + 1;
857 const u32 lid42 = lid4 + 2;
858 const u32 lid43 = lid4 + 3;
860 const u32 v400 = (lid40 >> 0) & 15;
861 const u32 v401 = (lid40 >> 4) & 15;
862 const u32 v410 = (lid41 >> 0) & 15;
863 const u32 v411 = (lid41 >> 4) & 15;
864 const u32 v420 = (lid42 >> 0) & 15;
865 const u32 v421 = (lid42 >> 4) & 15;
866 const u32 v430 = (lid43 >> 0) & 15;
867 const u32 v431 = (lid43 >> 4) & 15;
869 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
870 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
871 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
872 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
873 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
874 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
875 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
876 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
878 barrier (CLK_LOCAL_MEM_FENCE);
880 if (gid >= gid_max) return;
886 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);
889 __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)
895 const u32 gid = get_global_id (0);
901 const u32 lid = get_local_id (0);
905 w0[0] = pws[gid].i[ 0];
906 w0[1] = pws[gid].i[ 1];
907 w0[2] = pws[gid].i[ 2];
908 w0[3] = pws[gid].i[ 3];
928 w3[2] = pws[gid].i[14];
931 const u32 pw_len = pws[gid].pw_len;
937 __local u32 l_bin2asc[256];
939 const u32 lid4 = lid * 4;
941 const u32 lid40 = lid4 + 0;
942 const u32 lid41 = lid4 + 1;
943 const u32 lid42 = lid4 + 2;
944 const u32 lid43 = lid4 + 3;
946 const u32 v400 = (lid40 >> 0) & 15;
947 const u32 v401 = (lid40 >> 4) & 15;
948 const u32 v410 = (lid41 >> 0) & 15;
949 const u32 v411 = (lid41 >> 4) & 15;
950 const u32 v420 = (lid42 >> 0) & 15;
951 const u32 v421 = (lid42 >> 4) & 15;
952 const u32 v430 = (lid43 >> 0) & 15;
953 const u32 v431 = (lid43 >> 4) & 15;
955 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
956 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
957 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
958 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
959 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
960 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
961 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
962 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
964 barrier (CLK_LOCAL_MEM_FENCE);
966 if (gid >= gid_max) return;
972 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);
975 __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)
981 const u32 gid = get_global_id (0);
987 const u32 lid = get_local_id (0);
991 w0[0] = pws[gid].i[ 0];
992 w0[1] = pws[gid].i[ 1];
993 w0[2] = pws[gid].i[ 2];
994 w0[3] = pws[gid].i[ 3];
998 w1[0] = pws[gid].i[ 4];
999 w1[1] = pws[gid].i[ 5];
1000 w1[2] = pws[gid].i[ 6];
1001 w1[3] = pws[gid].i[ 7];
1014 w3[2] = pws[gid].i[14];
1017 const u32 pw_len = pws[gid].pw_len;
1023 __local u32 l_bin2asc[256];
1025 const u32 lid4 = lid * 4;
1027 const u32 lid40 = lid4 + 0;
1028 const u32 lid41 = lid4 + 1;
1029 const u32 lid42 = lid4 + 2;
1030 const u32 lid43 = lid4 + 3;
1032 const u32 v400 = (lid40 >> 0) & 15;
1033 const u32 v401 = (lid40 >> 4) & 15;
1034 const u32 v410 = (lid41 >> 0) & 15;
1035 const u32 v411 = (lid41 >> 4) & 15;
1036 const u32 v420 = (lid42 >> 0) & 15;
1037 const u32 v421 = (lid42 >> 4) & 15;
1038 const u32 v430 = (lid43 >> 0) & 15;
1039 const u32 v431 = (lid43 >> 4) & 15;
1041 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1042 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1043 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1044 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1045 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1046 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1047 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1048 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1050 barrier (CLK_LOCAL_MEM_FENCE);
1052 if (gid >= gid_max) return;
1058 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);
1061 __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)
1067 const u32 gid = get_global_id (0);
1073 const u32 lid = get_local_id (0);
1077 w0[0] = pws[gid].i[ 0];
1078 w0[1] = pws[gid].i[ 1];
1079 w0[2] = pws[gid].i[ 2];
1080 w0[3] = pws[gid].i[ 3];
1084 w1[0] = pws[gid].i[ 4];
1085 w1[1] = pws[gid].i[ 5];
1086 w1[2] = pws[gid].i[ 6];
1087 w1[3] = pws[gid].i[ 7];
1091 w2[0] = pws[gid].i[ 8];
1092 w2[1] = pws[gid].i[ 9];
1093 w2[2] = pws[gid].i[10];
1094 w2[3] = pws[gid].i[11];
1098 w3[0] = pws[gid].i[12];
1099 w3[1] = pws[gid].i[13];
1100 w3[2] = pws[gid].i[14];
1101 w3[3] = pws[gid].i[15];
1103 const u32 pw_len = pws[gid].pw_len;
1109 __local u32 l_bin2asc[256];
1111 const u32 lid4 = lid * 4;
1113 const u32 lid40 = lid4 + 0;
1114 const u32 lid41 = lid4 + 1;
1115 const u32 lid42 = lid4 + 2;
1116 const u32 lid43 = lid4 + 3;
1118 const u32 v400 = (lid40 >> 0) & 15;
1119 const u32 v401 = (lid40 >> 4) & 15;
1120 const u32 v410 = (lid41 >> 0) & 15;
1121 const u32 v411 = (lid41 >> 4) & 15;
1122 const u32 v420 = (lid42 >> 0) & 15;
1123 const u32 v421 = (lid42 >> 4) & 15;
1124 const u32 v430 = (lid43 >> 0) & 15;
1125 const u32 v431 = (lid43 >> 4) & 15;
1127 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1128 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1129 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1130 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1131 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1132 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1133 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1134 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1136 barrier (CLK_LOCAL_MEM_FENCE);
1138 if (gid >= gid_max) return;
1144 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);