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 "OpenCL/types_ocl.c"
18 #include "OpenCL/common.c"
20 #define COMPARE_S "OpenCL/check_single_comp4.c"
21 #define COMPARE_M "OpenCL/check_multi_comp4.c"
23 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
25 static void m02710m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
31 const u32 gid = get_global_id (0);
32 const u32 lid = get_local_id (0);
40 s[0] = salt_bufs[salt_pos].salt_buf[0];
41 s[1] = salt_bufs[salt_pos].salt_buf[1];
42 s[2] = salt_bufs[salt_pos].salt_buf[2];
43 s[3] = salt_bufs[salt_pos].salt_buf[3];
44 s[4] = salt_bufs[salt_pos].salt_buf[4];
45 s[5] = salt_bufs[salt_pos].salt_buf[5];
46 s[6] = salt_bufs[salt_pos].salt_buf[6];
47 s[7] = salt_bufs[salt_pos].salt_buf[7];
49 const u32 salt_len = salt_bufs[salt_pos].salt_len;
51 const u32 r_14 = (32 + salt_len) * 8;
59 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
61 const u32 w0r = bfs_buf[il_pos].i;
70 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
71 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
72 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
73 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
74 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
75 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
76 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
77 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
78 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
79 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
80 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
81 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
82 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
83 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
84 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
85 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
87 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
88 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
89 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
90 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
91 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
92 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
93 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
94 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
95 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
96 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
97 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
98 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
99 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
100 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
101 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
102 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
104 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
105 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
106 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
107 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
108 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
109 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
110 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
111 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
112 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
113 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
114 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
115 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
116 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
117 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
118 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
119 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
121 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
122 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
123 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
124 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
125 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
126 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
127 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
128 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
129 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
130 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
131 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
132 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
133 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
134 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
135 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
136 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
143 const u32 w0_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
144 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
145 const u32 w1_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
146 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
147 const u32 w2_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
148 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
149 const u32 w3_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
150 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
151 const u32 w4_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
152 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
153 const u32 w5_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
154 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
155 const u32 w6_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
156 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
157 const u32 w7_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
158 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
160 const u32 w8_t = s[0];
161 const u32 w9_t = s[1];
162 const u32 wa_t = s[2];
163 const u32 wb_t = s[3];
164 const u32 wc_t = s[4];
165 const u32 wd_t = s[5];
166 const u32 we_t = s[6];
167 const u32 wf_t = s[7];
174 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
175 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
176 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
177 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
178 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
179 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
180 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
181 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
182 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
183 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
184 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
185 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
186 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
187 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
188 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
189 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
191 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
192 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
193 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
194 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
195 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
196 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
197 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
198 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
199 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
200 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
201 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
202 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
203 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
204 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
205 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
206 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
208 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
209 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
210 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
211 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
212 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
213 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
214 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
215 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
216 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
217 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
218 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
219 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
220 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
221 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
222 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
223 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
225 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
226 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
227 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
228 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
229 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
230 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
231 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
232 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
233 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
234 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
235 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
236 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
237 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
238 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
239 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
240 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
242 const u32 r_a = a + MD5M_A;
243 const u32 r_b = b + MD5M_B;
244 const u32 r_c = c + MD5M_C;
245 const u32 r_d = d + MD5M_D;
252 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C00, MD5S00);
253 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
254 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
255 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
256 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
257 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
258 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
259 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
260 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
261 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
262 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
263 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
264 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
265 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
266 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
267 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
269 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
270 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
271 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
272 MD5_STEP0(MD5_Go, b, c, d, a, MD5C13, MD5S13);
273 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
274 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
275 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
276 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
277 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
278 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
279 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
280 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
281 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
282 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
283 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
284 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
286 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
287 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
288 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
289 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
290 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
291 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
292 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
293 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
294 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
295 MD5_STEP0(MD5_H , d, a, b, c, MD5C29, MD5S21);
296 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
297 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
298 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
299 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
300 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
301 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
303 MD5_STEP0(MD5_I , a, b, c, d, MD5C30, MD5S30);
304 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
305 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
306 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
307 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
308 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
309 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
310 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
311 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
312 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
313 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
314 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
315 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
316 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
317 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
318 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
334 static void m02710s (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
340 const u32 gid = get_global_id (0);
341 const u32 lid = get_local_id (0);
347 const u32 search[4] =
349 digests_buf[digests_offset].digest_buf[DGST_R0],
350 digests_buf[digests_offset].digest_buf[DGST_R1],
351 digests_buf[digests_offset].digest_buf[DGST_R2],
352 digests_buf[digests_offset].digest_buf[DGST_R3]
361 s[0] = salt_bufs[salt_pos].salt_buf[0];
362 s[1] = salt_bufs[salt_pos].salt_buf[1];
363 s[2] = salt_bufs[salt_pos].salt_buf[2];
364 s[3] = salt_bufs[salt_pos].salt_buf[3];
365 s[4] = salt_bufs[salt_pos].salt_buf[4];
366 s[5] = salt_bufs[salt_pos].salt_buf[5];
367 s[6] = salt_bufs[salt_pos].salt_buf[6];
368 s[7] = salt_bufs[salt_pos].salt_buf[7];
370 const u32 salt_len = salt_bufs[salt_pos].salt_len;
372 const u32 r_14 = (32 + salt_len) * 8;
380 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
382 const u32 w0r = bfs_buf[il_pos].i;
391 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
392 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
393 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
394 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
395 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
396 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
397 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
398 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
399 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
400 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
401 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
402 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
403 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
404 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
405 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
406 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
408 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
409 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
410 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
411 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
412 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
413 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
414 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
415 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
416 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
417 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
418 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
419 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
420 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
421 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
422 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
423 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
425 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
426 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
427 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
428 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
429 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
430 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
431 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
432 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
433 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
434 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
435 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
436 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
437 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
438 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
439 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
440 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
442 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
443 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
444 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
445 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
446 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
447 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
448 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
449 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
450 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
451 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
452 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
453 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
454 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
455 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
456 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
457 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
464 const u32 w0_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
465 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
466 const u32 w1_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
467 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
468 const u32 w2_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
469 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
470 const u32 w3_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
471 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
472 const u32 w4_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
473 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
474 const u32 w5_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
475 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
476 const u32 w6_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
477 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
478 const u32 w7_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
479 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
481 const u32 w8_t = s[0];
482 const u32 w9_t = s[1];
483 const u32 wa_t = s[2];
484 const u32 wb_t = s[3];
485 const u32 wc_t = s[4];
486 const u32 wd_t = s[5];
487 const u32 we_t = s[6];
488 const u32 wf_t = s[7];
495 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
496 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
497 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
498 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
499 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
500 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
501 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
502 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
503 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
504 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
505 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
506 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
507 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
508 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
509 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
510 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
512 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
513 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
514 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
515 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
516 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
517 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
518 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
519 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
520 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
521 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
522 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
523 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
524 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
525 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
526 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
527 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
529 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
530 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
531 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
532 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
533 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
534 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
535 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
536 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
537 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
538 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
539 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
540 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
541 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
542 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
543 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
544 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
546 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
547 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
548 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
549 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
550 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
551 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
552 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
553 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
554 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
555 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
556 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
557 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
558 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
559 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
560 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
561 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
563 const u32 r_a = a + MD5M_A;
564 const u32 r_b = b + MD5M_B;
565 const u32 r_c = c + MD5M_C;
566 const u32 r_d = d + MD5M_D;
573 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C00, MD5S00);
574 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
575 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
576 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
577 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
578 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
579 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
580 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
581 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
582 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
583 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
584 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
585 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
586 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
587 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
588 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
590 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
591 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
592 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
593 MD5_STEP0(MD5_Go, b, c, d, a, MD5C13, MD5S13);
594 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
595 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
596 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
597 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
598 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
599 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
600 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
601 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
602 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
603 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
604 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
605 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
607 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
608 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
609 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
610 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
611 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
612 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
613 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
614 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
615 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
616 MD5_STEP0(MD5_H , d, a, b, c, MD5C29, MD5S21);
617 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
618 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
619 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
620 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
621 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
622 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
624 MD5_STEP0(MD5_I , a, b, c, d, MD5C30, MD5S30);
625 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
626 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
627 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
628 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
629 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
630 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
631 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
632 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
633 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
634 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
635 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
636 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
638 if (allx ((a + r_a) != search[0])) continue;
640 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
641 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
642 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
658 __kernel void m02710_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
664 const u32 gid = get_global_id (0);
665 const u32 lid = get_local_id (0);
666 const u32 lsz = get_local_size (0);
674 w0[0] = pws[gid].i[ 0];
675 w0[1] = pws[gid].i[ 1];
676 w0[2] = pws[gid].i[ 2];
677 w0[3] = pws[gid].i[ 3];
697 w3[2] = pws[gid].i[14];
700 const u32 pw_len = pws[gid].pw_len;
706 __local u32 l_bin2asc[256];
708 for (u32 i = lid; i < 256; i += lsz)
710 const u32 i0 = (i >> 0) & 15;
711 const u32 i1 = (i >> 4) & 15;
713 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
714 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
717 barrier (CLK_LOCAL_MEM_FENCE);
719 if (gid >= gid_max) return;
725 m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
728 __kernel void m02710_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
734 const u32 gid = get_global_id (0);
735 const u32 lid = get_local_id (0);
736 const u32 lsz = get_local_size (0);
744 w0[0] = pws[gid].i[ 0];
745 w0[1] = pws[gid].i[ 1];
746 w0[2] = pws[gid].i[ 2];
747 w0[3] = pws[gid].i[ 3];
751 w1[0] = pws[gid].i[ 4];
752 w1[1] = pws[gid].i[ 5];
753 w1[2] = pws[gid].i[ 6];
754 w1[3] = pws[gid].i[ 7];
767 w3[2] = pws[gid].i[14];
770 const u32 pw_len = pws[gid].pw_len;
776 __local u32 l_bin2asc[256];
778 for (u32 i = lid; i < 256; i += lsz)
780 const u32 i0 = (i >> 0) & 15;
781 const u32 i1 = (i >> 4) & 15;
783 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
784 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
787 barrier (CLK_LOCAL_MEM_FENCE);
789 if (gid >= gid_max) return;
795 m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
798 __kernel void m02710_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
804 const u32 gid = get_global_id (0);
805 const u32 lid = get_local_id (0);
806 const u32 lsz = get_local_size (0);
814 w0[0] = pws[gid].i[ 0];
815 w0[1] = pws[gid].i[ 1];
816 w0[2] = pws[gid].i[ 2];
817 w0[3] = pws[gid].i[ 3];
821 w1[0] = pws[gid].i[ 4];
822 w1[1] = pws[gid].i[ 5];
823 w1[2] = pws[gid].i[ 6];
824 w1[3] = pws[gid].i[ 7];
828 w2[0] = pws[gid].i[ 8];
829 w2[1] = pws[gid].i[ 9];
830 w2[2] = pws[gid].i[10];
831 w2[3] = pws[gid].i[11];
835 w3[0] = pws[gid].i[12];
836 w3[1] = pws[gid].i[13];
837 w3[2] = pws[gid].i[14];
838 w3[3] = pws[gid].i[15];
840 const u32 pw_len = pws[gid].pw_len;
846 __local u32 l_bin2asc[256];
848 for (u32 i = lid; i < 256; i += lsz)
850 const u32 i0 = (i >> 0) & 15;
851 const u32 i1 = (i >> 4) & 15;
853 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
854 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
857 barrier (CLK_LOCAL_MEM_FENCE);
859 if (gid >= gid_max) return;
865 m02710m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
868 __kernel void m02710_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
874 const u32 gid = get_global_id (0);
875 const u32 lid = get_local_id (0);
876 const u32 lsz = get_local_size (0);
884 w0[0] = pws[gid].i[ 0];
885 w0[1] = pws[gid].i[ 1];
886 w0[2] = pws[gid].i[ 2];
887 w0[3] = pws[gid].i[ 3];
907 w3[2] = pws[gid].i[14];
910 const u32 pw_len = pws[gid].pw_len;
916 __local u32 l_bin2asc[256];
918 for (u32 i = lid; i < 256; i += lsz)
920 const u32 i0 = (i >> 0) & 15;
921 const u32 i1 = (i >> 4) & 15;
923 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
924 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
927 barrier (CLK_LOCAL_MEM_FENCE);
929 if (gid >= gid_max) return;
935 m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
938 __kernel void m02710_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
944 const u32 gid = get_global_id (0);
945 const u32 lid = get_local_id (0);
946 const u32 lsz = get_local_size (0);
954 w0[0] = pws[gid].i[ 0];
955 w0[1] = pws[gid].i[ 1];
956 w0[2] = pws[gid].i[ 2];
957 w0[3] = pws[gid].i[ 3];
961 w1[0] = pws[gid].i[ 4];
962 w1[1] = pws[gid].i[ 5];
963 w1[2] = pws[gid].i[ 6];
964 w1[3] = pws[gid].i[ 7];
977 w3[2] = pws[gid].i[14];
980 const u32 pw_len = pws[gid].pw_len;
986 __local u32 l_bin2asc[256];
988 for (u32 i = lid; i < 256; i += lsz)
990 const u32 i0 = (i >> 0) & 15;
991 const u32 i1 = (i >> 4) & 15;
993 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
994 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
997 barrier (CLK_LOCAL_MEM_FENCE);
999 if (gid >= gid_max) return;
1005 m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
1008 __kernel void m02710_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
1014 const u32 gid = get_global_id (0);
1015 const u32 lid = get_local_id (0);
1016 const u32 lsz = get_local_size (0);
1024 w0[0] = pws[gid].i[ 0];
1025 w0[1] = pws[gid].i[ 1];
1026 w0[2] = pws[gid].i[ 2];
1027 w0[3] = pws[gid].i[ 3];
1031 w1[0] = pws[gid].i[ 4];
1032 w1[1] = pws[gid].i[ 5];
1033 w1[2] = pws[gid].i[ 6];
1034 w1[3] = pws[gid].i[ 7];
1038 w2[0] = pws[gid].i[ 8];
1039 w2[1] = pws[gid].i[ 9];
1040 w2[2] = pws[gid].i[10];
1041 w2[3] = pws[gid].i[11];
1045 w3[0] = pws[gid].i[12];
1046 w3[1] = pws[gid].i[13];
1047 w3[2] = pws[gid].i[14];
1048 w3[3] = pws[gid].i[15];
1050 const u32 pw_len = pws[gid].pw_len;
1056 __local u32 l_bin2asc[256];
1058 for (u32 i = lid; i < 256; i += lsz)
1060 const u32 i0 = (i >> 0) & 15;
1061 const u32 i1 = (i >> 4) & 15;
1063 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
1064 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
1067 barrier (CLK_LOCAL_MEM_FENCE);
1069 if (gid >= gid_max) return;
1075 m02710s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);