|
|
|
@ -14,19 +14,8 @@
|
|
|
|
|
#include "inc_rp.cl"
|
|
|
|
|
#include "inc_simd.cl"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline u64 hl8_to_32(const u8 a, const u8 b, const u8 c, const u8 d)
|
|
|
|
|
{
|
|
|
|
|
return as_uint((uchar4) (a, b, c, d));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
__constant u64a blake2b_IV[8] =
|
|
|
|
|
{
|
|
|
|
|
0x6a09e667f3bcc908, 0xbb67ae8584caa73b,
|
|
|
|
|
0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1,
|
|
|
|
|
0x510e527fade682d1, 0x9b05688c2b3e6c1f,
|
|
|
|
|
0x1f83d9abfb41bd6b, 0x5be0cd19137e2179
|
|
|
|
|
};
|
|
|
|
|
#define BLAKE2B_FINAL 1
|
|
|
|
|
#define BLAKE2B_UPDATE 0
|
|
|
|
|
|
|
|
|
|
__constant u8a blake2b_sigma[12][16] =
|
|
|
|
|
{
|
|
|
|
@ -68,65 +57,21 @@ __constant u8a blake2b_sigma[12][16] =
|
|
|
|
|
BLAKE2B_G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \
|
|
|
|
|
} while(0)
|
|
|
|
|
|
|
|
|
|
void blake2b_transform(const u32x pw[16], const u32x out_len, const u64 p_salt[2], const u64 p_key[16], const u8 key_length, const u8 digest_length, u64x digest[8])
|
|
|
|
|
void blake2b_compress(u64x h[8], u64x t[2], u64x f[2], u64x m[16], u64x v[16], const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], const u32x out_len, const u8 isFinal)
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* Blake2b Init Param
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
u8 p_digest_length = digest_length;
|
|
|
|
|
u8 p_key_length = key_length;
|
|
|
|
|
u8 p_fanout = 1;
|
|
|
|
|
u8 p_depth = 1;
|
|
|
|
|
u32 p_leaf_length = 0;
|
|
|
|
|
u32 p_node_offset = 0;
|
|
|
|
|
u32 p_xof_length = 0;
|
|
|
|
|
u8 p_node_depth = 0;
|
|
|
|
|
u8 p_inner_length = 0;
|
|
|
|
|
u8 p_reserved[14];
|
|
|
|
|
u8 p_personnel[BLAKE2B_PERSONALBYTES];
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Blake2b Init State
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
u64x s_h[8];
|
|
|
|
|
u64x s_t[2];
|
|
|
|
|
u64x s_f[2];
|
|
|
|
|
u32x s_buflen;
|
|
|
|
|
u32x s_outlen;
|
|
|
|
|
u8x s_last_node;
|
|
|
|
|
|
|
|
|
|
s_h[0] = blake2b_IV[0] ^ hl8_to_32(p_digest_length, p_key_length, p_fanout, p_depth);
|
|
|
|
|
s_h[1] = blake2b_IV[1];
|
|
|
|
|
s_h[2] = blake2b_IV[2];
|
|
|
|
|
s_h[3] = blake2b_IV[3];
|
|
|
|
|
s_h[4] = blake2b_IV[4] ^ p_salt[0];
|
|
|
|
|
s_h[5] = blake2b_IV[5] ^ p_salt[1];
|
|
|
|
|
s_h[6] = blake2b_IV[6];
|
|
|
|
|
s_h[7] = blake2b_IV[7];
|
|
|
|
|
s_t[0] = hl32_to_64(0, out_len);
|
|
|
|
|
s_t[1] = 0;
|
|
|
|
|
s_f[0] = -1;
|
|
|
|
|
s_f[1] = 0;
|
|
|
|
|
s_outlen = 0;
|
|
|
|
|
s_last_node = 0;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Compress
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
u64x v[16];
|
|
|
|
|
u64x m[16];
|
|
|
|
|
|
|
|
|
|
m[0] = swap64(hl32_to_64(pw[ 1], pw[ 0]));
|
|
|
|
|
m[1] = swap64(hl32_to_64(pw[ 3], pw[ 2]));
|
|
|
|
|
m[2] = swap64(hl32_to_64(pw[ 5], pw[ 4]));
|
|
|
|
|
m[3] = swap64(hl32_to_64(pw[ 7], pw[ 6]));
|
|
|
|
|
m[4] = swap64(hl32_to_64(pw[ 9], pw[ 8]));
|
|
|
|
|
m[5] = swap64(hl32_to_64(pw[11], pw[10]));
|
|
|
|
|
m[6] = swap64(hl32_to_64(pw[13], pw[12]));
|
|
|
|
|
m[7] = swap64(hl32_to_64(pw[15], pw[14]));
|
|
|
|
|
if (isFinal)
|
|
|
|
|
f[0] = -1;
|
|
|
|
|
|
|
|
|
|
t[0] += hl32_to_64(0, out_len);
|
|
|
|
|
|
|
|
|
|
m[0] = hl32_to_64(w0[1], w0[0]);
|
|
|
|
|
m[1] = hl32_to_64(w0[3], w0[2]);
|
|
|
|
|
m[2] = hl32_to_64(w1[1], w1[0]);
|
|
|
|
|
m[3] = hl32_to_64(w1[3], w1[2]);
|
|
|
|
|
m[4] = hl32_to_64(w2[1], w2[0]);
|
|
|
|
|
m[5] = hl32_to_64(w2[3], w2[2]);
|
|
|
|
|
m[6] = hl32_to_64(w3[1], w3[0]);
|
|
|
|
|
m[7] = hl32_to_64(w3[3], w3[2]);
|
|
|
|
|
m[8] = 0;
|
|
|
|
|
m[9] = 0;
|
|
|
|
|
m[10] = 0;
|
|
|
|
@ -136,22 +81,22 @@ void blake2b_transform(const u32x pw[16], const u32x out_len, const u64 p_salt[2
|
|
|
|
|
m[14] = 0;
|
|
|
|
|
m[15] = 0;
|
|
|
|
|
|
|
|
|
|
v[ 0] = s_h[0];
|
|
|
|
|
v[ 1] = s_h[1];
|
|
|
|
|
v[ 2] = s_h[2];
|
|
|
|
|
v[ 3] = s_h[3];
|
|
|
|
|
v[ 4] = s_h[4];
|
|
|
|
|
v[ 5] = s_h[5];
|
|
|
|
|
v[ 6] = s_h[6];
|
|
|
|
|
v[ 7] = s_h[7];
|
|
|
|
|
v[ 8] = blake2b_IV[0];
|
|
|
|
|
v[ 9] = blake2b_IV[1];
|
|
|
|
|
v[10] = blake2b_IV[2];
|
|
|
|
|
v[11] = blake2b_IV[3];
|
|
|
|
|
v[12] = blake2b_IV[4] ^ s_t[0];
|
|
|
|
|
v[13] = blake2b_IV[5] ^ s_t[1];
|
|
|
|
|
v[14] = blake2b_IV[6] ^ s_f[0];
|
|
|
|
|
v[15] = blake2b_IV[7] ^ s_f[1];
|
|
|
|
|
v[ 0] = h[0];
|
|
|
|
|
v[ 1] = h[1];
|
|
|
|
|
v[ 2] = h[2];
|
|
|
|
|
v[ 3] = h[3];
|
|
|
|
|
v[ 4] = h[4];
|
|
|
|
|
v[ 5] = h[5];
|
|
|
|
|
v[ 6] = h[6];
|
|
|
|
|
v[ 7] = h[7];
|
|
|
|
|
v[ 8] = BLAKE2B_IV_00;
|
|
|
|
|
v[ 9] = BLAKE2B_IV_01;
|
|
|
|
|
v[10] = BLAKE2B_IV_02;
|
|
|
|
|
v[11] = BLAKE2B_IV_03;
|
|
|
|
|
v[12] = BLAKE2B_IV_04 ^ t[0];
|
|
|
|
|
v[13] = BLAKE2B_IV_05 ^ t[1];
|
|
|
|
|
v[14] = BLAKE2B_IV_06 ^ f[0];
|
|
|
|
|
v[15] = BLAKE2B_IV_07 ^ f[1];
|
|
|
|
|
|
|
|
|
|
BLAKE2B_ROUND( 0);
|
|
|
|
|
BLAKE2B_ROUND( 1);
|
|
|
|
@ -166,13 +111,17 @@ void blake2b_transform(const u32x pw[16], const u32x out_len, const u64 p_salt[2
|
|
|
|
|
BLAKE2B_ROUND(10);
|
|
|
|
|
BLAKE2B_ROUND(11);
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 8; ++i) {
|
|
|
|
|
s_h[i] = s_h[i] ^ v[i] ^ v[i + 8];
|
|
|
|
|
digest[i] = s_h[i];
|
|
|
|
|
}
|
|
|
|
|
h[0] = h[0] ^ v[0] ^ v[ 8];
|
|
|
|
|
h[1] = h[1] ^ v[1] ^ v[ 9];
|
|
|
|
|
h[2] = h[2] ^ v[2] ^ v[10];
|
|
|
|
|
h[3] = h[3] ^ v[3] ^ v[11];
|
|
|
|
|
h[4] = h[4] ^ v[4] ^ v[12];
|
|
|
|
|
h[5] = h[5] ^ v[5] ^ v[13];
|
|
|
|
|
h[6] = h[6] ^ v[6] ^ v[14];
|
|
|
|
|
h[7] = h[7] ^ v[7] ^ v[15];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
__kernel void m00600_m04 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
__kernel void m00600_m04 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const blake2_state_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* modifier
|
|
|
|
@ -208,39 +157,39 @@ __kernel void m00600_m04 (__global pw_t *pws, __global const kernel_rule_t *rule
|
|
|
|
|
|
|
|
|
|
const u32x out_len = apply_rules_vect(pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
|
|
|
|
|
|
|
|
|
|
u32x pw[16];
|
|
|
|
|
|
|
|
|
|
pw[ 1] = swap32(w0[0]);
|
|
|
|
|
pw[ 0] = swap32(w0[1]);
|
|
|
|
|
pw[ 3] = swap32(w0[2]);
|
|
|
|
|
pw[ 2] = swap32(w0[3]);
|
|
|
|
|
pw[ 5] = swap32(w1[0]);
|
|
|
|
|
pw[ 4] = swap32(w1[1]);
|
|
|
|
|
pw[ 7] = swap32(w1[2]);
|
|
|
|
|
pw[ 6] = swap32(w1[3]);
|
|
|
|
|
pw[ 9] = swap32(w2[0]);
|
|
|
|
|
pw[ 8] = swap32(w2[1]);
|
|
|
|
|
pw[11] = swap32(w2[2]);
|
|
|
|
|
pw[10] = swap32(w2[3]);
|
|
|
|
|
pw[13] = swap32(w3[0]);
|
|
|
|
|
pw[12] = swap32(w3[1]);
|
|
|
|
|
pw[15] = swap32(w3[2]);
|
|
|
|
|
pw[14] = swap32(w3[3]);
|
|
|
|
|
|
|
|
|
|
u64x digest[8];
|
|
|
|
|
|
|
|
|
|
digest[0] = 0;
|
|
|
|
|
digest[1] = 0;
|
|
|
|
|
digest[2] = 0;
|
|
|
|
|
digest[3] = 0;
|
|
|
|
|
digest[4] = 0;
|
|
|
|
|
digest[5] = 0;
|
|
|
|
|
digest[6] = 0;
|
|
|
|
|
digest[7] = 0;
|
|
|
|
|
|
|
|
|
|
u64 p_salt[2] = { 0, 0 };
|
|
|
|
|
u64 p_key[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
|
|
|
blake2b_transform(pw, out_len, p_salt, p_key, 0, BLAKE2B_OUTBYTES, digest);
|
|
|
|
|
u64x m[16];
|
|
|
|
|
u64x v[16];
|
|
|
|
|
|
|
|
|
|
u64x h[8];
|
|
|
|
|
u64x t[2];
|
|
|
|
|
u64x f[2];
|
|
|
|
|
|
|
|
|
|
h[0] = esalt_bufs->h[0];
|
|
|
|
|
h[1] = esalt_bufs->h[1];
|
|
|
|
|
h[2] = esalt_bufs->h[2];
|
|
|
|
|
h[3] = esalt_bufs->h[3];
|
|
|
|
|
h[4] = esalt_bufs->h[4];
|
|
|
|
|
h[5] = esalt_bufs->h[5];
|
|
|
|
|
h[6] = esalt_bufs->h[6];
|
|
|
|
|
h[7] = esalt_bufs->h[7];
|
|
|
|
|
|
|
|
|
|
t[0] = esalt_bufs->t[0];
|
|
|
|
|
t[1] = esalt_bufs->t[1];
|
|
|
|
|
f[0] = esalt_bufs->f[0];
|
|
|
|
|
f[1] = esalt_bufs->f[1];
|
|
|
|
|
|
|
|
|
|
blake2b_compress(h, t, f, m, v, w0, w1, w2, w3, out_len, BLAKE2B_FINAL);
|
|
|
|
|
|
|
|
|
|
digest[0] = h[0];
|
|
|
|
|
digest[1] = h[1];
|
|
|
|
|
digest[2] = h[2];
|
|
|
|
|
digest[3] = h[3];
|
|
|
|
|
digest[4] = h[4];
|
|
|
|
|
digest[5] = h[5];
|
|
|
|
|
digest[6] = h[6];
|
|
|
|
|
digest[7] = h[7];
|
|
|
|
|
|
|
|
|
|
const u32x r0 = h32_from_64(digest[0]);
|
|
|
|
|
const u32x r1 = l32_from_64(digest[0]);
|
|
|
|
@ -251,15 +200,15 @@ __kernel void m00600_m04 (__global pw_t *pws, __global const kernel_rule_t *rule
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
__kernel void m00600_m08 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
__kernel void m00600_m08 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const blake2_state_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
__kernel void m00600_m16 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
__kernel void m00600_m16 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const blake2_state_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
__kernel void m00600_s04 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
__kernel void m00600_s04 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const blake2_state_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* modifier
|
|
|
|
@ -310,39 +259,38 @@ __kernel void m00600_s04 (__global pw_t *pws, __global const kernel_rule_t *rule
|
|
|
|
|
|
|
|
|
|
const u32x out_len = apply_rules_vect(pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
|
|
|
|
|
|
|
|
|
|
u32x pw[16];
|
|
|
|
|
|
|
|
|
|
pw[ 1] = swap32(w0[0]);
|
|
|
|
|
pw[ 0] = swap32(w0[1]);
|
|
|
|
|
pw[ 3] = swap32(w0[2]);
|
|
|
|
|
pw[ 2] = swap32(w0[3]);
|
|
|
|
|
pw[ 5] = swap32(w1[0]);
|
|
|
|
|
pw[ 4] = swap32(w1[1]);
|
|
|
|
|
pw[ 7] = swap32(w1[2]);
|
|
|
|
|
pw[ 6] = swap32(w1[3]);
|
|
|
|
|
pw[ 9] = swap32(w2[0]);
|
|
|
|
|
pw[ 8] = swap32(w2[1]);
|
|
|
|
|
pw[11] = swap32(w2[2]);
|
|
|
|
|
pw[10] = swap32(w2[3]);
|
|
|
|
|
pw[13] = swap32(w3[0]);
|
|
|
|
|
pw[12] = swap32(w3[1]);
|
|
|
|
|
pw[15] = swap32(w3[2]);
|
|
|
|
|
pw[14] = swap32(w3[3]);
|
|
|
|
|
|
|
|
|
|
u64x digest[8];
|
|
|
|
|
|
|
|
|
|
digest[0] = 0;
|
|
|
|
|
digest[1] = 0;
|
|
|
|
|
digest[2] = 0;
|
|
|
|
|
digest[3] = 0;
|
|
|
|
|
digest[4] = 0;
|
|
|
|
|
digest[5] = 0;
|
|
|
|
|
digest[6] = 0;
|
|
|
|
|
digest[7] = 0;
|
|
|
|
|
|
|
|
|
|
u64 p_salt[2] = { 0, 0 };
|
|
|
|
|
u64 p_key[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
|
|
|
blake2b_transform(pw, out_len, p_salt, p_key, 0, BLAKE2B_OUTBYTES, digest);
|
|
|
|
|
u64x m[16];
|
|
|
|
|
u64x v[16];
|
|
|
|
|
|
|
|
|
|
u64x h[8];
|
|
|
|
|
u64x t[2];
|
|
|
|
|
u64x f[2];
|
|
|
|
|
|
|
|
|
|
h[0] = esalt_bufs->h[0];
|
|
|
|
|
h[1] = esalt_bufs->h[1];
|
|
|
|
|
h[2] = esalt_bufs->h[2];
|
|
|
|
|
h[3] = esalt_bufs->h[3];
|
|
|
|
|
h[4] = esalt_bufs->h[4];
|
|
|
|
|
h[5] = esalt_bufs->h[5];
|
|
|
|
|
h[6] = esalt_bufs->h[6];
|
|
|
|
|
h[7] = esalt_bufs->h[7];
|
|
|
|
|
|
|
|
|
|
t[0] = esalt_bufs->t[0];
|
|
|
|
|
t[1] = esalt_bufs->t[1];
|
|
|
|
|
f[0] = esalt_bufs->f[0];
|
|
|
|
|
f[1] = esalt_bufs->f[1];
|
|
|
|
|
|
|
|
|
|
blake2b_compress(h, t, f, m, v, w0, w1, w2, w3, out_len, BLAKE2B_FINAL);
|
|
|
|
|
|
|
|
|
|
digest[0] = h[0];
|
|
|
|
|
digest[1] = h[1];
|
|
|
|
|
digest[2] = h[2];
|
|
|
|
|
digest[3] = h[3];
|
|
|
|
|
digest[4] = h[4];
|
|
|
|
|
digest[5] = h[5];
|
|
|
|
|
digest[6] = h[6];
|
|
|
|
|
digest[7] = h[7];
|
|
|
|
|
|
|
|
|
|
const u32x r0 = h32_from_64(digest[0]);
|
|
|
|
|
const u32x r1 = l32_from_64(digest[0]);
|
|
|
|
@ -353,10 +301,10 @@ __kernel void m00600_s04 (__global pw_t *pws, __global const kernel_rule_t *rule
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
__kernel void m00600_s08 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
__kernel void m00600_s08 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const blake2_state_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
__kernel void m00600_s16 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
__kernel void m00600_s16 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const blake2_state_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|