mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-26 01:50:10 +00:00
Prepare _a0 kernel for SIMD
This commit is contained in:
parent
beaf257b1d
commit
d8e58d5fd3
@ -22,7 +22,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_lower8(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
__kernel void m02610_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
|
@ -22,7 +22,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_lower8(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
__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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
|
@ -22,7 +22,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_lower8(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
__kernel void m02810_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
|
@ -358,7 +358,15 @@ __constant u32 c_skb[8][64] =
|
||||
}
|
||||
};
|
||||
|
||||
#if VECT_SIZE == 1
|
||||
#define BOX(i,n,S) (S)[(n)][(i)]
|
||||
#elif VECT_SIZE == 2
|
||||
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7])
|
||||
#endif
|
||||
|
||||
static void _des_crypt_encrypt (u32 iv[2], u32 data[2], u32 Kc[16], u32 Kd[16], __local u32 (*s_SPtrans)[64])
|
||||
{
|
||||
|
@ -22,7 +22,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_lower8(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
__kernel void m03710_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
|
@ -22,7 +22,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_lower8(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
__kernel void m04310_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
|
@ -22,7 +22,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_lower8(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
__kernel void m04400_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
|
@ -22,7 +22,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_lower8_le(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
__kernel void m04500_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
|
@ -23,7 +23,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_lower8_le(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
__kernel void m04700_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
|
@ -26,7 +26,15 @@
|
||||
|
||||
#define R 10
|
||||
|
||||
#if VECT_SIZE == 1
|
||||
#define BOX(S,n,i) (S)[(n)][(i)]
|
||||
#elif VECT_SIZE == 2
|
||||
#define BOX(S,n,i) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define BOX(S,n,i) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define BOX(S,n,i) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7])
|
||||
#endif
|
||||
|
||||
__constant u32 Ch[8][256] =
|
||||
{
|
||||
|
@ -292,7 +292,15 @@ __constant u32 c_tables[4][256] =
|
||||
}
|
||||
};
|
||||
|
||||
#if VECT_SIZE == 1
|
||||
#define BOX(i,n,S) (S)[(n)][(i)]
|
||||
#elif VECT_SIZE == 2
|
||||
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7])
|
||||
#endif
|
||||
|
||||
#define _round(k1,k2,tbl) \
|
||||
{ \
|
||||
|
@ -22,7 +22,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_lower8(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
__kernel void m07600_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
|
@ -22,7 +22,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_lower8_le(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
static void sha1_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[5])
|
||||
{
|
||||
|
@ -380,7 +380,25 @@ __constant u32 c_skb[8][64] =
|
||||
}
|
||||
};
|
||||
|
||||
#if VECT_SIZE == 1
|
||||
#define BOX(i,n,S) (S)[(n)][(i)]
|
||||
#elif VECT_SIZE == 2
|
||||
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7])
|
||||
#endif
|
||||
|
||||
#if VECT_SIZE == 1
|
||||
#define BOX1(i,S) (S)[(i)]
|
||||
#elif VECT_SIZE == 2
|
||||
#define BOX1(i,S) (u32x) ((S)[(i).s0], (S)[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define BOX1(i,S) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define BOX1(i,S) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7])
|
||||
#endif
|
||||
|
||||
static void _des_crypt_encrypt (u32 iv[2], u32 data[2], u32 Kc[16], u32 Kd[16], __local u32 (*s_SPtrans)[64])
|
||||
{
|
||||
|
@ -62,7 +62,25 @@ __constant u32 lotus_magic_table[256] =
|
||||
|
||||
#define BOX(S,i) (S)[(i)]
|
||||
|
||||
#define uint_to_hex_upper8(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
#if VECT_SIZE == 1
|
||||
#define BOX1(S,i) (S)[(i)]
|
||||
#elif VECT_SIZE == 2
|
||||
#define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7])
|
||||
#endif
|
||||
|
||||
static void lotus_mix (u32 *in, __local u32 *s_lotus_magic_table)
|
||||
{
|
||||
|
@ -22,7 +22,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_lower8(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
__kernel void m11100_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
|
@ -96,7 +96,15 @@ static u32 round_crc32 (u32 a, const u32 v)
|
||||
|
||||
const u32 s = a >> 8;
|
||||
|
||||
a = crc32tab[k];
|
||||
#if VECT_SIZE == 1
|
||||
a = (u32x) crc32tab[k];
|
||||
#elif VECT_SIZE == 2
|
||||
a = (u32x) (crc32tab[k.s0], crc32tab[k.s1]);
|
||||
#elif VECT_SIZE == 4
|
||||
a = (u32x) (crc32tab[k.s0], crc32tab[k.s1], crc32tab[k.s2], crc32tab[k.s3]);
|
||||
#elif VECT_SIZE == 8
|
||||
a = (u32x) (crc32tab[k.s0], crc32tab[k.s1], crc32tab[k.s2], crc32tab[k.s3], crc32tab[k.s4], crc32tab[k.s5], crc32tab[k.s6], crc32tab[k.s7]);
|
||||
#endif
|
||||
|
||||
a ^= s;
|
||||
|
||||
|
@ -26,15 +26,25 @@
|
||||
|
||||
#define INITVAL 0x0101010101010101
|
||||
|
||||
#if VECT_SIZE == 1
|
||||
#define BOX(S,n,i) (S)[(n)][(i)]
|
||||
#elif VECT_SIZE == 2
|
||||
#define BOX(S,n,i) (u64x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define BOX(S,n,i) (u64x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define BOX(S,n,i) (u64x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7])
|
||||
#endif
|
||||
|
||||
#define SBOG_LPSti64 \
|
||||
s_sbob_sl64[0][(t[0] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[1][(t[1] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[2][(t[2] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[3][(t[3] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[4][(t[4] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[5][(t[5] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[6][(t[6] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[7][(t[7] >> (i * 8)) & 0xff]
|
||||
BOX (s_sbob_sl64, 0, ((t[0] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 1, ((t[1] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 2, ((t[2] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 3, ((t[3] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 4, ((t[4] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 5, ((t[5] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 6, ((t[6] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 7, ((t[7] >> (i * 8)) & 0xff))
|
||||
|
||||
// constants
|
||||
|
||||
|
@ -26,15 +26,25 @@
|
||||
|
||||
#define INITVAL 0
|
||||
|
||||
#if VECT_SIZE == 1
|
||||
#define BOX(S,n,i) (S)[(n)][(i)]
|
||||
#elif VECT_SIZE == 2
|
||||
#define BOX(S,n,i) (u64x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define BOX(S,n,i) (u64x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define BOX(S,n,i) (u64x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7])
|
||||
#endif
|
||||
|
||||
#define SBOG_LPSti64 \
|
||||
s_sbob_sl64[0][(t[0] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[1][(t[1] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[2][(t[2] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[3][(t[3] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[4][(t[4] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[5][(t[5] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[6][(t[6] >> (i * 8)) & 0xff] ^ \
|
||||
s_sbob_sl64[7][(t[7] >> (i * 8)) & 0xff]
|
||||
BOX (s_sbob_sl64, 0, ((t[0] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 1, ((t[1] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 2, ((t[2] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 3, ((t[3] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 4, ((t[4] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 5, ((t[5] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 6, ((t[6] >> (i * 8)) & 0xff)) ^ \
|
||||
BOX (s_sbob_sl64, 7, ((t[7] >> (i * 8)) & 0xff))
|
||||
|
||||
// constants
|
||||
|
||||
|
@ -22,7 +22,15 @@
|
||||
#define COMPARE_S "OpenCL/check_single_comp4.c"
|
||||
#define COMPARE_M "OpenCL/check_multi_comp4.c"
|
||||
|
||||
#define uint_to_hex_upper8(i) l_bin2asc[(i)]
|
||||
#if VECT_SIZE == 1
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
|
||||
#endif
|
||||
|
||||
__kernel void m12600_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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user