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 m04310m (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);
48 const u32 salt_len = salt_bufs[salt_pos].salt_len;
52 s[0] = salt_bufs[salt_pos].salt_buf[0];
53 s[1] = salt_bufs[salt_pos].salt_buf[1];
54 s[2] = salt_bufs[salt_pos].salt_buf[2];
55 s[3] = salt_bufs[salt_pos].salt_buf[3];
56 s[4] = salt_bufs[salt_pos].salt_buf[4];
57 s[5] = salt_bufs[salt_pos].salt_buf[5];
58 s[6] = (32 + salt_len) * 8;
67 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
69 const u32 w0r = bfs_buf[il_pos].i;
78 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
79 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
80 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
81 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
82 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
83 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
84 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
85 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
86 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
87 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
88 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
89 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
90 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
91 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
92 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
93 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
95 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
96 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
97 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
98 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
99 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
100 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
101 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
102 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
103 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
104 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
105 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
106 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
107 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
108 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
109 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
110 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
112 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
113 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
114 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
115 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
116 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
117 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
118 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
119 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
120 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
121 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
122 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
123 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
124 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
125 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
126 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
127 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
129 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
130 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
131 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
132 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
133 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
134 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
135 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
136 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
137 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
138 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
139 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
140 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
141 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
142 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
143 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
144 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
151 const u32 w0_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
152 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
153 const u32 w1_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
154 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
155 const u32 w2_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
156 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
157 const u32 w3_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
158 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
159 const u32 w4_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
160 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
161 const u32 w5_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
162 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
163 const u32 w6_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
164 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
165 const u32 w7_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
166 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
168 const u32 w8_t = s[0];
169 const u32 w9_t = s[1];
170 const u32 wa_t = s[2];
171 const u32 wb_t = s[3];
172 const u32 wc_t = s[4];
173 const u32 wd_t = s[5];
174 const u32 we_t = s[6];
175 const u32 wf_t = s[7];
182 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
183 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
184 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
185 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
186 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
187 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
188 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
189 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
190 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
191 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
192 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
193 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
194 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
195 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
196 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
197 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
199 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
200 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
201 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
202 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
203 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
204 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
205 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
206 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
207 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
208 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
209 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
210 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
211 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
212 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
213 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
214 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
216 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
217 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
218 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
219 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
220 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
221 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
222 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
223 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
224 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
225 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
226 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
227 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
228 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
229 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
230 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
231 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
233 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
234 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
235 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
236 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
237 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
238 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
239 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
240 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
241 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
242 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
243 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
244 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
245 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
246 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
247 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
248 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
259 static void m04310s (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])
265 const u32 gid = get_global_id (0);
266 const u32 lid = get_local_id (0);
272 const u32 search[4] =
274 digests_buf[digests_offset].digest_buf[DGST_R0],
275 digests_buf[digests_offset].digest_buf[DGST_R1],
276 digests_buf[digests_offset].digest_buf[DGST_R2],
277 digests_buf[digests_offset].digest_buf[DGST_R3]
284 const u32 salt_len = salt_bufs[salt_pos].salt_len;
288 s[0] = salt_bufs[salt_pos].salt_buf[0];
289 s[1] = salt_bufs[salt_pos].salt_buf[1];
290 s[2] = salt_bufs[salt_pos].salt_buf[2];
291 s[3] = salt_bufs[salt_pos].salt_buf[3];
292 s[4] = salt_bufs[salt_pos].salt_buf[4];
293 s[5] = salt_bufs[salt_pos].salt_buf[5];
294 s[6] = (32 + salt_len) * 8;
303 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
305 const u32 w0r = bfs_buf[il_pos].i;
314 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
315 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
316 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
317 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
318 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
319 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
320 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
321 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
322 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
323 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
324 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
325 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
326 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
327 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
328 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
329 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
331 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
332 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
333 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
334 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
335 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
336 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
337 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
338 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
339 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
340 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
341 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
342 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
343 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
344 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
345 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
346 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
348 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
349 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
350 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
351 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
352 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
353 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
354 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
355 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
356 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
357 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
358 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
359 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
360 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
361 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
362 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
363 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
365 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
366 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
367 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
368 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
369 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
370 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
371 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
372 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
373 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
374 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
375 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
376 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
377 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
378 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
379 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
380 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
387 const u32 w0_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
388 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
389 const u32 w1_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
390 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
391 const u32 w2_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
392 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
393 const u32 w3_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
394 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
395 const u32 w4_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
396 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
397 const u32 w5_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
398 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
399 const u32 w6_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
400 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
401 const u32 w7_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
402 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
404 const u32 w8_t = s[0];
405 const u32 w9_t = s[1];
406 const u32 wa_t = s[2];
407 const u32 wb_t = s[3];
408 const u32 wc_t = s[4];
409 const u32 wd_t = s[5];
410 const u32 we_t = s[6];
411 const u32 wf_t = s[7];
418 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
419 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
420 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
421 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
422 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
423 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
424 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
425 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
426 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
427 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
428 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
429 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
430 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
431 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
432 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
433 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
435 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
436 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
437 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
438 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
439 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
440 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
441 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
442 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
443 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
444 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
445 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
446 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
447 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
448 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
449 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
450 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
452 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
453 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
454 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
455 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
456 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
457 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
458 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
459 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
460 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
461 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
462 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
463 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
464 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
465 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
466 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
467 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
469 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
470 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
471 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
472 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
473 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
474 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
475 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
476 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
477 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
478 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
479 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
480 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
481 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
482 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
483 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
484 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
495 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m04310_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)
501 const u32 gid = get_global_id (0);
507 const u32 lid = get_local_id (0);
512 w0[0] = pws[gid].i[ 0];
513 w0[1] = pws[gid].i[ 1];
514 w0[2] = pws[gid].i[ 2];
515 w0[3] = pws[gid].i[ 3];
535 w3[2] = pws[gid].i[14];
538 const u32 pw_len = pws[gid].pw_len;
544 __local u32 l_bin2asc[256];
546 const u32 lid4 = lid * 4;
548 const u32 lid40 = lid4 + 0;
549 const u32 lid41 = lid4 + 1;
550 const u32 lid42 = lid4 + 2;
551 const u32 lid43 = lid4 + 3;
553 const u32 v400 = (lid40 >> 0) & 15;
554 const u32 v401 = (lid40 >> 4) & 15;
555 const u32 v410 = (lid41 >> 0) & 15;
556 const u32 v411 = (lid41 >> 4) & 15;
557 const u32 v420 = (lid42 >> 0) & 15;
558 const u32 v421 = (lid42 >> 4) & 15;
559 const u32 v430 = (lid43 >> 0) & 15;
560 const u32 v431 = (lid43 >> 4) & 15;
562 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'A' - 10 + v400) << 8
563 | ((v401 < 10) ? '0' + v401 : 'A' - 10 + v401) << 0;
564 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'A' - 10 + v410) << 8
565 | ((v411 < 10) ? '0' + v411 : 'A' - 10 + v411) << 0;
566 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'A' - 10 + v420) << 8
567 | ((v421 < 10) ? '0' + v421 : 'A' - 10 + v421) << 0;
568 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'A' - 10 + v430) << 8
569 | ((v431 < 10) ? '0' + v431 : 'A' - 10 + v431) << 0;
571 barrier (CLK_LOCAL_MEM_FENCE);
573 if (gid >= gid_max) return;
579 m04310m (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);
582 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m04310_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)
588 const u32 gid = get_global_id (0);
594 const u32 lid = get_local_id (0);
598 w0[0] = pws[gid].i[ 0];
599 w0[1] = pws[gid].i[ 1];
600 w0[2] = pws[gid].i[ 2];
601 w0[3] = pws[gid].i[ 3];
605 w1[0] = pws[gid].i[ 4];
606 w1[1] = pws[gid].i[ 5];
607 w1[2] = pws[gid].i[ 6];
608 w1[3] = pws[gid].i[ 7];
621 w3[2] = pws[gid].i[14];
624 const u32 pw_len = pws[gid].pw_len;
630 __local u32 l_bin2asc[256];
632 const u32 lid4 = lid * 4;
634 const u32 lid40 = lid4 + 0;
635 const u32 lid41 = lid4 + 1;
636 const u32 lid42 = lid4 + 2;
637 const u32 lid43 = lid4 + 3;
639 const u32 v400 = (lid40 >> 0) & 15;
640 const u32 v401 = (lid40 >> 4) & 15;
641 const u32 v410 = (lid41 >> 0) & 15;
642 const u32 v411 = (lid41 >> 4) & 15;
643 const u32 v420 = (lid42 >> 0) & 15;
644 const u32 v421 = (lid42 >> 4) & 15;
645 const u32 v430 = (lid43 >> 0) & 15;
646 const u32 v431 = (lid43 >> 4) & 15;
648 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'A' - 10 + v400) << 8
649 | ((v401 < 10) ? '0' + v401 : 'A' - 10 + v401) << 0;
650 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'A' - 10 + v410) << 8
651 | ((v411 < 10) ? '0' + v411 : 'A' - 10 + v411) << 0;
652 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'A' - 10 + v420) << 8
653 | ((v421 < 10) ? '0' + v421 : 'A' - 10 + v421) << 0;
654 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'A' - 10 + v430) << 8
655 | ((v431 < 10) ? '0' + v431 : 'A' - 10 + v431) << 0;
657 barrier (CLK_LOCAL_MEM_FENCE);
659 if (gid >= gid_max) return;
665 m04310m (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);
668 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m04310_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)
674 const u32 gid = get_global_id (0);
680 const u32 lid = get_local_id (0);
684 w0[0] = pws[gid].i[ 0];
685 w0[1] = pws[gid].i[ 1];
686 w0[2] = pws[gid].i[ 2];
687 w0[3] = pws[gid].i[ 3];
691 w1[0] = pws[gid].i[ 4];
692 w1[1] = pws[gid].i[ 5];
693 w1[2] = pws[gid].i[ 6];
694 w1[3] = pws[gid].i[ 7];
698 w2[0] = pws[gid].i[ 8];
699 w2[1] = pws[gid].i[ 9];
700 w2[2] = pws[gid].i[10];
701 w2[3] = pws[gid].i[11];
705 w3[0] = pws[gid].i[12];
706 w3[1] = pws[gid].i[13];
707 w3[2] = pws[gid].i[14];
708 w3[3] = pws[gid].i[15];
710 const u32 pw_len = pws[gid].pw_len;
716 __local u32 l_bin2asc[256];
718 const u32 lid4 = lid * 4;
720 const u32 lid40 = lid4 + 0;
721 const u32 lid41 = lid4 + 1;
722 const u32 lid42 = lid4 + 2;
723 const u32 lid43 = lid4 + 3;
725 const u32 v400 = (lid40 >> 0) & 15;
726 const u32 v401 = (lid40 >> 4) & 15;
727 const u32 v410 = (lid41 >> 0) & 15;
728 const u32 v411 = (lid41 >> 4) & 15;
729 const u32 v420 = (lid42 >> 0) & 15;
730 const u32 v421 = (lid42 >> 4) & 15;
731 const u32 v430 = (lid43 >> 0) & 15;
732 const u32 v431 = (lid43 >> 4) & 15;
734 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'A' - 10 + v400) << 8
735 | ((v401 < 10) ? '0' + v401 : 'A' - 10 + v401) << 0;
736 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'A' - 10 + v410) << 8
737 | ((v411 < 10) ? '0' + v411 : 'A' - 10 + v411) << 0;
738 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'A' - 10 + v420) << 8
739 | ((v421 < 10) ? '0' + v421 : 'A' - 10 + v421) << 0;
740 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'A' - 10 + v430) << 8
741 | ((v431 < 10) ? '0' + v431 : 'A' - 10 + v431) << 0;
743 barrier (CLK_LOCAL_MEM_FENCE);
745 if (gid >= gid_max) return;
751 m04310m (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);
754 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m04310_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)
760 const u32 gid = get_global_id (0);
766 const u32 lid = get_local_id (0);
770 w0[0] = pws[gid].i[ 0];
771 w0[1] = pws[gid].i[ 1];
772 w0[2] = pws[gid].i[ 2];
773 w0[3] = pws[gid].i[ 3];
793 w3[2] = pws[gid].i[14];
796 const u32 pw_len = pws[gid].pw_len;
802 __local u32 l_bin2asc[256];
804 const u32 lid4 = lid * 4;
806 const u32 lid40 = lid4 + 0;
807 const u32 lid41 = lid4 + 1;
808 const u32 lid42 = lid4 + 2;
809 const u32 lid43 = lid4 + 3;
811 const u32 v400 = (lid40 >> 0) & 15;
812 const u32 v401 = (lid40 >> 4) & 15;
813 const u32 v410 = (lid41 >> 0) & 15;
814 const u32 v411 = (lid41 >> 4) & 15;
815 const u32 v420 = (lid42 >> 0) & 15;
816 const u32 v421 = (lid42 >> 4) & 15;
817 const u32 v430 = (lid43 >> 0) & 15;
818 const u32 v431 = (lid43 >> 4) & 15;
820 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'A' - 10 + v400) << 8
821 | ((v401 < 10) ? '0' + v401 : 'A' - 10 + v401) << 0;
822 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'A' - 10 + v410) << 8
823 | ((v411 < 10) ? '0' + v411 : 'A' - 10 + v411) << 0;
824 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'A' - 10 + v420) << 8
825 | ((v421 < 10) ? '0' + v421 : 'A' - 10 + v421) << 0;
826 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'A' - 10 + v430) << 8
827 | ((v431 < 10) ? '0' + v431 : 'A' - 10 + v431) << 0;
829 barrier (CLK_LOCAL_MEM_FENCE);
831 if (gid >= gid_max) return;
837 m04310s (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);
840 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m04310_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)
846 const u32 gid = get_global_id (0);
852 const u32 lid = get_local_id (0);
856 w0[0] = pws[gid].i[ 0];
857 w0[1] = pws[gid].i[ 1];
858 w0[2] = pws[gid].i[ 2];
859 w0[3] = pws[gid].i[ 3];
863 w1[0] = pws[gid].i[ 4];
864 w1[1] = pws[gid].i[ 5];
865 w1[2] = pws[gid].i[ 6];
866 w1[3] = pws[gid].i[ 7];
879 w3[2] = pws[gid].i[14];
882 const u32 pw_len = pws[gid].pw_len;
888 __local u32 l_bin2asc[256];
890 const u32 lid4 = lid * 4;
892 const u32 lid40 = lid4 + 0;
893 const u32 lid41 = lid4 + 1;
894 const u32 lid42 = lid4 + 2;
895 const u32 lid43 = lid4 + 3;
897 const u32 v400 = (lid40 >> 0) & 15;
898 const u32 v401 = (lid40 >> 4) & 15;
899 const u32 v410 = (lid41 >> 0) & 15;
900 const u32 v411 = (lid41 >> 4) & 15;
901 const u32 v420 = (lid42 >> 0) & 15;
902 const u32 v421 = (lid42 >> 4) & 15;
903 const u32 v430 = (lid43 >> 0) & 15;
904 const u32 v431 = (lid43 >> 4) & 15;
906 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'A' - 10 + v400) << 8
907 | ((v401 < 10) ? '0' + v401 : 'A' - 10 + v401) << 0;
908 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'A' - 10 + v410) << 8
909 | ((v411 < 10) ? '0' + v411 : 'A' - 10 + v411) << 0;
910 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'A' - 10 + v420) << 8
911 | ((v421 < 10) ? '0' + v421 : 'A' - 10 + v421) << 0;
912 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'A' - 10 + v430) << 8
913 | ((v431 < 10) ? '0' + v431 : 'A' - 10 + v431) << 0;
915 barrier (CLK_LOCAL_MEM_FENCE);
917 if (gid >= gid_max) return;
923 m04310s (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);
926 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m04310_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)
932 const u32 gid = get_global_id (0);
938 const u32 lid = get_local_id (0);
942 w0[0] = pws[gid].i[ 0];
943 w0[1] = pws[gid].i[ 1];
944 w0[2] = pws[gid].i[ 2];
945 w0[3] = pws[gid].i[ 3];
949 w1[0] = pws[gid].i[ 4];
950 w1[1] = pws[gid].i[ 5];
951 w1[2] = pws[gid].i[ 6];
952 w1[3] = pws[gid].i[ 7];
956 w2[0] = pws[gid].i[ 8];
957 w2[1] = pws[gid].i[ 9];
958 w2[2] = pws[gid].i[10];
959 w2[3] = pws[gid].i[11];
963 w3[0] = pws[gid].i[12];
964 w3[1] = pws[gid].i[13];
965 w3[2] = pws[gid].i[14];
966 w3[3] = pws[gid].i[15];
968 const u32 pw_len = pws[gid].pw_len;
974 __local u32 l_bin2asc[256];
976 const u32 lid4 = lid * 4;
978 const u32 lid40 = lid4 + 0;
979 const u32 lid41 = lid4 + 1;
980 const u32 lid42 = lid4 + 2;
981 const u32 lid43 = lid4 + 3;
983 const u32 v400 = (lid40 >> 0) & 15;
984 const u32 v401 = (lid40 >> 4) & 15;
985 const u32 v410 = (lid41 >> 0) & 15;
986 const u32 v411 = (lid41 >> 4) & 15;
987 const u32 v420 = (lid42 >> 0) & 15;
988 const u32 v421 = (lid42 >> 4) & 15;
989 const u32 v430 = (lid43 >> 0) & 15;
990 const u32 v431 = (lid43 >> 4) & 15;
992 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'A' - 10 + v400) << 8
993 | ((v401 < 10) ? '0' + v401 : 'A' - 10 + v401) << 0;
994 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'A' - 10 + v410) << 8
995 | ((v411 < 10) ? '0' + v411 : 'A' - 10 + v411) << 0;
996 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'A' - 10 + v420) << 8
997 | ((v421 < 10) ? '0' + v421 : 'A' - 10 + v421) << 0;
998 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'A' - 10 + v430) << 8
999 | ((v431 < 10) ? '0' + v431 : 'A' - 10 + v431) << 0;
1001 barrier (CLK_LOCAL_MEM_FENCE);
1003 if (gid >= gid_max) return;
1009 m04310s (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);