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"
23 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
25 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])
31 const u32 gid = get_global_id (0);
32 const u32 lid = get_local_id (0);
40 challenge = salt_bufs[salt_pos].salt_buf[0];
48 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug
49 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
50 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
51 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
55 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
56 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
57 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
58 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
74 const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
76 switch_buffer_by_offset (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len);
78 const u32 pw_salt_len = pw_len + salt_len;
86 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
88 const u32 w0r = bfs_buf[il_pos].i;
94 w0_t[0] = w0[0] | salt_buf0[0];
95 w0_t[1] = w0[1] | salt_buf0[1];
96 w0_t[2] = w0[2] | salt_buf0[2];
97 w0_t[3] = w0[3] | salt_buf0[3];
101 w1_t[0] = w1[0] | salt_buf1[0];
102 w1_t[1] = w1[1] | salt_buf1[1];
103 w1_t[2] = w1[2] | salt_buf1[2];
104 w1_t[3] = w1[3] | salt_buf1[3];
108 w2_t[0] = w2[0] | salt_buf2[0];
109 w2_t[1] = w2[1] | salt_buf2[1];
110 w2_t[2] = w2[2] | salt_buf2[2];
111 w2_t[3] = w2[3] | salt_buf2[3];
115 w3_t[0] = w3[0] | salt_buf3[0];
116 w3_t[1] = w3[1] | salt_buf3[1];
117 w3_t[2] = pw_salt_len * 8;
129 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
130 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
131 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
132 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
133 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
134 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
135 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
136 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
137 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
138 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
139 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
140 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
141 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
142 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
143 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
144 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
146 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
147 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
148 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
149 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
150 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
151 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
152 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
153 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
154 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
155 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
156 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
157 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
158 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
159 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
160 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
161 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
163 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
164 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
165 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
166 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
167 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
168 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
169 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
170 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
171 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
172 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
173 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
174 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
175 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
176 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
177 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
178 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
180 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
181 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
182 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
183 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
184 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
185 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
186 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
187 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
188 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
189 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
190 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
191 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
192 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
193 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
194 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
195 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
202 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
203 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
204 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
205 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
206 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
207 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
208 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
209 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
210 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
211 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
212 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
213 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
214 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
215 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
216 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
217 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
219 // add the 4 byte challenge here
222 w2_t[1] = 0x00000080;
228 w3_t[2] = (32 + 4) * 8;
232 * md5 ($hash.$challenge)
240 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
241 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
242 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
243 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
244 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
245 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
246 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
247 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
248 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
249 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
250 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
251 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
252 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
253 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
254 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
255 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
257 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
258 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
259 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
260 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
261 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
262 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
263 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
264 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
265 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
266 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
267 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
268 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
269 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
270 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
271 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
272 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
274 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
275 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
276 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
277 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
278 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
279 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
280 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
281 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
282 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
283 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
284 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
285 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
286 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
287 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
288 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
289 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
291 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
292 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
293 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
294 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
295 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
296 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
297 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
298 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
299 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
300 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
301 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
302 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
303 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
304 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
305 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
306 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
317 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])
323 const u32 gid = get_global_id (0);
324 const u32 lid = get_local_id (0);
330 const u32 search[4] =
332 digests_buf[digests_offset].digest_buf[DGST_R0],
333 digests_buf[digests_offset].digest_buf[DGST_R1],
334 digests_buf[digests_offset].digest_buf[DGST_R2],
335 digests_buf[digests_offset].digest_buf[DGST_R3]
344 challenge = salt_bufs[salt_pos].salt_buf[0];
352 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 1]; // not a bug
353 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 2];
354 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 3];
355 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 4];
359 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 5];
360 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 6];
361 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 7];
362 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 8];
378 const u32 salt_len = salt_bufs[salt_pos].salt_len - 4;
380 switch_buffer_by_offset (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len);
382 const u32 pw_salt_len = pw_len + salt_len;
390 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
392 const u32 w0r = bfs_buf[il_pos].i;
398 w0_t[0] = w0[0] | salt_buf0[0];
399 w0_t[1] = w0[1] | salt_buf0[1];
400 w0_t[2] = w0[2] | salt_buf0[2];
401 w0_t[3] = w0[3] | salt_buf0[3];
405 w1_t[0] = w1[0] | salt_buf1[0];
406 w1_t[1] = w1[1] | salt_buf1[1];
407 w1_t[2] = w1[2] | salt_buf1[2];
408 w1_t[3] = w1[3] | salt_buf1[3];
412 w2_t[0] = w2[0] | salt_buf2[0];
413 w2_t[1] = w2[1] | salt_buf2[1];
414 w2_t[2] = w2[2] | salt_buf2[2];
415 w2_t[3] = w2[3] | salt_buf2[3];
419 w3_t[0] = w3[0] | salt_buf3[0];
420 w3_t[1] = w3[1] | salt_buf3[1];
421 w3_t[2] = pw_salt_len * 8;
433 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
434 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
435 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
436 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
437 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
438 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
439 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
440 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
441 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
442 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
443 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
444 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
445 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
446 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
447 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
448 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
450 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
451 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
452 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
453 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
454 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
455 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
456 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
457 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
458 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
459 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
460 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
461 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
462 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
463 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
464 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
465 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
467 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
468 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
469 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
470 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
471 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
472 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
473 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
474 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
475 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
476 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
477 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
478 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
479 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
480 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
481 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
482 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
484 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
485 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
486 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
487 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
488 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
489 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
490 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
491 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
492 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
493 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
494 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
495 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
496 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
497 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
498 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
499 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
506 w0_t[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
507 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
508 w0_t[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
509 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
510 w0_t[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
511 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
512 w0_t[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
513 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
514 w1_t[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
515 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
516 w1_t[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
517 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
518 w1_t[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
519 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
520 w1_t[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
521 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
523 // add the 4 byte challenge here
526 w2_t[1] = 0x00000080;
532 w3_t[2] = (32 + 4) * 8;
536 * md5 ($hash.$challenge)
544 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
545 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
546 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
547 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
548 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
549 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
550 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
551 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
552 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
553 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
554 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
555 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
556 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
557 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
558 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
559 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
561 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
562 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
563 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
564 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
565 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
566 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
567 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
568 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
569 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
570 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
571 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
572 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
573 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
574 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
575 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
576 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
578 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
579 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
580 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
581 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
582 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
583 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
584 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
585 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
586 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
587 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
588 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
589 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
590 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
591 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
592 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
593 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
595 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
596 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
597 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
598 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
599 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
600 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
601 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
602 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
603 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
604 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
605 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
606 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
607 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
608 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
609 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
610 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
621 __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)
627 const u32 gid = get_global_id (0);
633 const u32 lid = get_local_id (0);
637 w0[0] = pws[gid].i[ 0];
638 w0[1] = pws[gid].i[ 1];
639 w0[2] = pws[gid].i[ 2];
640 w0[3] = pws[gid].i[ 3];
660 w3[2] = pws[gid].i[14];
663 const u32 pw_len = pws[gid].pw_len;
669 __local u32 l_bin2asc[256];
671 const u32 lid4 = lid * 4;
673 const u32 lid40 = lid4 + 0;
674 const u32 lid41 = lid4 + 1;
675 const u32 lid42 = lid4 + 2;
676 const u32 lid43 = lid4 + 3;
678 const u32 v400 = (lid40 >> 0) & 15;
679 const u32 v401 = (lid40 >> 4) & 15;
680 const u32 v410 = (lid41 >> 0) & 15;
681 const u32 v411 = (lid41 >> 4) & 15;
682 const u32 v420 = (lid42 >> 0) & 15;
683 const u32 v421 = (lid42 >> 4) & 15;
684 const u32 v430 = (lid43 >> 0) & 15;
685 const u32 v431 = (lid43 >> 4) & 15;
687 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
688 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
689 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
690 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
691 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
692 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
693 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
694 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
696 barrier (CLK_LOCAL_MEM_FENCE);
698 if (gid >= gid_max) return;
704 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);
707 __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)
713 const u32 gid = get_global_id (0);
719 const u32 lid = get_local_id (0);
723 w0[0] = pws[gid].i[ 0];
724 w0[1] = pws[gid].i[ 1];
725 w0[2] = pws[gid].i[ 2];
726 w0[3] = pws[gid].i[ 3];
730 w1[0] = pws[gid].i[ 4];
731 w1[1] = pws[gid].i[ 5];
732 w1[2] = pws[gid].i[ 6];
733 w1[3] = pws[gid].i[ 7];
746 w3[2] = pws[gid].i[14];
749 const u32 pw_len = pws[gid].pw_len;
755 __local u32 l_bin2asc[256];
757 const u32 lid4 = lid * 4;
759 const u32 lid40 = lid4 + 0;
760 const u32 lid41 = lid4 + 1;
761 const u32 lid42 = lid4 + 2;
762 const u32 lid43 = lid4 + 3;
764 const u32 v400 = (lid40 >> 0) & 15;
765 const u32 v401 = (lid40 >> 4) & 15;
766 const u32 v410 = (lid41 >> 0) & 15;
767 const u32 v411 = (lid41 >> 4) & 15;
768 const u32 v420 = (lid42 >> 0) & 15;
769 const u32 v421 = (lid42 >> 4) & 15;
770 const u32 v430 = (lid43 >> 0) & 15;
771 const u32 v431 = (lid43 >> 4) & 15;
773 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
774 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
775 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
776 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
777 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
778 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
779 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
780 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
782 barrier (CLK_LOCAL_MEM_FENCE);
784 if (gid >= gid_max) return;
790 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);
793 __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)
799 const u32 gid = get_global_id (0);
805 const u32 lid = get_local_id (0);
809 w0[0] = pws[gid].i[ 0];
810 w0[1] = pws[gid].i[ 1];
811 w0[2] = pws[gid].i[ 2];
812 w0[3] = pws[gid].i[ 3];
816 w1[0] = pws[gid].i[ 4];
817 w1[1] = pws[gid].i[ 5];
818 w1[2] = pws[gid].i[ 6];
819 w1[3] = pws[gid].i[ 7];
823 w2[0] = pws[gid].i[ 8];
824 w2[1] = pws[gid].i[ 9];
825 w2[2] = pws[gid].i[10];
826 w2[3] = pws[gid].i[11];
830 w3[0] = pws[gid].i[12];
831 w3[1] = pws[gid].i[13];
832 w3[2] = pws[gid].i[14];
833 w3[3] = pws[gid].i[15];
835 const u32 pw_len = pws[gid].pw_len;
841 __local u32 l_bin2asc[256];
843 const u32 lid4 = lid * 4;
845 const u32 lid40 = lid4 + 0;
846 const u32 lid41 = lid4 + 1;
847 const u32 lid42 = lid4 + 2;
848 const u32 lid43 = lid4 + 3;
850 const u32 v400 = (lid40 >> 0) & 15;
851 const u32 v401 = (lid40 >> 4) & 15;
852 const u32 v410 = (lid41 >> 0) & 15;
853 const u32 v411 = (lid41 >> 4) & 15;
854 const u32 v420 = (lid42 >> 0) & 15;
855 const u32 v421 = (lid42 >> 4) & 15;
856 const u32 v430 = (lid43 >> 0) & 15;
857 const u32 v431 = (lid43 >> 4) & 15;
859 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
860 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
861 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
862 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
863 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
864 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
865 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
866 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
868 barrier (CLK_LOCAL_MEM_FENCE);
870 if (gid >= gid_max) return;
876 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);
879 __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)
885 const u32 gid = get_global_id (0);
891 const u32 lid = get_local_id (0);
895 w0[0] = pws[gid].i[ 0];
896 w0[1] = pws[gid].i[ 1];
897 w0[2] = pws[gid].i[ 2];
898 w0[3] = pws[gid].i[ 3];
918 w3[2] = pws[gid].i[14];
921 const u32 pw_len = pws[gid].pw_len;
927 __local u32 l_bin2asc[256];
929 const u32 lid4 = lid * 4;
931 const u32 lid40 = lid4 + 0;
932 const u32 lid41 = lid4 + 1;
933 const u32 lid42 = lid4 + 2;
934 const u32 lid43 = lid4 + 3;
936 const u32 v400 = (lid40 >> 0) & 15;
937 const u32 v401 = (lid40 >> 4) & 15;
938 const u32 v410 = (lid41 >> 0) & 15;
939 const u32 v411 = (lid41 >> 4) & 15;
940 const u32 v420 = (lid42 >> 0) & 15;
941 const u32 v421 = (lid42 >> 4) & 15;
942 const u32 v430 = (lid43 >> 0) & 15;
943 const u32 v431 = (lid43 >> 4) & 15;
945 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
946 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
947 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
948 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
949 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
950 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
951 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
952 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
954 barrier (CLK_LOCAL_MEM_FENCE);
956 if (gid >= gid_max) return;
962 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);
965 __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)
971 const u32 gid = get_global_id (0);
977 const u32 lid = get_local_id (0);
981 w0[0] = pws[gid].i[ 0];
982 w0[1] = pws[gid].i[ 1];
983 w0[2] = pws[gid].i[ 2];
984 w0[3] = pws[gid].i[ 3];
988 w1[0] = pws[gid].i[ 4];
989 w1[1] = pws[gid].i[ 5];
990 w1[2] = pws[gid].i[ 6];
991 w1[3] = pws[gid].i[ 7];
1004 w3[2] = pws[gid].i[14];
1007 const u32 pw_len = pws[gid].pw_len;
1013 __local u32 l_bin2asc[256];
1015 const u32 lid4 = lid * 4;
1017 const u32 lid40 = lid4 + 0;
1018 const u32 lid41 = lid4 + 1;
1019 const u32 lid42 = lid4 + 2;
1020 const u32 lid43 = lid4 + 3;
1022 const u32 v400 = (lid40 >> 0) & 15;
1023 const u32 v401 = (lid40 >> 4) & 15;
1024 const u32 v410 = (lid41 >> 0) & 15;
1025 const u32 v411 = (lid41 >> 4) & 15;
1026 const u32 v420 = (lid42 >> 0) & 15;
1027 const u32 v421 = (lid42 >> 4) & 15;
1028 const u32 v430 = (lid43 >> 0) & 15;
1029 const u32 v431 = (lid43 >> 4) & 15;
1031 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1032 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1033 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1034 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1035 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1036 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1037 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1038 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1040 barrier (CLK_LOCAL_MEM_FENCE);
1042 if (gid >= gid_max) return;
1048 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);
1051 __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)
1057 const u32 gid = get_global_id (0);
1063 const u32 lid = get_local_id (0);
1067 w0[0] = pws[gid].i[ 0];
1068 w0[1] = pws[gid].i[ 1];
1069 w0[2] = pws[gid].i[ 2];
1070 w0[3] = pws[gid].i[ 3];
1074 w1[0] = pws[gid].i[ 4];
1075 w1[1] = pws[gid].i[ 5];
1076 w1[2] = pws[gid].i[ 6];
1077 w1[3] = pws[gid].i[ 7];
1081 w2[0] = pws[gid].i[ 8];
1082 w2[1] = pws[gid].i[ 9];
1083 w2[2] = pws[gid].i[10];
1084 w2[3] = pws[gid].i[11];
1088 w3[0] = pws[gid].i[12];
1089 w3[1] = pws[gid].i[13];
1090 w3[2] = pws[gid].i[14];
1091 w3[3] = pws[gid].i[15];
1093 const u32 pw_len = pws[gid].pw_len;
1099 __local u32 l_bin2asc[256];
1101 const u32 lid4 = lid * 4;
1103 const u32 lid40 = lid4 + 0;
1104 const u32 lid41 = lid4 + 1;
1105 const u32 lid42 = lid4 + 2;
1106 const u32 lid43 = lid4 + 3;
1108 const u32 v400 = (lid40 >> 0) & 15;
1109 const u32 v401 = (lid40 >> 4) & 15;
1110 const u32 v410 = (lid41 >> 0) & 15;
1111 const u32 v411 = (lid41 >> 4) & 15;
1112 const u32 v420 = (lid42 >> 0) & 15;
1113 const u32 v421 = (lid42 >> 4) & 15;
1114 const u32 v430 = (lid43 >> 0) & 15;
1115 const u32 v431 = (lid43 >> 4) & 15;
1117 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1118 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1119 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1120 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1121 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1122 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1123 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1124 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1126 barrier (CLK_LOCAL_MEM_FENCE);
1128 if (gid >= gid_max) return;
1134 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);