diff --git a/OpenCL/amp_a0.cl b/OpenCL/amp_a0.cl index 857e5ff4d..4559804d3 100644 --- a/OpenCL/amp_a0.cl +++ b/OpenCL/amp_a0.cl @@ -13,9 +13,10 @@ #include STR(INCLUDE_PATH/inc_common.cl) #include STR(INCLUDE_PATH/inc_rp.h) #include STR(INCLUDE_PATH/inc_rp.cl) +#include STR(INCLUDE_PATH/inc_amp.h) #endif -KERNEL_FQ void amp (GLOBAL_AS pw_t *pws, GLOBAL_AS pw_t *pws_amp, CONSTANT_AS const kernel_rule_t *rules_buf, GLOBAL_AS const pw_t *combs_buf, GLOBAL_AS const bf_t *bfs_buf, const u32 combs_mode, const u64 gid_max) +KERNEL_FQ void amp (KERN_ATTR_AMP) { const u64 gid = get_global_id (0); diff --git a/OpenCL/amp_a1.cl b/OpenCL/amp_a1.cl index 82af6bca8..a8911e8ca 100644 --- a/OpenCL/amp_a1.cl +++ b/OpenCL/amp_a1.cl @@ -11,9 +11,10 @@ #include STR(INCLUDE_PATH/inc_types.h) #include STR(INCLUDE_PATH/inc_platform.cl) #include STR(INCLUDE_PATH/inc_common.cl) +#include STR(INCLUDE_PATH/inc_amp.h) #endif -KERNEL_FQ void amp (GLOBAL_AS pw_t *pws, GLOBAL_AS pw_t *pws_amp, GLOBAL_AS const kernel_rule_t *rules_buf, GLOBAL_AS const pw_t *combs_buf, GLOBAL_AS const bf_t *bfs_buf, const u32 combs_mode, const u64 gid_max) +KERNEL_FQ void amp (KERN_ATTR_AMP) { const u64 gid = get_global_id (0); diff --git a/OpenCL/amp_a3.cl b/OpenCL/amp_a3.cl index acb6050b3..287dbb35b 100644 --- a/OpenCL/amp_a3.cl +++ b/OpenCL/amp_a3.cl @@ -10,9 +10,10 @@ #include STR(INCLUDE_PATH/inc_vendor.h) #include STR(INCLUDE_PATH/inc_types.h) #include STR(INCLUDE_PATH/inc_platform.cl) +#include STR(INCLUDE_PATH/inc_amp.h) #endif -KERNEL_FQ void amp (GLOBAL_AS pw_t *pws, GLOBAL_AS pw_t *pws_amp, GLOBAL_AS const kernel_rule_t *rules_buf, GLOBAL_AS const pw_t *combs_buf, CONSTANT_AS bf_t *bfs_buf, const u32 combs_mode, const u64 gid_max) +KERNEL_FQ void amp (KERN_ATTR_AMP) { const u64 gid = get_global_id (0); diff --git a/OpenCL/inc_amp.h b/OpenCL/inc_amp.h new file mode 100644 index 000000000..d0e0d0a30 --- /dev/null +++ b/OpenCL/inc_amp.h @@ -0,0 +1,34 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#ifndef _INC_AMP_H +#define _INC_AMP_H + +#if defined IS_METAL + +#define KERN_ATTR_AMP \ + GLOBAL_AS pw_t *pws, \ + GLOBAL_AS pw_t *pws_amp, \ + CONSTANT_AS const kernel_rule_t *rules_buf, \ + GLOBAL_AS const pw_t *combs_buf, \ + GLOBAL_AS const bf_t *bfs_buf, \ + CONSTANT_AS const u32 &combs_mode, \ + CONSTANT_AS const u64 &gid_max, \ + uint hc_gid [[ thread_position_in_grid ]] + +#else // CUDA, HIP, OpenCL + +#define KERN_ATTR_AMP \ + GLOBAL_AS pw_t *pws, \ + GLOBAL_AS pw_t *pws_amp, \ + CONSTANT_AS const kernel_rule_t *rules_buf, \ + GLOBAL_AS const pw_t *combs_buf, \ + GLOBAL_AS const bf_t *bfs_buf, \ + const u32 combs_mode, \ + const u64 gid_max + +#endif // IS_METAL + +#endif // _INC_AMP_H diff --git a/OpenCL/inc_cipher_aes-gcm.cl b/OpenCL/inc_cipher_aes-gcm.cl index b8d9bd1f9..a5a3c0e00 100644 --- a/OpenCL/inc_cipher_aes-gcm.cl +++ b/OpenCL/inc_cipher_aes-gcm.cl @@ -10,12 +10,12 @@ #include "inc_cipher_aes.h" #include "inc_cipher_aes-gcm.h" -DECLSPEC void AES_GCM_inc32 (u32 *block) +DECLSPEC void AES_GCM_inc32 (PRIVATE_AS u32 *block) { block[3] += 1; } -DECLSPEC void AES_GCM_xor_block (u32 *dst, const u32 *src) +DECLSPEC void AES_GCM_xor_block (PRIVATE_AS u32 *dst, PRIVATE_AS const u32 *src) { dst[0] ^= src[0]; dst[1] ^= src[1]; @@ -23,7 +23,7 @@ DECLSPEC void AES_GCM_xor_block (u32 *dst, const u32 *src) dst[3] ^= src[3]; } -DECLSPEC void AES_GCM_gf_mult (const u32 *x, const u32 *y, u32 *z) +DECLSPEC void AES_GCM_gf_mult (PRIVATE_AS const u32 *x, PRIVATE_AS const u32 *y, PRIVATE_AS u32 *z) { z[0] = 0; z[1] = 0; @@ -63,7 +63,7 @@ DECLSPEC void AES_GCM_gf_mult (const u32 *x, const u32 *y, u32 *z) } } -DECLSPEC void AES_GCM_ghash (const u32 *subkey, const u32 *in, int in_len, u32 *out) +DECLSPEC void AES_GCM_ghash (PRIVATE_AS const u32 *subkey, PRIVATE_AS const u32 *in, int in_len, PRIVATE_AS u32 *out) { int i; int j; @@ -113,7 +113,7 @@ DECLSPEC void AES_GCM_ghash (const u32 *subkey, const u32 *in, int in_len, u32 * } } -DECLSPEC void AES_GCM_ghash_global (const u32 *subkey, GLOBAL_AS const u32 *in, int in_len, u32 *out) +DECLSPEC void AES_GCM_ghash_global (PRIVATE_AS const u32 *subkey, GLOBAL_AS const u32 *in, int in_len, PRIVATE_AS u32 *out) { int i; int j; @@ -163,7 +163,7 @@ DECLSPEC void AES_GCM_ghash_global (const u32 *subkey, GLOBAL_AS const u32 *in, } } -DECLSPEC void AES_GCM_Init (const u32 *ukey, int key_len, u32 *key, u32 *subkey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void AES_GCM_Init (PRIVATE_AS const u32 *ukey, int key_len, PRIVATE_AS u32 *key, PRIVATE_AS u32 *subkey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { if (key_len == 128) { @@ -185,7 +185,7 @@ DECLSPEC void AES_GCM_Init (const u32 *ukey, int key_len, u32 *key, u32 *subkey, } } -DECLSPEC void AES_GCM_Prepare_J0 (const u32 *iv, int iv_len, const u32 *subkey, u32 *J0) +DECLSPEC void AES_GCM_Prepare_J0 (PRIVATE_AS const u32 *iv, int iv_len, PRIVATE_AS const u32 *subkey, PRIVATE_AS u32 *J0) { if (iv_len == 12) { @@ -206,11 +206,10 @@ DECLSPEC void AES_GCM_Prepare_J0 (const u32 *iv, int iv_len, const u32 *subkey, } } -DECLSPEC void AES_GCM_gctr (const u32 *key, const u32 *iv, const u32 *in, int in_len, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void AES_GCM_gctr (PRIVATE_AS const u32 *key, PRIVATE_AS const u32 *iv, PRIVATE_AS const u32 *in, int in_len, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { - const u32 *xpos = in; - - u32 *ypos = out; + PRIVATE_AS const u32 *xpos = (PRIVATE_AS u32 *) in; + PRIVATE_AS u32 *ypos = (PRIVATE_AS u32 *) out; u32 iv_buf[4]; @@ -249,7 +248,7 @@ DECLSPEC void AES_GCM_gctr (const u32 *key, const u32 *iv, const u32 *in, int in } } -DECLSPEC void AES_GCM_GCTR (u32 *key, u32 *J0, const u32 *in, int in_len, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void AES_GCM_GCTR (PRIVATE_AS u32 *key, PRIVATE_AS u32 *J0, PRIVATE_AS const u32 *in, int in_len, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 J0_incr[4]; @@ -261,7 +260,7 @@ DECLSPEC void AES_GCM_GCTR (u32 *key, u32 *J0, const u32 *in, int in_len, u32 *o AES_GCM_gctr (key, J0_incr, in, in_len, out, s_te0, s_te1, s_te2, s_te3, s_te4); } -DECLSPEC void AES_GCM_GHASH (const u32 *subkey, const u32 *aad_buf, int aad_len, const u32 *enc_buf, int enc_len, u32 *out) +DECLSPEC void AES_GCM_GHASH (PRIVATE_AS const u32 *subkey, PRIVATE_AS const u32 *aad_buf, int aad_len, PRIVATE_AS const u32 *enc_buf, int enc_len, PRIVATE_AS u32 *out) { out[0] = 0; out[1] = 0; @@ -282,7 +281,7 @@ DECLSPEC void AES_GCM_GHASH (const u32 *subkey, const u32 *aad_buf, int aad_len, AES_GCM_ghash (subkey, len_buf, 16, out); } -DECLSPEC void AES_GCM_GHASH_GLOBAL (const u32 *subkey, const u32 *aad_buf, int aad_len, GLOBAL_AS const u32 *enc_buf, int enc_len, u32 *out) +DECLSPEC void AES_GCM_GHASH_GLOBAL (PRIVATE_AS const u32 *subkey, PRIVATE_AS const u32 *aad_buf, int aad_len, GLOBAL_AS const u32 *enc_buf, int enc_len, PRIVATE_AS u32 *out) { out[0] = 0; out[1] = 0; diff --git a/OpenCL/inc_cipher_aes-gcm.h b/OpenCL/inc_cipher_aes-gcm.h index 753a4d0c7..e4430bbc4 100644 --- a/OpenCL/inc_cipher_aes-gcm.h +++ b/OpenCL/inc_cipher_aes-gcm.h @@ -6,16 +6,16 @@ #ifndef _INC_CIPHER_AES_GCM_H #define _INC_CIPHER_AES_GCM_H -DECLSPEC void AES_GCM_inc32 (u32 *block); -DECLSPEC void AES_GCM_xor_block (u32 *dst, const u32 *src); -DECLSPEC void AES_GCM_gf_mult (const u32 *x, const u32 *y, u32 *z); -DECLSPEC void AES_GCM_ghash (const u32 *subkey, const u32 *in, int in_len, u32 *out); -DECLSPEC void AES_GCM_ghash_global (const u32 *subkey, GLOBAL_AS const u32 *in, int in_len, u32 *out); -DECLSPEC void AES_GCM_Init (const u32 *ukey, int key_len, u32 *key, u32 *subkey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); -DECLSPEC void AES_GCM_Prepare_J0 (const u32 *iv, int iv_len, const u32 *subkey, u32 *J0); -DECLSPEC void AES_GCM_gctr (const u32 *key, const u32 *iv, const u32 *in, int in_len, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); -DECLSPEC void AES_GCM_GCTR (u32 *key, u32 *J0, const u32 *in, int in_len, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); -DECLSPEC void AES_GCM_GHASH (const u32 *subkey, const u32 *aad_buf, int aad_len, const u32 *enc_buf, int enc_len, u32 *out); -DECLSPEC void AES_GCM_GHASH_GLOBAL (const u32 *subkey, const u32 *aad_buf, int aad_len, GLOBAL_AS const u32 *enc_buf, int enc_len, u32 *out); +DECLSPEC void AES_GCM_inc32 (PRIVATE_AS u32 *block); +DECLSPEC void AES_GCM_xor_block (PRIVATE_AS u32 *dst, PRIVATE_AS const u32 *src); +DECLSPEC void AES_GCM_gf_mult (PRIVATE_AS const u32 *x, PRIVATE_AS const u32 *y, PRIVATE_AS u32 *z); +DECLSPEC void AES_GCM_ghash (PRIVATE_AS const u32 *subkey, PRIVATE_AS const u32 *in, int in_len, PRIVATE_AS u32 *out); +DECLSPEC void AES_GCM_ghash_global (PRIVATE_AS const u32 *subkey, GLOBAL_AS const u32 *in, int in_len, PRIVATE_AS u32 *out); +DECLSPEC void AES_GCM_Init (PRIVATE_AS const u32 *ukey, int key_len, PRIVATE_AS u32 *key, PRIVATE_AS u32 *subkey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void AES_GCM_Prepare_J0 (PRIVATE_AS const u32 *iv, int iv_len, PRIVATE_AS const u32 *subkey, PRIVATE_AS u32 *J0); +DECLSPEC void AES_GCM_gctr (PRIVATE_AS const u32 *key, PRIVATE_AS const u32 *iv, PRIVATE_AS const u32 *in, int in_len, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void AES_GCM_GCTR (PRIVATE_AS u32 *key, PRIVATE_AS u32 *J0, PRIVATE_AS const u32 *in, int in_len, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void AES_GCM_GHASH (PRIVATE_AS const u32 *subkey, PRIVATE_AS const u32 *aad_buf, int aad_len, PRIVATE_AS const u32 *enc_buf, int enc_len, PRIVATE_AS u32 *out); +DECLSPEC void AES_GCM_GHASH_GLOBAL (PRIVATE_AS const u32 *subkey, PRIVATE_AS const u32 *aad_buf, int aad_len, GLOBAL_AS const u32 *enc_buf, int enc_len, PRIVATE_AS u32 *out); #endif // _INC_CIPHER_AES_GCM_H diff --git a/OpenCL/inc_cipher_aes.cl b/OpenCL/inc_cipher_aes.cl index ed98d58d9..c1a10e09d 100644 --- a/OpenCL/inc_cipher_aes.cl +++ b/OpenCL/inc_cipher_aes.cl @@ -691,7 +691,7 @@ CONSTANT_VK u32a td4[256] = // 128 bit key -DECLSPEC void aes128_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) +DECLSPEC void aes128_ExpandKey (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) { ks[ 0] = ukey[0]; ks[ 1] = ukey[1]; @@ -779,7 +779,7 @@ DECLSPEC void aes128_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, S ks[43] = ks[39] ^ ks[42]; } -DECLSPEC void aes128_InvertKey (u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) +DECLSPEC void aes128_InvertKey (PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) { u32 temp; @@ -842,7 +842,7 @@ DECLSPEC void aes128_InvertKey (u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td ks[39] = s_td0[s_te1[(ks[39] >> 24) & 0xff] & 0xff] ^ s_td1[s_te1[(ks[39] >> 16) & 0xff] & 0xff] ^ s_td2[s_te1[(ks[39] >> 8) & 0xff] & 0xff] ^ s_td3[s_te1[(ks[39] >> 0) & 0xff] & 0xff]; } -DECLSPEC void aes128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) +DECLSPEC void aes128_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) { u32 ukey_s[4]; @@ -854,7 +854,7 @@ DECLSPEC void aes128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes128_ExpandKey (ks, ukey_s, s_te0, s_te1, s_te2, s_te3); } -DECLSPEC void aes128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) +DECLSPEC void aes128_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) { u32 ukey_s[4]; @@ -868,7 +868,7 @@ DECLSPEC void aes128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes128_InvertKey (ks, s_te1, s_td0, s_td1, s_td2, s_td3); } -DECLSPEC void aes128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes128_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 in_s[4]; @@ -954,7 +954,7 @@ DECLSPEC void aes128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u out[3] = hc_swap32_S (out[3]); } -DECLSPEC void aes128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes128_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 in_s[4]; @@ -1042,7 +1042,7 @@ DECLSPEC void aes128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u // 192 bit key -DECLSPEC void aes192_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) +DECLSPEC void aes192_ExpandKey (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) { ks[ 0] = ukey[0]; ks[ 1] = ukey[1]; @@ -1130,7 +1130,7 @@ DECLSPEC void aes192_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, S ks[51] = ks[45] ^ ks[50]; } -DECLSPEC void aes192_InvertKey (u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) +DECLSPEC void aes192_InvertKey (PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) { u32 temp; @@ -1205,7 +1205,7 @@ DECLSPEC void aes192_InvertKey (u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td ks[47] = s_td0[s_te1[(ks[47] >> 24) & 0xff] & 0xff] ^ s_td1[s_te1[(ks[47] >> 16) & 0xff] & 0xff] ^ s_td2[s_te1[(ks[47] >> 8) & 0xff] & 0xff] ^ s_td3[s_te1[(ks[47] >> 0) & 0xff] & 0xff]; } -DECLSPEC void aes192_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) +DECLSPEC void aes192_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) { u32 ukey_s[6]; @@ -1219,7 +1219,7 @@ DECLSPEC void aes192_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes192_ExpandKey (ks, ukey_s, s_te0, s_te1, s_te2, s_te3); } -DECLSPEC void aes192_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) +DECLSPEC void aes192_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) { u32 ukey_s[6]; @@ -1235,7 +1235,7 @@ DECLSPEC void aes192_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes192_InvertKey (ks, s_te1, s_td0, s_td1, s_td2, s_td3); } -DECLSPEC void aes192_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes192_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 in_s[4]; @@ -1329,7 +1329,7 @@ DECLSPEC void aes192_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u out[3] = hc_swap32_S (out[3]); } -DECLSPEC void aes192_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes192_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 in_s[4]; @@ -1425,7 +1425,7 @@ DECLSPEC void aes192_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u // 256 bit key -DECLSPEC void aes256_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) +DECLSPEC void aes256_ExpandKey (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) { ks[ 0] = ukey[0]; ks[ 1] = ukey[1]; @@ -1541,7 +1541,7 @@ DECLSPEC void aes256_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, S ks[59] = ks[51] ^ ks[58]; } -DECLSPEC void aes256_InvertKey (u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) +DECLSPEC void aes256_InvertKey (PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) { u32 temp; @@ -1628,7 +1628,7 @@ DECLSPEC void aes256_InvertKey (u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td ks[55] = s_td0[s_te1[(ks[55] >> 24) & 0xff] & 0xff] ^ s_td1[s_te1[(ks[55] >> 16) & 0xff] & 0xff] ^ s_td2[s_te1[(ks[55] >> 8) & 0xff] & 0xff] ^ s_td3[s_te1[(ks[55] >> 0) & 0xff] & 0xff]; } -DECLSPEC void aes256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) +DECLSPEC void aes256_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) { u32 ukey_s[8]; @@ -1644,7 +1644,7 @@ DECLSPEC void aes256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes256_ExpandKey (ks, ukey_s, s_te0, s_te1, s_te2, s_te3); } -DECLSPEC void aes256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) +DECLSPEC void aes256_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) { u32 ukey_s[8]; @@ -1662,7 +1662,7 @@ DECLSPEC void aes256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes256_InvertKey (ks, s_te1, s_td0, s_td1, s_td2, s_td3); } -DECLSPEC void aes256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes256_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 in_s[4]; @@ -1764,7 +1764,7 @@ DECLSPEC void aes256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u out[3] = hc_swap32_S (out[3]); } -DECLSPEC void aes256_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes256_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 in_s[4]; @@ -1868,7 +1868,7 @@ DECLSPEC void aes256_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u // wrapper to avoid hc_swap32_S() confusion in the kernel code -DECLSPEC void AES128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) +DECLSPEC void AES128_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) { u32 ukey_s[4]; @@ -1880,7 +1880,7 @@ DECLSPEC void AES128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes128_set_encrypt_key (ks, ukey_s, s_te0, s_te1, s_te2, s_te3); } -DECLSPEC void AES128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) +DECLSPEC void AES128_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) { u32 ukey_s[4]; @@ -1892,7 +1892,7 @@ DECLSPEC void AES128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes128_set_decrypt_key (ks, ukey_s, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); } -DECLSPEC void AES128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void AES128_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 in_s[4]; @@ -1911,7 +1911,7 @@ DECLSPEC void AES128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u out[3] = hc_swap32_S (out_s[3]); } -DECLSPEC void AES128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void AES128_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 in_s[4]; @@ -1930,7 +1930,7 @@ DECLSPEC void AES128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u out[3] = hc_swap32_S (out_s[3]); } -DECLSPEC void AES192_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) +DECLSPEC void AES192_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) { u32 ukey_s[6]; @@ -1944,7 +1944,7 @@ DECLSPEC void AES192_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes192_set_encrypt_key (ks, ukey_s, s_te0, s_te1, s_te2, s_te3); } -DECLSPEC void AES192_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) +DECLSPEC void AES192_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) { u32 ukey_s[6]; @@ -1958,7 +1958,7 @@ DECLSPEC void AES192_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes192_set_decrypt_key (ks, ukey_s, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); } -DECLSPEC void AES192_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void AES192_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 in_s[4]; @@ -1977,7 +1977,7 @@ DECLSPEC void AES192_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u out[3] = hc_swap32_S (out_s[3]); } -DECLSPEC void AES192_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void AES192_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 in_s[4]; @@ -1996,7 +1996,7 @@ DECLSPEC void AES192_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u out[3] = hc_swap32_S (out_s[3]); } -DECLSPEC void AES256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) +DECLSPEC void AES256_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3) { u32 ukey_s[8]; @@ -2012,7 +2012,7 @@ DECLSPEC void AES256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes256_set_encrypt_key (ks, ukey_s, s_te0, s_te1, s_te2, s_te3); } -DECLSPEC void AES256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) +DECLSPEC void AES256_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3) { u32 ukey_s[8]; @@ -2028,7 +2028,7 @@ DECLSPEC void AES256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_ aes256_set_decrypt_key (ks, ukey_s, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); } -DECLSPEC void AES256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void AES256_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 in_s[4]; @@ -2047,7 +2047,7 @@ DECLSPEC void AES256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u out[3] = hc_swap32_S (out_s[3]); } -DECLSPEC void AES256_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void AES256_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 in_s[4]; diff --git a/OpenCL/inc_cipher_aes.h b/OpenCL/inc_cipher_aes.h index d2edaf3ae..a2196dbaa 100644 --- a/OpenCL/inc_cipher_aes.h +++ b/OpenCL/inc_cipher_aes.h @@ -6,35 +6,35 @@ #ifndef _INC_CIPHER_AES_H #define _INC_CIPHER_AES_H -DECLSPEC void aes128_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); -DECLSPEC void aes128_InvertKey (u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); -DECLSPEC void aes128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); -DECLSPEC void aes128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); -DECLSPEC void aes128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); -DECLSPEC void aes128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void aes192_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); -DECLSPEC void aes192_InvertKey (u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); -DECLSPEC void aes192_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); -DECLSPEC void aes192_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); -DECLSPEC void aes192_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); -DECLSPEC void aes192_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void aes256_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); -DECLSPEC void aes256_InvertKey (u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); -DECLSPEC void aes256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); -DECLSPEC void aes256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); -DECLSPEC void aes256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); -DECLSPEC void aes256_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void AES128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); -DECLSPEC void AES128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); -DECLSPEC void AES128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); -DECLSPEC void AES128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void AES192_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); -DECLSPEC void AES192_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); -DECLSPEC void AES192_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); -DECLSPEC void AES192_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void AES256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); -DECLSPEC void AES256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); -DECLSPEC void AES256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); -DECLSPEC void AES256_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void aes128_ExpandKey (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); +DECLSPEC void aes128_InvertKey (PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); +DECLSPEC void aes128_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); +DECLSPEC void aes128_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); +DECLSPEC void aes128_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void aes128_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void aes192_ExpandKey (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); +DECLSPEC void aes192_InvertKey (PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); +DECLSPEC void aes192_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); +DECLSPEC void aes192_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); +DECLSPEC void aes192_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void aes192_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void aes256_ExpandKey (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); +DECLSPEC void aes256_InvertKey (PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); +DECLSPEC void aes256_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); +DECLSPEC void aes256_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); +DECLSPEC void aes256_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void aes256_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void AES128_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); +DECLSPEC void AES128_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); +DECLSPEC void AES128_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void AES128_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void AES192_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); +DECLSPEC void AES192_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); +DECLSPEC void AES192_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void AES192_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void AES256_set_encrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3); +DECLSPEC void AES256_set_decrypt_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3); +DECLSPEC void AES256_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4); +DECLSPEC void AES256_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); #endif // _INC_CIPHER_AES_H diff --git a/OpenCL/inc_cipher_camellia.cl b/OpenCL/inc_cipher_camellia.cl index 08c73e6f4..b970261ff 100644 --- a/OpenCL/inc_cipher_camellia.cl +++ b/OpenCL/inc_cipher_camellia.cl @@ -64,7 +64,7 @@ CONSTANT_VK u32a c_sbox[256] = #define cam_rotate(a,b,n) hc_swap32_S ((u[(a)] << (n)) ^ (u[(b)] >> (32 - (n)))) -DECLSPEC void cam_feistel (const u32 *x, const u32 *k, u32 *y) +DECLSPEC void cam_feistel (PRIVATE_AS const u32 *x, PRIVATE_AS const u32 *k, PRIVATE_AS u32 *y) { const u32 xk0 = x[0] ^ k[0]; const u32 xk1 = x[1] ^ k[1]; @@ -131,7 +131,7 @@ DECLSPEC void cam_feistel (const u32 *x, const u32 *k, u32 *y) y[1] ^= t1; } -DECLSPEC void cam_fl (u32 *x, const u32 *kl, const u32 *kr) +DECLSPEC void cam_fl (PRIVATE_AS u32 *x, PRIVATE_AS const u32 *kl, PRIVATE_AS const u32 *kr) { u32 t[4]; u32 u[4]; @@ -167,7 +167,7 @@ DECLSPEC void cam_fl (u32 *x, const u32 *kl, const u32 *kr) x[3] = hc_swap32_S (t[3]); } -DECLSPEC void camellia256_set_key (u32 *ks, const u32 *ukey) +DECLSPEC void camellia256_set_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey) { const u32 sigma[12] = { @@ -302,7 +302,7 @@ DECLSPEC void camellia256_set_key (u32 *ks, const u32 *ukey) ks[67] = cam_rotate (14, 15, 15); } -DECLSPEC void camellia256_encrypt (const u32 *ks, const u32 *in, u32 *out) +DECLSPEC void camellia256_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { out[0] = in[0] ^ ks[0]; out[1] = in[1] ^ ks[1]; @@ -354,7 +354,7 @@ DECLSPEC void camellia256_encrypt (const u32 *ks, const u32 *in, u32 *out) out[3] = tmp[1] ^ ks[67]; } -DECLSPEC void camellia256_decrypt (const u32 *ks, const u32 *in, u32 *out) +DECLSPEC void camellia256_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { out[0] = in[0] ^ ks[64]; out[1] = in[1] ^ ks[65]; diff --git a/OpenCL/inc_cipher_camellia.h b/OpenCL/inc_cipher_camellia.h index 705d75ec8..fcbb18d44 100644 --- a/OpenCL/inc_cipher_camellia.h +++ b/OpenCL/inc_cipher_camellia.h @@ -6,10 +6,10 @@ #ifndef _INC_CIPHER_CAMELLIA_H #define _INC_CIPHER_CAMELLIA_H -DECLSPEC void cam_feistel (const u32 *x, const u32 *k, u32 *y); -DECLSPEC void cam_fl (u32 *x, const u32 *kl, const u32 *kr); -DECLSPEC void camellia256_set_key (u32 *ks, const u32 *ukey); -DECLSPEC void camellia256_encrypt (const u32 *ks, const u32 *in, u32 *out); -DECLSPEC void camellia256_decrypt (const u32 *ks, const u32 *in, u32 *out); +DECLSPEC void cam_feistel (PRIVATE_AS const u32 *x, PRIVATE_AS const u32 *k, PRIVATE_AS u32 *y); +DECLSPEC void cam_fl (PRIVATE_AS u32 *x, PRIVATE_AS const u32 *kl, PRIVATE_AS const u32 *kr); +DECLSPEC void camellia256_set_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey); +DECLSPEC void camellia256_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void camellia256_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); #endif // _INC_CIPHER_CAMELLIA_H diff --git a/OpenCL/inc_cipher_des.cl b/OpenCL/inc_cipher_des.cl index 6c2e7fca8..da5dfdc8a 100644 --- a/OpenCL/inc_cipher_des.cl +++ b/OpenCL/inc_cipher_des.cl @@ -313,7 +313,7 @@ CONSTANT_VK u32a c_skb[8][64] = } }; -DECLSPEC void _des_crypt_encrypt (u32 *out, const u32 *in, const u32 *Kc, const u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *out, PRIVATE_AS const u32 *in, PRIVATE_AS const u32 *Kc, PRIVATE_AS const u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) { u32 r = in[0]; u32 l = in[1]; @@ -365,7 +365,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *out, const u32 *in, const u32 *Kc, const out[1] = r; } -DECLSPEC void _des_crypt_decrypt (u32 *out, const u32 *in, const u32 *Kc, const u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_decrypt (PRIVATE_AS u32 *out, PRIVATE_AS const u32 *in, PRIVATE_AS const u32 *Kc, PRIVATE_AS const u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) { u32 r = in[0]; u32 l = in[1]; @@ -417,7 +417,7 @@ DECLSPEC void _des_crypt_decrypt (u32 *out, const u32 *in, const u32 *Kc, const out[1] = r; } -DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, SHM_TYPE u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, SHM_TYPE u32 (*s_skb)[64]) { PERM_OP_S (d, c, 4, 0x0f0f0f0f); HPERM_OP_S (c, 2, 0xcccc0000); @@ -487,7 +487,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, SHM_TYPE u32 } } -DECLSPEC void _des_crypt_encrypt_vect (u32x *out, const u32x *in, const u32x *Kc, const u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt_vect (PRIVATE_AS u32x *out, PRIVATE_AS const u32x *in, PRIVATE_AS const u32x *Kc, PRIVATE_AS const u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) { u32x r = in[0]; u32x l = in[1]; @@ -539,7 +539,7 @@ DECLSPEC void _des_crypt_encrypt_vect (u32x *out, const u32x *in, const u32x *Kc out[1] = r; } -DECLSPEC void _des_crypt_decrypt_vect (u32x *out, const u32x *in, const u32x *Kc, const u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_decrypt_vect (PRIVATE_AS u32x *out, PRIVATE_AS const u32x *in, PRIVATE_AS const u32x *Kc, PRIVATE_AS const u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) { u32x r = in[0]; u32x l = in[1]; @@ -591,7 +591,7 @@ DECLSPEC void _des_crypt_decrypt_vect (u32x *out, const u32x *in, const u32x *Kc out[1] = r; } -DECLSPEC void _des_crypt_keysetup_vect (u32x c, u32x d, u32x *Kc, u32x *Kd, SHM_TYPE u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup_vect (u32x c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, SHM_TYPE u32 (*s_skb)[64]) { PERM_OP (d, c, 4, 0x0f0f0f0f); HPERM_OP (c, 2, 0xcccc0000); diff --git a/OpenCL/inc_cipher_des.h b/OpenCL/inc_cipher_des.h index c93ff422c..693ca8d73 100644 --- a/OpenCL/inc_cipher_des.h +++ b/OpenCL/inc_cipher_des.h @@ -101,12 +101,12 @@ #define DES_BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *out, const u32 *in, const u32 *Kc, const u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]); -DECLSPEC void _des_crypt_decrypt (u32 *out, const u32 *in, const u32 *Kc, const u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]); -DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, SHM_TYPE u32 (*s_skb)[64]); +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *out, PRIVATE_AS const u32 *in, PRIVATE_AS const u32 *Kc, PRIVATE_AS const u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]); +DECLSPEC void _des_crypt_decrypt (PRIVATE_AS u32 *out, PRIVATE_AS const u32 *in, PRIVATE_AS const u32 *Kc, PRIVATE_AS const u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]); +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, SHM_TYPE u32 (*s_skb)[64]); -DECLSPEC void _des_crypt_encrypt_vect (u32x *out, const u32x *in, const u32x *Kc, const u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]); -DECLSPEC void _des_crypt_decrypt_vect (u32x *out, const u32x *in, const u32x *Kc, const u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]); -DECLSPEC void _des_crypt_keysetup_vect (u32x c, u32x d, u32x *Kc, u32x *Kd, SHM_TYPE u32 (*s_skb)[64]); +DECLSPEC void _des_crypt_encrypt_vect (PRIVATE_AS u32x *out, PRIVATE_AS const u32x *in, PRIVATE_AS const u32x *Kc, PRIVATE_AS const u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]); +DECLSPEC void _des_crypt_decrypt_vect (PRIVATE_AS u32x *out, PRIVATE_AS const u32x *in, PRIVATE_AS const u32x *Kc, PRIVATE_AS const u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]); +DECLSPEC void _des_crypt_keysetup_vect (u32x c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, SHM_TYPE u32 (*s_skb)[64]); #endif // _INC_CIPHER_DES_H diff --git a/OpenCL/inc_cipher_kuznyechik.cl b/OpenCL/inc_cipher_kuznyechik.cl index 3d9638e23..53359a987 100644 --- a/OpenCL/inc_cipher_kuznyechik.cl +++ b/OpenCL/inc_cipher_kuznyechik.cl @@ -118,7 +118,7 @@ CONSTANT_VK u32a k_sbox_inv[256] = x &= 0xff; \ } -DECLSPEC void kuznyechik_linear (u32 *w) +DECLSPEC void kuznyechik_linear (PRIVATE_AS u32 *w) { // used in k_xor macro u32 x; @@ -154,7 +154,7 @@ DECLSPEC void kuznyechik_linear (u32 *w) } } -DECLSPEC void kuznyechik_linear_inv (u32 *w) +DECLSPEC void kuznyechik_linear_inv (PRIVATE_AS u32 *w) { // used in k_xor macro u32 x; @@ -191,7 +191,7 @@ DECLSPEC void kuznyechik_linear_inv (u32 *w) } } -DECLSPEC void kuznyechik_set_key (u32 *ks, const u32 *ukey) +DECLSPEC void kuznyechik_set_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey) { u32 counter[4]; u32 x[4]; @@ -265,7 +265,7 @@ DECLSPEC void kuznyechik_set_key (u32 *ks, const u32 *ukey) } } -DECLSPEC void kuznyechik_encrypt (const u32 *ks, const u32 *in, u32 *out) +DECLSPEC void kuznyechik_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { out[0] = in[0]; out[1] = in[1]; @@ -290,7 +290,7 @@ DECLSPEC void kuznyechik_encrypt (const u32 *ks, const u32 *in, u32 *out) out[3] ^= ks[4 * 9 + 3]; } -DECLSPEC void kuznyechik_decrypt (const u32 *ks, const u32 *in, u32 *out) +DECLSPEC void kuznyechik_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { out[0] = in[0]; out[1] = in[1]; diff --git a/OpenCL/inc_cipher_kuznyechik.h b/OpenCL/inc_cipher_kuznyechik.h index 661d27091..6e99195af 100644 --- a/OpenCL/inc_cipher_kuznyechik.h +++ b/OpenCL/inc_cipher_kuznyechik.h @@ -6,10 +6,10 @@ #ifndef _INC_CIPHER_KUZNYECHIK_H #define _INC_CIPHER_KUZNYECHIK_H -DECLSPEC void kuznyechik_linear (u32 *w); -DECLSPEC void kuznyechik_linear_inv (u32 *w); -DECLSPEC void kuznyechik_set_key (u32 *ks, const u32 *ukey); -DECLSPEC void kuznyechik_encrypt (const u32 *ks, const u32 *in, u32 *out); -DECLSPEC void kuznyechik_decrypt (const u32 *ks, const u32 *in, u32 *out); +DECLSPEC void kuznyechik_linear (PRIVATE_AS u32 *w); +DECLSPEC void kuznyechik_linear_inv (PRIVATE_AS u32 *w); +DECLSPEC void kuznyechik_set_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey); +DECLSPEC void kuznyechik_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void kuznyechik_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); #endif // _INC_CIPHER_KUZNYECHIK_H diff --git a/OpenCL/inc_cipher_rc4.cl b/OpenCL/inc_cipher_rc4.cl index 6180f3f19..c2601e80f 100644 --- a/OpenCL/inc_cipher_rc4.cl +++ b/OpenCL/inc_cipher_rc4.cl @@ -8,21 +8,21 @@ // Pattern linear -DECLSPEC u8 GET_KEY8 (LOCAL_AS u32 *S, const u8 k) +DECLSPEC u8 GET_KEY8 (LOCAL_AS u32 *S, const u8 k, MAYBE_UNUSED const u64 lid) { LOCAL_AS u8 *S8 = (LOCAL_AS u8 *) S; return S8[k]; } -DECLSPEC void SET_KEY8 (LOCAL_AS u32 *S, const u8 k, const u8 v) +DECLSPEC void SET_KEY8 (LOCAL_AS u32 *S, const u8 k, const u8 v, MAYBE_UNUSED const u64 lid) { LOCAL_AS u8 *S8 = (LOCAL_AS u8 *) S; S8[k] = v; } -DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const u8 k, const u32 v) +DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const u8 k, const u32 v, MAYBE_UNUSED const u64 lid) { S[k] = v; } @@ -74,19 +74,15 @@ DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const u8 k, const u32 v) #define KEY8(t,k) (((k) & 3) + (((k) / 4) * 128) + (((t) & 31) * 4) + (((t) / 32) * 8192)) -DECLSPEC u8 GET_KEY8 (LOCAL_AS u32 *S, const u8 k) +DECLSPEC u8 GET_KEY8 (LOCAL_AS u32 *S, const u8 k, const u64 lid) { - const u64 lid = get_local_id (0); - LOCAL_AS u8 *S8 = (LOCAL_AS u8 *) S; return S8[KEY8 (lid, k)]; } -DECLSPEC void SET_KEY8 (LOCAL_AS u32 *S, const u8 k, const u8 v) +DECLSPEC void SET_KEY8 (LOCAL_AS u32 *S, const u8 k, const u8 v, const u64 lid) { - const u64 lid = get_local_id (0); - LOCAL_AS u8 *S8 = (LOCAL_AS u8 *) S; S8[KEY8 (lid, k)] = v; @@ -94,10 +90,8 @@ DECLSPEC void SET_KEY8 (LOCAL_AS u32 *S, const u8 k, const u8 v) #define KEY32(t,k) (((k) * 32) + ((t) & 31) + (((t) / 32) * 2048)) -DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const u8 k, const u32 v) +DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const u8 k, const u32 v, const u64 lid) { - const u64 lid = get_local_id (0); - S[KEY32 (lid, k)] = v; } @@ -106,7 +100,7 @@ DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const u8 k, const u32 v) #endif -DECLSPEC void rc4_init_40 (LOCAL_AS u32 *S, const u32 *key) +DECLSPEC void rc4_init_40 (LOCAL_AS u32 *S, PRIVATE_AS const u32 *key, const u64 lid) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -116,7 +110,7 @@ DECLSPEC void rc4_init_40 (LOCAL_AS u32 *S, const u32 *key) #endif for (u8 i = 0; i < 64; i++) { - SET_KEY32 (S, i, v); v += a; + SET_KEY32 (S, i, v, lid); v += a; } const u8 d0 = v8a_from_v32_S (key[0]); @@ -132,17 +126,17 @@ DECLSPEC void rc4_init_40 (LOCAL_AS u32 *S, const u32 *key) #endif for (u32 i = 0; i < 255; i += 5) { - j += GET_KEY8 (S, i + 0) + d0; rc4_swap (S, i + 0, j); - j += GET_KEY8 (S, i + 1) + d1; rc4_swap (S, i + 1, j); - j += GET_KEY8 (S, i + 2) + d2; rc4_swap (S, i + 2, j); - j += GET_KEY8 (S, i + 3) + d3; rc4_swap (S, i + 3, j); - j += GET_KEY8 (S, i + 4) + d4; rc4_swap (S, i + 4, j); + j += GET_KEY8 (S, i + 0, lid) + d0; rc4_swap (S, i + 0, j, lid); + j += GET_KEY8 (S, i + 1, lid) + d1; rc4_swap (S, i + 1, j, lid); + j += GET_KEY8 (S, i + 2, lid) + d2; rc4_swap (S, i + 2, j, lid); + j += GET_KEY8 (S, i + 3, lid) + d3; rc4_swap (S, i + 3, j, lid); + j += GET_KEY8 (S, i + 4, lid) + d4; rc4_swap (S, i + 4, j, lid); } - j += GET_KEY8 (S, 255) + d0; rc4_swap (S, 255, j); + j += GET_KEY8 (S, 255, lid) + d0; rc4_swap (S, 255, j, lid); } -DECLSPEC void rc4_init_128 (LOCAL_AS u32 *S, const u32 *key) +DECLSPEC void rc4_init_128 (LOCAL_AS u32 *S, PRIVATE_AS const u32 *key, const u64 lid) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -152,7 +146,7 @@ DECLSPEC void rc4_init_128 (LOCAL_AS u32 *S, const u32 *key) #endif for (u8 i = 0; i < 64; i++) { - SET_KEY32 (S, i, v); v += a; + SET_KEY32 (S, i, v, lid); v += a; } u8 j = 0; @@ -165,44 +159,44 @@ DECLSPEC void rc4_init_128 (LOCAL_AS u32 *S, const u32 *key) v = key[0]; - j += GET_KEY8 (S, idx) + v8a_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8b_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8c_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8d_from_v32_S (v); rc4_swap (S, idx, j); idx++; + j += GET_KEY8 (S, idx, lid) + v8a_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8b_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8c_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8d_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; v = key[1]; - j += GET_KEY8 (S, idx) + v8a_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8b_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8c_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8d_from_v32_S (v); rc4_swap (S, idx, j); idx++; + j += GET_KEY8 (S, idx, lid) + v8a_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8b_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8c_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8d_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; v = key[2]; - j += GET_KEY8 (S, idx) + v8a_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8b_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8c_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8d_from_v32_S (v); rc4_swap (S, idx, j); idx++; + j += GET_KEY8 (S, idx, lid) + v8a_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8b_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8c_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8d_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; v = key[3]; - j += GET_KEY8 (S, idx) + v8a_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8b_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8c_from_v32_S (v); rc4_swap (S, idx, j); idx++; - j += GET_KEY8 (S, idx) + v8d_from_v32_S (v); rc4_swap (S, idx, j); idx++; + j += GET_KEY8 (S, idx, lid) + v8a_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8b_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8c_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; + j += GET_KEY8 (S, idx, lid) + v8d_from_v32_S (v); rc4_swap (S, idx, j, lid); idx++; } } -DECLSPEC void rc4_swap (LOCAL_AS u32 *S, const u8 i, const u8 j) +DECLSPEC void rc4_swap (LOCAL_AS u32 *S, const u8 i, const u8 j, const u64 lid) { u8 tmp; - tmp = GET_KEY8 (S, i); - SET_KEY8 (S, i, GET_KEY8 (S, j)); - SET_KEY8 (S, j, tmp); + tmp = GET_KEY8 (S, i, lid); + SET_KEY8 (S, i, GET_KEY8 (S, j, lid), lid); + SET_KEY8 (S, j, tmp, lid); } -DECLSPEC u8 rc4_next_16 (LOCAL_AS u32 *S, const u8 i, const u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS u32 *S, const u8 i, const u8 j, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, const u64 lid) { u8 a = i; u8 b = j; @@ -219,46 +213,46 @@ DECLSPEC u8 rc4_next_16 (LOCAL_AS u32 *S, const u8 i, const u8 j, const u32 *in, u8 idx; a += 1; - b += GET_KEY8 (S, a); + b += GET_KEY8 (S, a, lid); - rc4_swap (S, a, b); + rc4_swap (S, a, b, lid); - idx = GET_KEY8 (S, a) + GET_KEY8 (S, b); + idx = GET_KEY8 (S, a, lid) + GET_KEY8 (S, b, lid); - tmp = GET_KEY8 (S, idx); + tmp = GET_KEY8 (S, idx, lid); xor4 |= tmp << 0; a += 1; - b += GET_KEY8 (S, a); + b += GET_KEY8 (S, a, lid); - rc4_swap (S, a, b); + rc4_swap (S, a, b, lid); - idx = GET_KEY8 (S, a) + GET_KEY8 (S, b); + idx = GET_KEY8 (S, a, lid) + GET_KEY8 (S, b, lid); - tmp = GET_KEY8 (S, idx); + tmp = GET_KEY8 (S, idx, lid); xor4 |= tmp << 8; a += 1; - b += GET_KEY8 (S, a); + b += GET_KEY8 (S, a, lid); - rc4_swap (S, a, b); + rc4_swap (S, a, b, lid); - idx = GET_KEY8 (S, a) + GET_KEY8 (S, b); + idx = GET_KEY8 (S, a, lid) + GET_KEY8 (S, b, lid); - tmp = GET_KEY8 (S, idx); + tmp = GET_KEY8 (S, idx, lid); xor4 |= tmp << 16; a += 1; - b += GET_KEY8 (S, a); + b += GET_KEY8 (S, a, lid); - rc4_swap (S, a, b); + rc4_swap (S, a, b, lid); - idx = GET_KEY8 (S, a) + GET_KEY8 (S, b); + idx = GET_KEY8 (S, a, lid) + GET_KEY8 (S, b, lid); - tmp = GET_KEY8 (S, idx); + tmp = GET_KEY8 (S, idx, lid); xor4 |= tmp << 24; @@ -268,7 +262,7 @@ DECLSPEC u8 rc4_next_16 (LOCAL_AS u32 *S, const u8 i, const u8 j, const u32 *in, return b; } -DECLSPEC u8 rc4_next_16_global (LOCAL_AS u32 *S, const u8 i, const u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16_global (LOCAL_AS u32 *S, const u8 i, const u8 j, GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, const u64 lid) { u8 a = i; u8 b = j; @@ -285,46 +279,46 @@ DECLSPEC u8 rc4_next_16_global (LOCAL_AS u32 *S, const u8 i, const u8 j, GLOBAL_ u8 idx; a += 1; - b += GET_KEY8 (S, a); + b += GET_KEY8 (S, a, lid); - rc4_swap (S, a, b); + rc4_swap (S, a, b, lid); - idx = GET_KEY8 (S, a) + GET_KEY8 (S, b); + idx = GET_KEY8 (S, a, lid) + GET_KEY8 (S, b, lid); - tmp = GET_KEY8 (S, idx); + tmp = GET_KEY8 (S, idx, lid); xor4 |= tmp << 0; a += 1; - b += GET_KEY8 (S, a); + b += GET_KEY8 (S, a, lid); - rc4_swap (S, a, b); + rc4_swap (S, a, b, lid); - idx = GET_KEY8 (S, a) + GET_KEY8 (S, b); + idx = GET_KEY8 (S, a, lid) + GET_KEY8 (S, b, lid); - tmp = GET_KEY8 (S, idx); + tmp = GET_KEY8 (S, idx, lid); xor4 |= tmp << 8; a += 1; - b += GET_KEY8 (S, a); + b += GET_KEY8 (S, a, lid); - rc4_swap (S, a, b); + rc4_swap (S, a, b, lid); - idx = GET_KEY8 (S, a) + GET_KEY8 (S, b); + idx = GET_KEY8 (S, a, lid) + GET_KEY8 (S, b, lid); - tmp = GET_KEY8 (S, idx); + tmp = GET_KEY8 (S, idx, lid); xor4 |= tmp << 16; a += 1; - b += GET_KEY8 (S, a); + b += GET_KEY8 (S, a, lid); - rc4_swap (S, a, b); + rc4_swap (S, a, b, lid); - idx = GET_KEY8 (S, a) + GET_KEY8 (S, b); + idx = GET_KEY8 (S, a, lid) + GET_KEY8 (S, b, lid); - tmp = GET_KEY8 (S, idx); + tmp = GET_KEY8 (S, idx, lid); xor4 |= tmp << 24; diff --git a/OpenCL/inc_cipher_rc4.h b/OpenCL/inc_cipher_rc4.h index 4574d95d1..c1fe71c56 100644 --- a/OpenCL/inc_cipher_rc4.h +++ b/OpenCL/inc_cipher_rc4.h @@ -6,14 +6,14 @@ #ifndef _INC_CIPHER_RC4_H #define _INC_CIPHER_RC4_H -DECLSPEC u8 GET_KEY8 (LOCAL_AS u32 *S, const u8 k); -DECLSPEC void SET_KEY8 (LOCAL_AS u32 *S, const u8 k, const u8 v); -DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const u8 k, const u32 v); +DECLSPEC u8 GET_KEY8 (LOCAL_AS u32 *S, const u8 k, const u64 lid); +DECLSPEC void SET_KEY8 (LOCAL_AS u32 *S, const u8 k, const u8 v, const u64 lid); +DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const u8 k, const u32 v, const u64 lid); -DECLSPEC void rc4_init_40 (LOCAL_AS u32 *S, const u32 *key); -DECLSPEC void rc4_init_128 (LOCAL_AS u32 *S, const u32 *key); -DECLSPEC void rc4_swap (LOCAL_AS u32 *S, const u8 i, const u8 j); -DECLSPEC u8 rc4_next_16 (LOCAL_AS u32 *S, const u8 i, const u8 j, const u32 *in, u32 *out); -DECLSPEC u8 rc4_next_16_global (LOCAL_AS u32 *S, const u8 i, const u8 j, GLOBAL_AS const u32 *in, u32 *out); +DECLSPEC void rc4_init_40 (LOCAL_AS u32 *S, PRIVATE_AS const u32 *key, const u64 lid); +DECLSPEC void rc4_init_128 (LOCAL_AS u32 *S, PRIVATE_AS const u32 *key, const u64 lid); +DECLSPEC void rc4_swap (LOCAL_AS u32 *S, const u8 i, const u8 j, const u64 lid); +DECLSPEC u8 rc4_next_16 (LOCAL_AS u32 *S, const u8 i, const u8 j, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, const u64 lid); +DECLSPEC u8 rc4_next_16_global (LOCAL_AS u32 *S, const u8 i, const u8 j, GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, const u64 lid); #endif // _INC_CIPHER_RC4_H diff --git a/OpenCL/inc_cipher_serpent.cl b/OpenCL/inc_cipher_serpent.cl index 3924fa584..bc112313b 100644 --- a/OpenCL/inc_cipher_serpent.cl +++ b/OpenCL/inc_cipher_serpent.cl @@ -410,7 +410,7 @@ // 128 bit key -DECLSPEC void serpent128_set_key (u32 *ks, const u32 *ukey) +DECLSPEC void serpent128_set_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey) { ks[ 0] = ukey[0]; ks[ 1] = ukey[1]; @@ -591,7 +591,7 @@ DECLSPEC void serpent128_set_key (u32 *ks, const u32 *ukey) k_set(32,a,b,c,d); sb3(a,b,c,d,e,f,g,h); k_get(32,e,f,g,h); } -DECLSPEC void serpent128_encrypt (const u32 *ks, const u32 *in, u32 *out) +DECLSPEC void serpent128_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 a,b,c,d,e,f,g,h; u32 t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; @@ -641,7 +641,7 @@ DECLSPEC void serpent128_encrypt (const u32 *ks, const u32 *in, u32 *out) out[3] = d; } -DECLSPEC void serpent128_decrypt (const u32 *ks, const u32 *in, u32 *out) +DECLSPEC void serpent128_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 a,b,c,d,e,f,g,h; u32 t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; @@ -693,7 +693,7 @@ DECLSPEC void serpent128_decrypt (const u32 *ks, const u32 *in, u32 *out) // 192 bit key -DECLSPEC void serpent192_set_key (u32 *ks, const u32 *ukey) +DECLSPEC void serpent192_set_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey) { ks[ 0] = ukey[0]; ks[ 1] = ukey[1]; @@ -874,7 +874,7 @@ DECLSPEC void serpent192_set_key (u32 *ks, const u32 *ukey) k_set(32,a,b,c,d); sb3(a,b,c,d,e,f,g,h); k_get(32,e,f,g,h); } -DECLSPEC void serpent192_encrypt (const u32 *ks, const u32 *in, u32 *out) +DECLSPEC void serpent192_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 a,b,c,d,e,f,g,h; u32 t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; @@ -924,7 +924,7 @@ DECLSPEC void serpent192_encrypt (const u32 *ks, const u32 *in, u32 *out) out[3] = d; } -DECLSPEC void serpent192_decrypt (const u32 *ks, const u32 *in, u32 *out) +DECLSPEC void serpent192_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 a,b,c,d,e,f,g,h; u32 t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; @@ -976,7 +976,7 @@ DECLSPEC void serpent192_decrypt (const u32 *ks, const u32 *in, u32 *out) // 256 bit key -DECLSPEC void serpent256_set_key (u32 *ks, const u32 *ukey) +DECLSPEC void serpent256_set_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey) { ks[ 0] = ukey[0]; ks[ 1] = ukey[1]; @@ -1157,7 +1157,7 @@ DECLSPEC void serpent256_set_key (u32 *ks, const u32 *ukey) k_set(32,a,b,c,d); sb3(a,b,c,d,e,f,g,h); k_get(32,e,f,g,h); } -DECLSPEC void serpent256_encrypt (const u32 *ks, const u32 *in, u32 *out) +DECLSPEC void serpent256_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 a,b,c,d,e,f,g,h; u32 t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; @@ -1207,7 +1207,7 @@ DECLSPEC void serpent256_encrypt (const u32 *ks, const u32 *in, u32 *out) out[3] = d; } -DECLSPEC void serpent256_decrypt (const u32 *ks, const u32 *in, u32 *out) +DECLSPEC void serpent256_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 a,b,c,d,e,f,g,h; u32 t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; diff --git a/OpenCL/inc_cipher_serpent.h b/OpenCL/inc_cipher_serpent.h index d6a3243f3..44a0bb24b 100644 --- a/OpenCL/inc_cipher_serpent.h +++ b/OpenCL/inc_cipher_serpent.h @@ -6,14 +6,14 @@ #ifndef _INC_CIPHER_SERPENT_H #define _INC_CIPHER_SERPENT_H -DECLSPEC void serpent128_set_key (u32 *ks, const u32 *ukey); -DECLSPEC void serpent128_encrypt (const u32 *ks, const u32 *in, u32 *out); -DECLSPEC void serpent128_decrypt (const u32 *ks, const u32 *in, u32 *out); -DECLSPEC void serpent192_set_key (u32 *ks, const u32 *ukey); -DECLSPEC void serpent192_encrypt (const u32 *ks, const u32 *in, u32 *out); -DECLSPEC void serpent192_decrypt (const u32 *ks, const u32 *in, u32 *out); -DECLSPEC void serpent256_set_key (u32 *ks, const u32 *ukey); -DECLSPEC void serpent256_encrypt (const u32 *ks, const u32 *in, u32 *out); -DECLSPEC void serpent256_decrypt (const u32 *ks, const u32 *in, u32 *out); +DECLSPEC void serpent128_set_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey); +DECLSPEC void serpent128_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void serpent128_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void serpent192_set_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey); +DECLSPEC void serpent192_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void serpent192_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void serpent256_set_key (PRIVATE_AS u32 *ks, PRIVATE_AS const u32 *ukey); +DECLSPEC void serpent256_encrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void serpent256_decrypt (PRIVATE_AS const u32 *ks, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); #endif // _INC_CIPHER_SERPENT_H diff --git a/OpenCL/inc_cipher_twofish.cl b/OpenCL/inc_cipher_twofish.cl index fceb6f58b..374bd175b 100644 --- a/OpenCL/inc_cipher_twofish.cl +++ b/OpenCL/inc_cipher_twofish.cl @@ -423,7 +423,7 @@ DECLSPEC u32 mds_rem (u32 p0, u32 p1) // 128 bit key -DECLSPEC u32 h_fun128 (const u32 x, const u32 *key) +DECLSPEC u32 h_fun128 (const u32 x, PRIVATE_AS const u32 *key) { u32 b0, b1, b2, b3; @@ -440,7 +440,7 @@ DECLSPEC u32 h_fun128 (const u32 x, const u32 *key) return mds (0, b0) ^ mds (1, b1) ^ mds (2, b2) ^ mds (3, b3); } -DECLSPEC void twofish128_set_key (u32 *sk, u32 *lk, const u32 *ukey) +DECLSPEC void twofish128_set_key (PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk, PRIVATE_AS const u32 *ukey) { u32 me_key[2]; @@ -473,7 +473,7 @@ DECLSPEC void twofish128_set_key (u32 *sk, u32 *lk, const u32 *ukey) } } -DECLSPEC void twofish128_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) +DECLSPEC void twofish128_encrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 data[4]; @@ -497,7 +497,7 @@ DECLSPEC void twofish128_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u out[3] = data[1] ^ lk[7]; } -DECLSPEC void twofish128_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) +DECLSPEC void twofish128_decrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 data[4]; @@ -523,7 +523,7 @@ DECLSPEC void twofish128_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u // 192 bit key -DECLSPEC u32 h_fun192 (const u32 x, const u32 *key) +DECLSPEC u32 h_fun192 (const u32 x, PRIVATE_AS const u32 *key) { u32 b0, b1, b2, b3; @@ -545,7 +545,7 @@ DECLSPEC u32 h_fun192 (const u32 x, const u32 *key) return mds (0, b0) ^ mds (1, b1) ^ mds (2, b2) ^ mds (3, b3); } -DECLSPEC void twofish192_set_key (u32 *sk, u32 *lk, const u32 *ukey) +DECLSPEC void twofish192_set_key (PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk, PRIVATE_AS const u32 *ukey) { u32 me_key[3]; @@ -581,7 +581,7 @@ DECLSPEC void twofish192_set_key (u32 *sk, u32 *lk, const u32 *ukey) } } -DECLSPEC void twofish192_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) +DECLSPEC void twofish192_encrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 data[4]; @@ -605,7 +605,7 @@ DECLSPEC void twofish192_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u out[3] = data[1] ^ lk[7]; } -DECLSPEC void twofish192_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) +DECLSPEC void twofish192_decrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 data[4]; @@ -631,7 +631,7 @@ DECLSPEC void twofish192_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u // 256 bit key -DECLSPEC u32 h_fun256 (const u32 x, const u32 *key) +DECLSPEC u32 h_fun256 (const u32 x, PRIVATE_AS const u32 *key) { u32 b0, b1, b2, b3; @@ -658,7 +658,7 @@ DECLSPEC u32 h_fun256 (const u32 x, const u32 *key) return mds (0, b0) ^ mds (1, b1) ^ mds (2, b2) ^ mds (3, b3); } -DECLSPEC void twofish256_set_key (u32 *sk, u32 *lk, const u32 *ukey) +DECLSPEC void twofish256_set_key (PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk, PRIVATE_AS const u32 *ukey) { u32 me_key[4]; @@ -697,7 +697,7 @@ DECLSPEC void twofish256_set_key (u32 *sk, u32 *lk, const u32 *ukey) } } -DECLSPEC void twofish256_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) +DECLSPEC void twofish256_encrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 data[4]; @@ -721,7 +721,7 @@ DECLSPEC void twofish256_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u out[3] = data[1] ^ lk[7]; } -DECLSPEC void twofish256_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) +DECLSPEC void twofish256_decrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out) { u32 data[4]; diff --git a/OpenCL/inc_cipher_twofish.h b/OpenCL/inc_cipher_twofish.h index 95b655353..34c252815 100644 --- a/OpenCL/inc_cipher_twofish.h +++ b/OpenCL/inc_cipher_twofish.h @@ -7,17 +7,17 @@ #define _INC_CIPHER_TWOFISH_H DECLSPEC u32 mds_rem (u32 p0, u32 p1); -DECLSPEC u32 h_fun128 (const u32 x, const u32 *key); -DECLSPEC void twofish128_set_key (u32 *sk, u32 *lk, const u32 *ukey); -DECLSPEC void twofish128_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out); -DECLSPEC void twofish128_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out); -DECLSPEC u32 h_fun192 (const u32 x, const u32 *key); -DECLSPEC void twofish192_set_key (u32 *sk, u32 *lk, const u32 *ukey); -DECLSPEC void twofish192_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out); -DECLSPEC void twofish192_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out); -DECLSPEC u32 h_fun256 (const u32 x, const u32 *key); -DECLSPEC void twofish256_set_key (u32 *sk, u32 *lk, const u32 *ukey); -DECLSPEC void twofish256_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out); -DECLSPEC void twofish256_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out); +DECLSPEC u32 h_fun128 (PRIVATE_AS const u32 x, PRIVATE_AS const u32 *key); +DECLSPEC void twofish128_set_key (PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk, PRIVATE_AS const u32 *ukey); +DECLSPEC void twofish128_encrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void twofish128_decrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC u32 h_fun192 (const u32 x, PRIVATE_AS const u32 *key); +DECLSPEC void twofish192_set_key (PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk, PRIVATE_AS const u32 *ukey); +DECLSPEC void twofish192_encrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void twofish192_decrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC u32 h_fun256 (const u32 x, PRIVATE_AS const u32 *key); +DECLSPEC void twofish256_set_key (PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk, PRIVATE_AS const u32 *ukey); +DECLSPEC void twofish256_encrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void twofish256_decrypt (PRIVATE_AS const u32 *sk, PRIVATE_AS const u32 *lk, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out); #endif // _INC_CIPHER_TWOFISH_H diff --git a/OpenCL/inc_common.cl b/OpenCL/inc_common.cl index 07dbfde6c..c82ad8e31 100644 --- a/OpenCL/inc_common.cl +++ b/OpenCL/inc_common.cl @@ -1944,7 +1944,7 @@ DECLSPEC int ffz (const u32 v) } #ifdef KERNEL_STATIC -DECLSPEC int hash_comp (const u32 *d1, GLOBAL_AS const u32 *d2) +DECLSPEC int hash_comp (PRIVATE_AS const u32 *d1, GLOBAL_AS const u32 *d2) { if (d1[3] > d2[DGST_R3]) return ( 1); if (d1[3] < d2[DGST_R3]) return (-1); @@ -1958,7 +1958,7 @@ DECLSPEC int hash_comp (const u32 *d1, GLOBAL_AS const u32 *d2) return (0); } -DECLSPEC int find_hash (const u32 *digest, const u32 digests_cnt, GLOBAL_AS const digest_t *digests_buf) +DECLSPEC int find_hash (PRIVATE_AS const u32 *digest, const u32 digests_cnt, GLOBAL_AS const digest_t *digests_buf) { for (u32 l = 0, r = digests_cnt; r; r >>= 1) { @@ -1986,7 +1986,7 @@ DECLSPEC int find_hash (const u32 *digest, const u32 digests_cnt, GLOBAL_AS cons // We simply ignore buffer length for the first 24 bytes for some extra speed boost :) // Number of unrolls found by simply testing what gave best results -DECLSPEC int hc_enc_scan (const u32 *buf, const int len) +DECLSPEC int hc_enc_scan (PRIVATE_AS const u32 *buf, const int len) { if (buf[0] & 0x80808080) return 1; if (buf[1] & 0x80808080) return 1; @@ -2048,7 +2048,7 @@ DECLSPEC int hc_enc_scan_global (GLOBAL_AS const u32 *buf, const int len) #define offsetsFromUTF8_4 0xFA082080UL #define offsetsFromUTF8_5 0x82082080UL -DECLSPEC void hc_enc_init (hc_enc_t *hc_enc) +DECLSPEC void hc_enc_init (PRIVATE_AS hc_enc_t *hc_enc) { hc_enc->pos = 0; @@ -2056,7 +2056,7 @@ DECLSPEC void hc_enc_init (hc_enc_t *hc_enc) hc_enc->clen = 0; } -DECLSPEC int hc_enc_has_next (hc_enc_t *hc_enc, const int sz) +DECLSPEC int hc_enc_has_next (PRIVATE_AS hc_enc_t *hc_enc, const int sz) { if (hc_enc->pos < sz) return 1; @@ -2065,9 +2065,9 @@ DECLSPEC int hc_enc_has_next (hc_enc_t *hc_enc, const int sz) return 0; } -DECLSPEC int hc_enc_validate_utf8 (const u32 *src_buf, const int src_pos, const int extraBytesToRead) +DECLSPEC int hc_enc_validate_utf8 (PRIVATE_AS const u32 *src_buf, const int src_pos, const int extraBytesToRead) { - const u8 *src_ptr = (const u8 *) src_buf; + PRIVATE_AS const u8 *src_ptr = (PRIVATE_AS const u8 *) src_buf; if (extraBytesToRead == 0) { @@ -2214,10 +2214,10 @@ DECLSPEC int hc_enc_validate_utf8_global (GLOBAL_AS const u32 *src_buf, const in // Input buffer and Output buffer size has to be multiple of 4 and at least of size 4. // The output buffer is not zero padded, so entire buffer has to be set all zero before entering this function or truncated afterwards. -DECLSPEC int hc_enc_next (hc_enc_t *hc_enc, const u32 *src_buf, const int src_len, const int src_sz, u32 *dst_buf, const int dst_sz) +DECLSPEC int hc_enc_next (PRIVATE_AS hc_enc_t *hc_enc, PRIVATE_AS const u32 *src_buf, const int src_len, const int src_sz, PRIVATE_AS u32 *dst_buf, const int dst_sz) { - const u8 *src_ptr = (const u8 *) src_buf; - u8 *dst_ptr = ( u8 *) dst_buf; + PRIVATE_AS const u8 *src_ptr = (PRIVATE_AS const u8 *) src_buf; + PRIVATE_AS u8 *dst_ptr = (PRIVATE_AS u8 *) dst_buf; int src_pos = hc_enc->pos; @@ -2360,10 +2360,10 @@ DECLSPEC int hc_enc_next (hc_enc_t *hc_enc, const u32 *src_buf, const int src_le return dst_pos; } -DECLSPEC int hc_enc_next_global (hc_enc_t *hc_enc, GLOBAL_AS const u32 *src_buf, const int src_len, const int src_sz, u32 *dst_buf, const int dst_sz) +DECLSPEC int hc_enc_next_global (PRIVATE_AS hc_enc_t *hc_enc, GLOBAL_AS const u32 *src_buf, const int src_len, const int src_sz, PRIVATE_AS u32 *dst_buf, const int dst_sz) { - GLOBAL_AS const u8 *src_ptr = (GLOBAL_AS const u8 *) src_buf; - u8 *dst_ptr = ( u8 *) dst_buf; + GLOBAL_AS const u8 *src_ptr = (GLOBAL_AS const u8 *) src_buf; + PRIVATE_AS u8 *dst_ptr = (PRIVATE_AS u8 *) dst_buf; int src_pos = hc_enc->pos; @@ -2526,7 +2526,7 @@ DECLSPEC int hc_enc_next_global (hc_enc_t *hc_enc, GLOBAL_AS const u32 *src_buf, #undef offsetsFromUTF8_4 #undef offsetsFromUTF8_5 -DECLSPEC int pkcs_padding_bs8 (const u32 *data_buf, const int data_len) +DECLSPEC int pkcs_padding_bs8 (PRIVATE_AS const u32 *data_buf, const int data_len) { if (data_len == 0) return -1; // cannot have zero length, is important to avoid out of boundary reads @@ -2571,7 +2571,7 @@ DECLSPEC int pkcs_padding_bs8 (const u32 *data_buf, const int data_len) return real_len; } -DECLSPEC int pkcs_padding_bs16 (const u32 *data_buf, const int data_len) +DECLSPEC int pkcs_padding_bs16 (PRIVATE_AS const u32 *data_buf, const int data_len) { if (data_len == 0) return -1; // cannot have zero length, is important to avoid out of boundary reads @@ -2630,7 +2630,7 @@ DECLSPEC int pkcs_padding_bs16 (const u32 *data_buf, const int data_len) return real_len; } -DECLSPEC int asn1_detect (const u32 *buf, const int len) +DECLSPEC int asn1_detect (PRIVATE_AS const u32 *buf, const int len) { if (len < 128) { @@ -2674,7 +2674,7 @@ DECLSPEC u32 check_bitmap (GLOBAL_AS const u32 *bitmap, const u32 bitmap_mask, c return (bitmap[(digest >> bitmap_shift) & bitmap_mask] & (1 << (digest & 0x1f))); } -DECLSPEC u32 check (const u32 *digest, GLOBAL_AS const u32 *bitmap_s1_a, GLOBAL_AS const u32 *bitmap_s1_b, GLOBAL_AS const u32 *bitmap_s1_c, GLOBAL_AS const u32 *bitmap_s1_d, GLOBAL_AS const u32 *bitmap_s2_a, GLOBAL_AS const u32 *bitmap_s2_b, GLOBAL_AS const u32 *bitmap_s2_c, GLOBAL_AS const u32 *bitmap_s2_d, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2) +DECLSPEC u32 check (PRIVATE_AS const u32 *digest, GLOBAL_AS const u32 *bitmap_s1_a, GLOBAL_AS const u32 *bitmap_s1_b, GLOBAL_AS const u32 *bitmap_s1_c, GLOBAL_AS const u32 *bitmap_s1_d, GLOBAL_AS const u32 *bitmap_s2_a, GLOBAL_AS const u32 *bitmap_s2_b, GLOBAL_AS const u32 *bitmap_s2_c, GLOBAL_AS const u32 *bitmap_s2_d, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2) { if (check_bitmap (bitmap_s1_a, bitmap_mask, bitmap_shift1, digest[0]) == 0) return (0); if (check_bitmap (bitmap_s1_b, bitmap_mask, bitmap_shift1, digest[1]) == 0) return (0); @@ -2716,7 +2716,7 @@ DECLSPEC void mark_hash (GLOBAL_AS plain_t *plains_buf, GLOBAL_AS u32 *d_result, plains_buf[idx].extra2 = extra2; // unused so far } -DECLSPEC int hc_count_char (const u32 *buf, const int elems, const u32 c) +DECLSPEC int hc_count_char (PRIVATE_AS const u32 *buf, const int elems, const u32 c) { int r = 0; @@ -2733,7 +2733,7 @@ DECLSPEC int hc_count_char (const u32 *buf, const int elems, const u32 c) return r; } -DECLSPEC float hc_get_entropy (const u32 *buf, const int elems) +DECLSPEC float hc_get_entropy (PRIVATE_AS const u32 *buf, const int elems) { const int length = elems * 4; @@ -2814,17 +2814,17 @@ DECLSPEC int hc_find_keyboard_layout_map (const u32 search, const int search_len return -1; } -DECLSPEC int hc_execute_keyboard_layout_mapping (u32 *w, const int pw_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt) +DECLSPEC int hc_execute_keyboard_layout_mapping (PRIVATE_AS u32 *w, const int pw_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt) { u32 out_buf[32] = { 0 }; - u8 *out_ptr = (u8 *) out_buf; + PRIVATE_AS u8 *out_ptr = (PRIVATE_AS u8 *) out_buf; int out_len = 0; // TC/VC passwords are limited to 128 - u8 *w_ptr = (u8 *) w; + PRIVATE_AS u8 *w_ptr = (PRIVATE_AS u8 *) w; int pw_pos = 0; @@ -2941,7 +2941,7 @@ DECLSPEC int hc_execute_keyboard_layout_mapping (u32 *w, const int pw_len, LOCAL * vector functions */ -DECLSPEC void make_utf16be (const u32x *in, u32x *out1, u32x *out2) +DECLSPEC void make_utf16be (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2) { #if defined IS_NV @@ -2979,7 +2979,7 @@ DECLSPEC void make_utf16be (const u32x *in, u32x *out1, u32x *out2) #endif } -DECLSPEC void make_utf16beN (const u32x *in, u32x *out1, u32x *out2) +DECLSPEC void make_utf16beN (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2) { #if defined IS_NV @@ -3017,7 +3017,7 @@ DECLSPEC void make_utf16beN (const u32x *in, u32x *out1, u32x *out2) #endif } -DECLSPEC void make_utf16le (const u32x *in, u32x *out1, u32x *out2) +DECLSPEC void make_utf16le (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2) { #if defined IS_NV @@ -3055,7 +3055,7 @@ DECLSPEC void make_utf16le (const u32x *in, u32x *out1, u32x *out2) #endif } -DECLSPEC void make_utf16leN (const u32x *in, u32x *out1, u32x *out2) +DECLSPEC void make_utf16leN (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2) { #if defined IS_NV @@ -3093,7 +3093,7 @@ DECLSPEC void make_utf16leN (const u32x *in, u32x *out1, u32x *out2) #endif } -DECLSPEC void undo_utf16be (const u32x *in1, const u32x *in2, u32x *out) +DECLSPEC void undo_utf16be (PRIVATE_AS const u32x *in1, PRIVATE_AS const u32x *in2, PRIVATE_AS u32x *out) { #if defined IS_NV @@ -3123,7 +3123,7 @@ DECLSPEC void undo_utf16be (const u32x *in1, const u32x *in2, u32x *out) #endif } -DECLSPEC void undo_utf16le (const u32x *in1, const u32x *in2, u32x *out) +DECLSPEC void undo_utf16le (PRIVATE_AS const u32x *in1, PRIVATE_AS const u32x *in2, PRIVATE_AS u32x *out) { #if defined IS_NV @@ -3153,7 +3153,7 @@ DECLSPEC void undo_utf16le (const u32x *in1, const u32x *in2, u32x *out) #endif } -DECLSPEC void set_mark_1x4 (u32 *v, const u32 offset) +DECLSPEC void set_mark_1x4 (PRIVATE_AS u32 *v, const u32 offset) { const u32 c = (offset & 15) / 4; const u32 r = 0xff << ((offset & 3) * 8); @@ -3164,7 +3164,7 @@ DECLSPEC void set_mark_1x4 (u32 *v, const u32 offset) v[3] = (c == 3) ? r : 0; } -DECLSPEC void append_helper_1x4 (u32x *r, const u32 v, const u32 *m) +DECLSPEC void append_helper_1x4 (PRIVATE_AS u32x *r, const u32 v, PRIVATE_AS const u32 *m) { r[0] |= v & m[0]; r[1] |= v & m[1]; @@ -3172,7 +3172,7 @@ DECLSPEC void append_helper_1x4 (u32x *r, const u32 v, const u32 *m) r[3] |= v & m[3]; } -DECLSPEC void append_0x80_1x4 (u32x *w0, const u32 offset) +DECLSPEC void append_0x80_1x4 (PRIVATE_AS u32x *w0, const u32 offset) { u32 v[4]; @@ -3181,7 +3181,7 @@ DECLSPEC void append_0x80_1x4 (u32x *w0, const u32 offset) append_helper_1x4 (w0, 0x80808080, v); } -DECLSPEC void append_0x80_2x4 (u32x *w0, u32x *w1, const u32 offset) +DECLSPEC void append_0x80_2x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32 offset) { u32 v[4]; @@ -3193,7 +3193,7 @@ DECLSPEC void append_0x80_2x4 (u32x *w0, u32x *w1, const u32 offset) append_helper_1x4 (w1, ((offset16 == 1) ? 0x80808080 : 0), v); } -DECLSPEC void append_0x80_3x4 (u32x *w0, u32x *w1, u32x *w2, const u32 offset) +DECLSPEC void append_0x80_3x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, const u32 offset) { u32 v[4]; @@ -3206,7 +3206,7 @@ DECLSPEC void append_0x80_3x4 (u32x *w0, u32x *w1, u32x *w2, const u32 offset) append_helper_1x4 (w2, ((offset16 == 2) ? 0x80808080 : 0), v); } -DECLSPEC void append_0x80_4x4 (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32 offset) +DECLSPEC void append_0x80_4x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset) { u32 v[4]; @@ -3220,7 +3220,7 @@ DECLSPEC void append_0x80_4x4 (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32 append_helper_1x4 (w3, ((offset16 == 3) ? 0x80808080 : 0), v); } -DECLSPEC void append_0x80_8x4 (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const u32 offset) +DECLSPEC void append_0x80_8x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset) { u32 v[4]; @@ -3238,7 +3238,7 @@ DECLSPEC void append_0x80_8x4 (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, append_helper_1x4 (w7, ((offset16 == 7) ? 0x80808080 : 0), v); } -DECLSPEC void append_0x80_1x16 (u32x *w, const u32 offset) +DECLSPEC void append_0x80_1x16 (PRIVATE_AS u32x *w, const u32 offset) { u32 v[4]; @@ -3252,7 +3252,7 @@ DECLSPEC void append_0x80_1x16 (u32x *w, const u32 offset) append_helper_1x4 (w + 12, ((offset16 == 3) ? 0x80808080 : 0), v); } -DECLSPEC void switch_buffer_by_offset_le (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32 offset) +DECLSPEC void switch_buffer_by_offset_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset) { const int offset_switch = offset / 4; @@ -3920,7 +3920,7 @@ DECLSPEC void switch_buffer_by_offset_le (u32x *w0, u32x *w1, u32x *w2, u32x *w3 #endif } -DECLSPEC void switch_buffer_by_offset_carry_le (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *c0, u32x *c1, u32x *c2, u32x *c3, const u32 offset) +DECLSPEC void switch_buffer_by_offset_carry_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, const u32 offset) { const int offset_switch = offset / 4; @@ -4848,7 +4848,7 @@ DECLSPEC void switch_buffer_by_offset_carry_le (u32x *w0, u32x *w1, u32x *w2, u3 #endif } -DECLSPEC void switch_buffer_by_offset_be (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32 offset) +DECLSPEC void switch_buffer_by_offset_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset) { const int offset_switch = offset / 4; @@ -5512,7 +5512,7 @@ DECLSPEC void switch_buffer_by_offset_be (u32x *w0, u32x *w1, u32x *w2, u32x *w3 #endif } -DECLSPEC void switch_buffer_by_offset_carry_be (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *c0, u32x *c1, u32x *c2, u32x *c3, const u32 offset) +DECLSPEC void switch_buffer_by_offset_carry_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, const u32 offset) { const int offset_switch = offset / 4; @@ -6448,7 +6448,7 @@ DECLSPEC void switch_buffer_by_offset_carry_be (u32x *w0, u32x *w1, u32x *w2, u3 #endif } -DECLSPEC void switch_buffer_by_offset_8x4_le (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const u32 offset) +DECLSPEC void switch_buffer_by_offset_8x4_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset) { const int offset_switch = offset / 4; @@ -8188,7 +8188,7 @@ DECLSPEC void switch_buffer_by_offset_8x4_le (u32x *w0, u32x *w1, u32x *w2, u32x #endif } -DECLSPEC void switch_buffer_by_offset_8x4_carry_le (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u32x *c0, u32x *c1, u32x *c2, u32x *c3, u32x *c4, u32x *c5, u32x *c6, u32x *c7, const u32 offset) +DECLSPEC void switch_buffer_by_offset_8x4_carry_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, PRIVATE_AS u32x *c4, PRIVATE_AS u32x *c5, PRIVATE_AS u32x *c6, PRIVATE_AS u32x *c7, const u32 offset) { const int offset_switch = offset / 4; @@ -11576,7 +11576,7 @@ DECLSPEC void switch_buffer_by_offset_8x4_carry_le (u32x *w0, u32x *w1, u32x *w2 #endif } -DECLSPEC void switch_buffer_by_offset_8x4_be (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const u32 offset) +DECLSPEC void switch_buffer_by_offset_8x4_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset) { const int offset_switch = offset / 4; @@ -13904,7 +13904,7 @@ DECLSPEC void switch_buffer_by_offset_8x4_be (u32x *w0, u32x *w1, u32x *w2, u32x #endif } -DECLSPEC void switch_buffer_by_offset_8x4_carry_be (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u32x *c0, u32x *c1, u32x *c2, u32x *c3, u32x *c4, u32x *c5, u32x *c6, u32x *c7, const u32 offset) +DECLSPEC void switch_buffer_by_offset_8x4_carry_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, PRIVATE_AS u32x *c4, PRIVATE_AS u32x *c5, PRIVATE_AS u32x *c6, PRIVATE_AS u32x *c7, const u32 offset) { const int offset_switch = offset / 4; @@ -17288,7 +17288,7 @@ DECLSPEC void switch_buffer_by_offset_8x4_carry_be (u32x *w0, u32x *w1, u32x *w2 #endif } -DECLSPEC void switch_buffer_by_offset_1x64_le (u32x *w, const u32 offset) +DECLSPEC void switch_buffer_by_offset_1x64_le (PRIVATE_AS u32x *w, const u32 offset) { const int offset_switch = offset / 4; @@ -26020,7 +26020,7 @@ DECLSPEC void switch_buffer_by_offset_1x64_le (u32x *w, const u32 offset) #endif } -DECLSPEC void switch_buffer_by_offset_1x64_be (u32x *w, const u32 offset) +DECLSPEC void switch_buffer_by_offset_1x64_be (PRIVATE_AS u32x *w, const u32 offset) { const int offset_switch = offset / 4; @@ -34752,7 +34752,7 @@ DECLSPEC void switch_buffer_by_offset_1x64_be (u32x *w, const u32 offset) * vector functions as scalar (for outer loop usage) */ -DECLSPEC void truncate_block_4x4_le_S (u32 *w0, const u32 len) +DECLSPEC void truncate_block_4x4_le_S (PRIVATE_AS u32 *w0, const u32 len) { switch (len) { @@ -34862,7 +34862,7 @@ DECLSPEC void truncate_block_4x4_le_S (u32 *w0, const u32 len) } } -DECLSPEC void truncate_block_4x4_be_S (u32 *w0, const u32 len) +DECLSPEC void truncate_block_4x4_be_S (PRIVATE_AS u32 *w0, const u32 len) { switch (len) { @@ -34972,7 +34972,7 @@ DECLSPEC void truncate_block_4x4_be_S (u32 *w0, const u32 len) } } -DECLSPEC void truncate_block_16x4_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len) +DECLSPEC void truncate_block_16x4_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 len) { switch (len) { @@ -35778,7 +35778,7 @@ DECLSPEC void truncate_block_16x4_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons } } -DECLSPEC void truncate_block_16x4_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len) +DECLSPEC void truncate_block_16x4_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 len) { switch (len) { @@ -36584,7 +36584,7 @@ DECLSPEC void truncate_block_16x4_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons } } -DECLSPEC void set_mark_1x4_S (u32 *v, const u32 offset) +DECLSPEC void set_mark_1x4_S (PRIVATE_AS u32 *v, const u32 offset) { const u32 c = (offset & 15) / 4; const u32 r = 0xff << ((offset & 3) * 8); @@ -36595,7 +36595,7 @@ DECLSPEC void set_mark_1x4_S (u32 *v, const u32 offset) v[3] = (c == 3) ? r : 0; } -DECLSPEC void append_helper_1x4_S (u32 *r, const u32 v, const u32 *m) +DECLSPEC void append_helper_1x4_S (PRIVATE_AS u32 *r, const u32 v, PRIVATE_AS const u32 *m) { r[0] |= v & m[0]; r[1] |= v & m[1]; @@ -36603,7 +36603,7 @@ DECLSPEC void append_helper_1x4_S (u32 *r, const u32 v, const u32 *m) r[3] |= v & m[3]; } -DECLSPEC void append_0x01_2x4_S (u32 *w0, u32 *w1, const u32 offset) +DECLSPEC void append_0x01_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset) { u32 v[4]; @@ -36615,7 +36615,7 @@ DECLSPEC void append_0x01_2x4_S (u32 *w0, u32 *w1, const u32 offset) append_helper_1x4_S (w1, ((offset16 == 1) ? 0x01010101 : 0), v); } -DECLSPEC void append_0x06_2x4_S (u32 *w0, u32 *w1, const u32 offset) +DECLSPEC void append_0x06_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset) { u32 v[4]; @@ -36627,7 +36627,7 @@ DECLSPEC void append_0x06_2x4_S (u32 *w0, u32 *w1, const u32 offset) append_helper_1x4_S (w1, ((offset16 == 1) ? 0x06060606 : 0), v); } -DECLSPEC void append_0x01_4x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 offset) +DECLSPEC void append_0x01_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset) { u32 v[4]; @@ -36641,7 +36641,7 @@ DECLSPEC void append_0x01_4x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 o append_helper_1x4_S (w3, ((offset16 == 3) ? 0x01010101 : 0), v); } -DECLSPEC void append_0x2d_4x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 offset) +DECLSPEC void append_0x2d_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset) { u32 v[4]; @@ -36655,7 +36655,7 @@ DECLSPEC void append_0x2d_4x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 o append_helper_1x4_S (w3, ((offset16 == 3) ? 0x2d2d2d2d : 0), v); } -DECLSPEC void append_0x80_1x4_S (u32 *w0, const u32 offset) +DECLSPEC void append_0x80_1x4_S (PRIVATE_AS u32 *w0, const u32 offset) { u32 v[4]; @@ -36664,7 +36664,7 @@ DECLSPEC void append_0x80_1x4_S (u32 *w0, const u32 offset) append_helper_1x4_S (w0, 0x80808080, v); } -DECLSPEC void append_0x80_2x4_S (u32 *w0, u32 *w1, const u32 offset) +DECLSPEC void append_0x80_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset) { u32 v[4]; @@ -36676,7 +36676,7 @@ DECLSPEC void append_0x80_2x4_S (u32 *w0, u32 *w1, const u32 offset) append_helper_1x4_S (w1, ((offset16 == 1) ? 0x80808080 : 0), v); } -DECLSPEC void append_0x80_3x4_S (u32 *w0, u32 *w1, u32 *w2, const u32 offset) +DECLSPEC void append_0x80_3x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, const u32 offset) { u32 v[4]; @@ -36689,7 +36689,7 @@ DECLSPEC void append_0x80_3x4_S (u32 *w0, u32 *w1, u32 *w2, const u32 offset) append_helper_1x4_S (w2, ((offset16 == 2) ? 0x80808080 : 0), v); } -DECLSPEC void append_0x80_4x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 offset) +DECLSPEC void append_0x80_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset) { u32 v[4]; @@ -36703,7 +36703,7 @@ DECLSPEC void append_0x80_4x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 o append_helper_1x4_S (w3, ((offset16 == 3) ? 0x80808080 : 0), v); } -DECLSPEC void append_0x80_8x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const u32 offset) +DECLSPEC void append_0x80_8x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset) { u32 v[4]; @@ -36721,7 +36721,7 @@ DECLSPEC void append_0x80_8x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u3 append_helper_1x4_S (w7, ((offset16 == 7) ? 0x80808080 : 0), v); } -DECLSPEC void make_utf16be_S (const u32 *in, u32 *out1, u32 *out2) +DECLSPEC void make_utf16be_S (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2) { #if defined IS_NV @@ -36759,7 +36759,7 @@ DECLSPEC void make_utf16be_S (const u32 *in, u32 *out1, u32 *out2) #endif } -DECLSPEC void make_utf16le_S (const u32 *in, u32 *out1, u32 *out2) +DECLSPEC void make_utf16le_S (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2) { #if defined IS_NV @@ -36797,7 +36797,7 @@ DECLSPEC void make_utf16le_S (const u32 *in, u32 *out1, u32 *out2) #endif } -DECLSPEC void undo_utf16be_S (const u32 *in1, const u32 *in2, u32 *out) +DECLSPEC void undo_utf16be_S (PRIVATE_AS const u32 *in1, PRIVATE_AS const u32 *in2, PRIVATE_AS u32 *out) { #if defined IS_NV @@ -36827,7 +36827,7 @@ DECLSPEC void undo_utf16be_S (const u32 *in1, const u32 *in2, u32 *out) #endif } -DECLSPEC void undo_utf16le_S (const u32 *in1, const u32 *in2, u32 *out) +DECLSPEC void undo_utf16le_S (PRIVATE_AS const u32 *in1, PRIVATE_AS const u32 *in2, PRIVATE_AS u32 *out) { #if defined IS_NV @@ -36857,7 +36857,7 @@ DECLSPEC void undo_utf16le_S (const u32 *in1, const u32 *in2, u32 *out) #endif } -DECLSPEC void switch_buffer_by_offset_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 offset) +DECLSPEC void switch_buffer_by_offset_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset) { const int offset_switch = offset / 4; @@ -37525,7 +37525,7 @@ DECLSPEC void switch_buffer_by_offset_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, #endif } -DECLSPEC void switch_buffer_by_offset_carry_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *c0, u32 *c1, u32 *c2, u32 *c3, const u32 offset) +DECLSPEC void switch_buffer_by_offset_carry_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, const u32 offset) { const int offset_switch = offset / 4; @@ -38453,7 +38453,7 @@ DECLSPEC void switch_buffer_by_offset_carry_le_S (u32 *w0, u32 *w1, u32 *w2, u32 #endif } -DECLSPEC void switch_buffer_by_offset_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 offset) +DECLSPEC void switch_buffer_by_offset_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset) { const int offset_switch = offset / 4; @@ -39117,7 +39117,7 @@ DECLSPEC void switch_buffer_by_offset_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, #endif } -DECLSPEC void switch_buffer_by_offset_carry_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *c0, u32 *c1, u32 *c2, u32 *c3, const u32 offset) +DECLSPEC void switch_buffer_by_offset_carry_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, const u32 offset) { const int offset_switch = offset / 4; @@ -40053,7 +40053,7 @@ DECLSPEC void switch_buffer_by_offset_carry_be_S (u32 *w0, u32 *w1, u32 *w2, u32 #endif } -DECLSPEC void switch_buffer_by_offset_8x4_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const u32 offset) +DECLSPEC void switch_buffer_by_offset_8x4_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset) { const int offset_switch = offset / 4; @@ -41793,7 +41793,7 @@ DECLSPEC void switch_buffer_by_offset_8x4_le_S (u32 *w0, u32 *w1, u32 *w2, u32 * #endif } -DECLSPEC void switch_buffer_by_offset_8x4_carry_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, u32 *c0, u32 *c1, u32 *c2, u32 *c3, u32 *c4, u32 *c5, u32 *c6, u32 *c7, const u32 offset) +DECLSPEC void switch_buffer_by_offset_8x4_carry_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, PRIVATE_AS u32 *c4, PRIVATE_AS u32 *c5, PRIVATE_AS u32 *c6, PRIVATE_AS u32 *c7, const u32 offset) { const int offset_switch = offset / 4; @@ -45181,7 +45181,7 @@ DECLSPEC void switch_buffer_by_offset_8x4_carry_le_S (u32 *w0, u32 *w1, u32 *w2, #endif } -DECLSPEC void switch_buffer_by_offset_8x4_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const u32 offset) +DECLSPEC void switch_buffer_by_offset_8x4_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset) { const int offset_switch = offset / 4; @@ -47509,7 +47509,7 @@ DECLSPEC void switch_buffer_by_offset_8x4_be_S (u32 *w0, u32 *w1, u32 *w2, u32 * #endif } -DECLSPEC void switch_buffer_by_offset_8x4_carry_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, u32 *c0, u32 *c1, u32 *c2, u32 *c3, u32 *c4, u32 *c5, u32 *c6, u32 *c7, const u32 offset) +DECLSPEC void switch_buffer_by_offset_8x4_carry_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, PRIVATE_AS u32 *c4, PRIVATE_AS u32 *c5, PRIVATE_AS u32 *c6, PRIVATE_AS u32 *c7, const u32 offset) { const int offset_switch = offset / 4; @@ -50893,7 +50893,7 @@ DECLSPEC void switch_buffer_by_offset_8x4_carry_be_S (u32 *w0, u32 *w1, u32 *w2, #endif } -DECLSPEC void switch_buffer_by_offset_1x64_le_S (u32 *w, const u32 offset) +DECLSPEC void switch_buffer_by_offset_1x64_le_S (PRIVATE_AS u32 *w, const u32 offset) { const int offset_switch = offset / 4; @@ -59625,7 +59625,7 @@ DECLSPEC void switch_buffer_by_offset_1x64_le_S (u32 *w, const u32 offset) #endif } -DECLSPEC void switch_buffer_by_offset_1x64_be_S (u32 *w, const u32 offset) +DECLSPEC void switch_buffer_by_offset_1x64_be_S (PRIVATE_AS u32 *w, const u32 offset) { const int offset_switch = offset / 4; @@ -68417,7 +68417,7 @@ DECLSPEC void switch_buffer_by_offset_1x64_be_S (u32 *w, const u32 offset) PACKSV4 (s6, v6, e); \ PACKSV4 (s7, v7, e); -DECLSPEC void switch_buffer_by_offset_le_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32x offset) +DECLSPEC void switch_buffer_by_offset_le_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset) { #if VECT_SIZE == 1 @@ -68477,7 +68477,7 @@ DECLSPEC void switch_buffer_by_offset_le_VV (u32x *w0, u32x *w1, u32x *w2, u32x #endif } -DECLSPEC void switch_buffer_by_offset_8x4_le_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const u32x offset) +DECLSPEC void switch_buffer_by_offset_8x4_le_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32x offset) { #if VECT_SIZE == 1 @@ -68657,7 +68657,7 @@ DECLSPEC void switch_buffer_by_offset_8x4_le_VV (u32x *w0, u32x *w1, u32x *w2, u #endif } -DECLSPEC void append_0x01_2x4_VV (u32x *w0, u32x *w1, const u32x offset) +DECLSPEC void append_0x01_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset) { #if VECT_SIZE == 1 @@ -68715,7 +68715,7 @@ DECLSPEC void append_0x01_2x4_VV (u32x *w0, u32x *w1, const u32x offset) #endif } -DECLSPEC void append_0x01_4x4_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32x offset) +DECLSPEC void append_0x01_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset) { #if VECT_SIZE == 1 @@ -68775,7 +68775,7 @@ DECLSPEC void append_0x01_4x4_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const #endif } -DECLSPEC void append_0x06_2x4_VV (u32x *w0, u32x *w1, const u32x offset) +DECLSPEC void append_0x06_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset) { #if VECT_SIZE == 1 @@ -68833,7 +68833,7 @@ DECLSPEC void append_0x06_2x4_VV (u32x *w0, u32x *w1, const u32x offset) #endif } -DECLSPEC void append_0x80_2x4_VV (u32x *w0, u32x *w1, const u32x offset) +DECLSPEC void append_0x80_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset) { #if VECT_SIZE == 1 @@ -68891,7 +68891,7 @@ DECLSPEC void append_0x80_2x4_VV (u32x *w0, u32x *w1, const u32x offset) #endif } -DECLSPEC void append_0x80_4x4_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32x offset) +DECLSPEC void append_0x80_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset) { #if VECT_SIZE == 1 @@ -68951,7 +68951,7 @@ DECLSPEC void append_0x80_4x4_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const #endif } -DECLSPEC void append_0x2d_4x4_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32x offset) +DECLSPEC void append_0x2d_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset) { #if VECT_SIZE == 1 diff --git a/OpenCL/inc_common.h b/OpenCL/inc_common.h index 9e679d8fa..d842b465d 100644 --- a/OpenCL/inc_common.h +++ b/OpenCL/inc_common.h @@ -26,7 +26,6 @@ * - P19: Type of the esalt_bufs structure with additional data, or void. */ - #if defined IS_CUDA || defined IS_HIP #define KERN_ATTR(p2,p4,p5,p6,p19) \ MAYBE_UNUSED GLOBAL_AS pw_t *pws, \ @@ -92,55 +91,134 @@ */ #if defined IS_CUDA || defined IS_HIP -#define KERN_ATTR_BASIC() KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, void) -#define KERN_ATTR_BITSLICE() KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bs_word_t *g_words_buf_s, void, void, void) -#define KERN_ATTR_ESALT(e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, e) -#define KERN_ATTR_RULES() KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, void) -#define KERN_ATTR_RULES_ESALT(e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, e) -#define KERN_ATTR_TMPS(t) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, t, void, void) -#define KERN_ATTR_TMPS_ESALT(t,e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, t, void, e) -#define KERN_ATTR_TMPS_HOOKS(t,h) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, t, h, void) -#define KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, t, h, e) -#define KERN_ATTR_VECTOR() KERN_ATTR (GLOBAL_AS, GLOBAL_AS const u32x *g_words_buf_r, void, void, void) -#define KERN_ATTR_VECTOR_ESALT(e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const u32x *g_words_buf_r, void, void, e) +#define _KERN_ATTR_BASIC() KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, void) +#define _KERN_ATTR_BITSLICE() KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bs_word_t *g_words_buf_s, void, void, void) +#define _KERN_ATTR_ESALT(e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, e) +#define _KERN_ATTR_RULES() KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, void) +#define _KERN_ATTR_RULES_ESALT(e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, e) +#define _KERN_ATTR_TMPS(t) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, t, void, void) +#define _KERN_ATTR_TMPS_ESALT(t,e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, t, void, e) +#define _KERN_ATTR_TMPS_HOOKS(t,h) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, t, h, void) +#define _KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, t, h, e) +#define _KERN_ATTR_VECTOR() KERN_ATTR (GLOBAL_AS, GLOBAL_AS const u32x *g_words_buf_r, void, void, void) +#define _KERN_ATTR_VECTOR_ESALT(e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const u32x *g_words_buf_r, void, void, e) #else -#define KERN_ATTR_BASIC() KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, void, void, void) -#define KERN_ATTR_BITSLICE() KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bs_word_t *words_buf_s, void, void, void) -#define KERN_ATTR_ESALT(e) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, void, void, e) -#define KERN_ATTR_RULES() KERN_ATTR (CONSTANT_AS, GLOBAL_AS const bf_t *bfs_buf, void, void, void) -#define KERN_ATTR_RULES_ESALT(e) KERN_ATTR (CONSTANT_AS, GLOBAL_AS const bf_t *bfs_buf, void, void, e) -#define KERN_ATTR_TMPS(t) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, t, void, void) -#define KERN_ATTR_TMPS_ESALT(t,e) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, t, void, e) -#define KERN_ATTR_TMPS_HOOKS(t,h) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, t, h, void) -#define KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, t, h, e) -#define KERN_ATTR_VECTOR() KERN_ATTR (GLOBAL_AS, CONSTANT_AS const u32x *words_buf_r, void, void, void) -#define KERN_ATTR_VECTOR_ESALT(e) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const u32x *words_buf_r, void, void, e) +#define _KERN_ATTR_BASIC() KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, void, void, void) +#define _KERN_ATTR_BITSLICE() KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bs_word_t *words_buf_s, void, void, void) +#define _KERN_ATTR_ESALT(e) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, void, void, e) +#define _KERN_ATTR_RULES() KERN_ATTR (CONSTANT_AS, GLOBAL_AS const bf_t *bfs_buf, void, void, void) +#define _KERN_ATTR_RULES_ESALT(e) KERN_ATTR (CONSTANT_AS, GLOBAL_AS const bf_t *bfs_buf, void, void, e) +#define _KERN_ATTR_TMPS(t) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, t, void, void) +#define _KERN_ATTR_TMPS_ESALT(t,e) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, t, void, e) +#define _KERN_ATTR_TMPS_HOOKS(t,h) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, t, h, void) +#define _KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, t, h, e) +#define _KERN_ATTR_VECTOR() KERN_ATTR (GLOBAL_AS, CONSTANT_AS const u32x *words_buf_r, void, void, void) +#define _KERN_ATTR_VECTOR_ESALT(e) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const u32x *words_buf_r, void, void, e) #endif +/* + * with Metal we have additional parameters for the 'modifiers' (gid, lid, lsize, etc...) + * they should not be declared in the host code + * the compiler make the magic for us :) + */ + +#if defined IS_METAL +#define KERN_ATTR_MAIN_PARAMS \ + uint hc_gid [[ thread_position_in_grid ]], \ + uint hc_lid [[ thread_position_in_threadgroup ]], \ + uint hc_lsz [[ threads_per_threadgroup ]] +#endif // IS_METAL + +/* + * TM kernel function parameters + */ + +#define _KERN_ATTR_TM \ + GLOBAL_AS u32 *mod, \ + GLOBAL_AS bs_word_t *words_buf_b + +/* + * Below are the macros to be used in the declarations of the KERNEL_FQ functions (pure and optimized kernels) + * With Metal we need to add KERN_ATTR_MAIN_PARAMS + * With CUDA, HIP and OpenCL there are no additional parameters other than those declared in the host code + */ + +#if defined IS_METAL +#define KERN_ATTR_BASIC() _KERN_ATTR_BASIC(), KERN_ATTR_MAIN_PARAMS +#define KERN_ATTR_BITSLICE() _KERN_ATTR_BITSLICE(), KERN_ATTR_MAIN_PARAMS +#define KERN_ATTR_ESALT(e) _KERN_ATTR_ESALT(e), KERN_ATTR_MAIN_PARAMS +#define KERN_ATTR_RULES() _KERN_ATTR_RULES(), KERN_ATTR_MAIN_PARAMS +#define KERN_ATTR_RULES_ESALT(e) _KERN_ATTR_RULES_ESALT(e), KERN_ATTR_MAIN_PARAMS +#define KERN_ATTR_TMPS(t) _KERN_ATTR_TMPS(t), KERN_ATTR_MAIN_PARAMS +#define KERN_ATTR_TMPS_ESALT(t,e) _KERN_ATTR_TMPS_ESALT(t,e), KERN_ATTR_MAIN_PARAMS +#define KERN_ATTR_TMPS_HOOKS(t,h) _KERN_ATTR_TMPS_HOOKS(t,h), KERN_ATTR_MAIN_PARAMS +#define KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e) _KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e), KERN_ATTR_MAIN_PARAMS +#define KERN_ATTR_VECTOR() _KERN_ATTR_VECTOR(), KERN_ATTR_MAIN_PARAMS +#define KERN_ATTR_VECTOR_ESALT(e) _KERN_ATTR_VECTOR_ESALT(e), KERN_ATTR_MAIN_PARAMS +#define KERN_ATTR_TM _KERN_ATTR_TM, KERN_ATTR_MAIN_PARAMS +#else // CUDA, HIP and OpenCL +#define KERN_ATTR_BASIC() _KERN_ATTR_BASIC() +#define KERN_ATTR_BITSLICE() _KERN_ATTR_BITSLICE() +#define KERN_ATTR_ESALT(e) _KERN_ATTR_ESALT(e) +#define KERN_ATTR_RULES() _KERN_ATTR_RULES() +#define KERN_ATTR_RULES_ESALT(e) _KERN_ATTR_RULES_ESALT(e) +#define KERN_ATTR_TMPS(t) _KERN_ATTR_TMPS(t) +#define KERN_ATTR_TMPS_ESALT(t,e) _KERN_ATTR_TMPS_ESALT(t,e) +#define KERN_ATTR_TMPS_HOOKS(t,h) _KERN_ATTR_TMPS_HOOKS(t,h) +#define KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e) _KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e) +#define KERN_ATTR_VECTOR() _KERN_ATTR_VECTOR() +#define KERN_ATTR_VECTOR_ESALT(e) _KERN_ATTR_VECTOR_ESALT(e) +#define KERN_ATTR_TM _KERN_ATTR_TM +#endif // IS_METAL + +/* + * Below are the macros to be used in the declarations of the DECLSPEC functions + * that reuse the same parameters of KERNEL_FQ functions (-a3 optimized kernels) + * They are shared with CUDA, HIP, Metal and OpenCL runtime + * With these we can reuse 'modifier' (gid, lid, lsz, etc...) if we got it inside KERNEL functions + */ + +#define KERN_ATTR_FUNC_PARAMS \ + const u64 gid, \ + MAYBE_UNUSED const u64 lid, \ + MAYBE_UNUSED const u64 lsz + +#define KERN_ATTR_FUNC_BASIC() _KERN_ATTR_BASIC(), KERN_ATTR_FUNC_PARAMS +#define KERN_ATTR_FUNC_BITSLICE() _KERN_ATTR_BITSLICE(), KERN_ATTR_FUNC_PARAMS +#define KERN_ATTR_FUNC_ESALT(e) _KERN_ATTR_ESALT(e), KERN_ATTR_FUNC_PARAMS +#define KERN_ATTR_FUNC_RULES() _KERN_ATTR_RULES(), KERN_ATTR_FUNC_PARAMS +#define KERN_ATTR_FUNC_RULES_ESALT(e) _KERN_ATTR_RULES_ESALT(e), KERN_ATTR_FUNC_PARAMS +#define KERN_ATTR_FUNC_TMPS(t) _KERN_ATTR_TMPS(t), KERN_ATTR_FUNC_PARAMS +#define KERN_ATTR_FUNC_TMPS_ESALT(t,e) _KERN_ATTR_TMPS_ESALT(t,e), KERN_ATTR_FUNC_PARAMS +#define KERN_ATTR_FUNC_TMPS_HOOKS(t,h) _KERN_ATTR_TMPS_HOOKS(t,h), KERN_ATTR_FUNC_PARAMS +#define KERN_ATTR_FUNC_TMPS_HOOKS_ESALT(t,h,e) _KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e), KERN_ATTR_FUNC_PARAMS +#define KERN_ATTR_FUNC_VECTOR() _KERN_ATTR_VECTOR(), KERN_ATTR_FUNC_PARAMS +#define KERN_ATTR_FUNC_VECTOR_ESALT(e) _KERN_ATTR_VECTOR_ESALT(e), KERN_ATTR_FUNC_PARAMS + // union based packing -DECLSPEC u8 v8a_from_v32_S (const u32 v32); -DECLSPEC u8 v8b_from_v32_S (const u32 v32); -DECLSPEC u8 v8c_from_v32_S (const u32 v32); -DECLSPEC u8 v8d_from_v32_S (const u32 v32); +DECLSPEC u8 v8a_from_v32_S (const u32 v32); +DECLSPEC u8 v8b_from_v32_S (const u32 v32); +DECLSPEC u8 v8c_from_v32_S (const u32 v32); +DECLSPEC u8 v8d_from_v32_S (const u32 v32); -DECLSPEC u8 v8a_from_v64_S (const u64 v64); -DECLSPEC u8 v8b_from_v64_S (const u64 v64); -DECLSPEC u8 v8c_from_v64_S (const u64 v64); -DECLSPEC u8 v8d_from_v64_S (const u64 v64); -DECLSPEC u8 v8e_from_v64_S (const u64 v64); -DECLSPEC u8 v8f_from_v64_S (const u64 v64); -DECLSPEC u8 v8g_from_v64_S (const u64 v64); -DECLSPEC u8 v8h_from_v64_S (const u64 v64); +DECLSPEC u8 v8a_from_v64_S (const u64 v64); +DECLSPEC u8 v8b_from_v64_S (const u64 v64); +DECLSPEC u8 v8c_from_v64_S (const u64 v64); +DECLSPEC u8 v8d_from_v64_S (const u64 v64); +DECLSPEC u8 v8e_from_v64_S (const u64 v64); +DECLSPEC u8 v8f_from_v64_S (const u64 v64); +DECLSPEC u8 v8g_from_v64_S (const u64 v64); +DECLSPEC u8 v8h_from_v64_S (const u64 v64); -DECLSPEC u8x v8a_from_v64 (const u64x v64); -DECLSPEC u8x v8b_from_v64 (const u64x v64); -DECLSPEC u8x v8c_from_v64 (const u64x v64); -DECLSPEC u8x v8d_from_v64 (const u64x v64); -DECLSPEC u8x v8e_from_v64 (const u64x v64); -DECLSPEC u8x v8f_from_v64 (const u64x v64); -DECLSPEC u8x v8g_from_v64 (const u64x v64); -DECLSPEC u8x v8h_from_v64 (const u64x v64); +DECLSPEC u8x v8a_from_v64 (const u64x v64); +DECLSPEC u8x v8b_from_v64 (const u64x v64); +DECLSPEC u8x v8c_from_v64 (const u64x v64); +DECLSPEC u8x v8d_from_v64 (const u64x v64); +DECLSPEC u8x v8e_from_v64 (const u64x v64); +DECLSPEC u8x v8f_from_v64 (const u64x v64); +DECLSPEC u8x v8g_from_v64 (const u64x v64); +DECLSPEC u8x v8h_from_v64 (const u64x v64); DECLSPEC u16 v16a_from_v32_S (const u32 v32); DECLSPEC u16 v16b_from_v32_S (const u32 v32); @@ -210,91 +288,91 @@ DECLSPEC u32 hc_lop_0x96_S (const u32 a, const u32 b, const u32 c); DECLSPEC int ffz (const u32 v); #ifdef KERNEL_STATIC -DECLSPEC int hash_comp (const u32 *d1, GLOBAL_AS const u32 *d2); -DECLSPEC int find_hash (const u32 *digest, const u32 digests_cnt, GLOBAL_AS const digest_t *digests_buf); +DECLSPEC int hash_comp (PRIVATE_AS const u32 *d1, GLOBAL_AS const u32 *d2); +DECLSPEC int find_hash (PRIVATE_AS const u32 *digest, const u32 digests_cnt, GLOBAL_AS const digest_t *digests_buf); #endif -DECLSPEC int hc_enc_scan (const u32 *buf, const int len); +DECLSPEC int hc_enc_scan (PRIVATE_AS const u32 *buf, const int len); DECLSPEC int hc_enc_scan_global (GLOBAL_AS const u32 *buf, const int len); -DECLSPEC void hc_enc_init (hc_enc_t *hc_enc); -DECLSPEC int hc_enc_has_next (hc_enc_t *hc_enc, const int sz); -DECLSPEC int hc_enc_next (hc_enc_t *hc_enc, const u32 *src_buf, const int src_len, const int src_sz, u32 *dst_buf, const int dst_sz); -DECLSPEC int hc_enc_next_global (hc_enc_t *hc_enc, GLOBAL_AS const u32 *src_buf, const int src_len, const int src_sz, u32 *dst_buf, const int dst_sz); +DECLSPEC void hc_enc_init (PRIVATE_AS hc_enc_t *hc_enc); +DECLSPEC int hc_enc_has_next (PRIVATE_AS hc_enc_t *hc_enc, const int sz); +DECLSPEC int hc_enc_next (PRIVATE_AS hc_enc_t *hc_enc, PRIVATE_AS const u32 *src_buf, const int src_len, const int src_sz, PRIVATE_AS u32 *dst_buf, const int dst_sz); +DECLSPEC int hc_enc_next_global (PRIVATE_AS hc_enc_t *hc_enc, GLOBAL_AS const u32 *src_buf, const int src_len, const int src_sz, PRIVATE_AS u32 *dst_buf, const int dst_sz); -DECLSPEC int pkcs_padding_bs8 (const u32 *data_buf, const int data_len); -DECLSPEC int pkcs_padding_bs16 (const u32 *data_buf, const int data_len); -DECLSPEC int asn1_detect (const u32 *buf, const int len); +DECLSPEC int pkcs_padding_bs8 (PRIVATE_AS const u32 *data_buf, const int data_len); +DECLSPEC int pkcs_padding_bs16 (PRIVATE_AS const u32 *data_buf, const int data_len); +DECLSPEC int asn1_detect (PRIVATE_AS const u32 *buf, const int len); DECLSPEC u32 check_bitmap (GLOBAL_AS const u32 *bitmap, const u32 bitmap_mask, const u32 bitmap_shift, const u32 digest); -DECLSPEC u32 check (const u32 *digest, GLOBAL_AS const u32 *bitmap_s1_a, GLOBAL_AS const u32 *bitmap_s1_b, GLOBAL_AS const u32 *bitmap_s1_c, GLOBAL_AS const u32 *bitmap_s1_d, GLOBAL_AS const u32 *bitmap_s2_a, GLOBAL_AS const u32 *bitmap_s2_b, GLOBAL_AS const u32 *bitmap_s2_c, GLOBAL_AS const u32 *bitmap_s2_d, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2); +DECLSPEC u32 check (PRIVATE_AS const u32 *digest, GLOBAL_AS const u32 *bitmap_s1_a, GLOBAL_AS const u32 *bitmap_s1_b, GLOBAL_AS const u32 *bitmap_s1_c, GLOBAL_AS const u32 *bitmap_s1_d, GLOBAL_AS const u32 *bitmap_s2_a, GLOBAL_AS const u32 *bitmap_s2_b, GLOBAL_AS const u32 *bitmap_s2_c, GLOBAL_AS const u32 *bitmap_s2_d, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2); DECLSPEC void mark_hash (GLOBAL_AS plain_t *plains_buf, GLOBAL_AS u32 *d_result, const u32 salt_pos, const u32 digests_cnt, const u32 digest_pos, const u32 hash_pos, const u64 gid, const u32 il_pos, const u32 extra1, const u32 extra2); -DECLSPEC int hc_count_char (const u32 *buf, const int elems, const u32 c); -DECLSPEC float hc_get_entropy (const u32 *buf, const int elems); +DECLSPEC int hc_count_char (PRIVATE_AS const u32 *buf, const int elems, const u32 c); +DECLSPEC float hc_get_entropy (PRIVATE_AS const u32 *buf, const int elems); DECLSPEC int is_valid_hex_8 (const u8 v); DECLSPEC int is_valid_hex_32 (const u32 v); DECLSPEC int is_valid_base58_8 (const u8 v); DECLSPEC int is_valid_base58_32 (const u32 v); DECLSPEC int hc_find_keyboard_layout_map (const u32 search, const int search_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt); -DECLSPEC int hc_execute_keyboard_layout_mapping (u32 *w, const int pw_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt); -DECLSPEC void make_utf16be (const u32x *in, u32x *out1, u32x *out2); -DECLSPEC void make_utf16beN (const u32x *in, u32x *out1, u32x *out2); -DECLSPEC void make_utf16le (const u32x *in, u32x *out1, u32x *out2); -DECLSPEC void make_utf16leN (const u32x *in, u32x *out1, u32x *out2); -DECLSPEC void undo_utf16be (const u32x *in1, const u32x *in2, u32x *out); -DECLSPEC void undo_utf16le (const u32x *in1, const u32x *in2, u32x *out); -DECLSPEC void set_mark_1x4 (u32 *v, const u32 offset); -DECLSPEC void append_helper_1x4 (u32x *r, const u32 v, const u32 *m); -DECLSPEC void append_0x80_1x4 (u32x *w0, const u32 offset); -DECLSPEC void append_0x80_2x4 (u32x *w0, u32x *w1, const u32 offset); -DECLSPEC void append_0x80_3x4 (u32x *w0, u32x *w1, u32x *w2, const u32 offset); -DECLSPEC void append_0x80_4x4 (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32 offset); -DECLSPEC void append_0x80_8x4 (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const u32 offset); -DECLSPEC void append_0x80_1x16 (u32x *w, const u32 offset); -DECLSPEC void switch_buffer_by_offset_le (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32 offset); -DECLSPEC void switch_buffer_by_offset_carry_le (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *c0, u32x *c1, u32x *c2, u32x *c3, const u32 offset); -DECLSPEC void switch_buffer_by_offset_be (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32 offset); -DECLSPEC void switch_buffer_by_offset_carry_be (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *c0, u32x *c1, u32x *c2, u32x *c3, const u32 offset); -DECLSPEC void switch_buffer_by_offset_8x4_le (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const u32 offset); -DECLSPEC void switch_buffer_by_offset_8x4_carry_le (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u32x *c0, u32x *c1, u32x *c2, u32x *c3, u32x *c4, u32x *c5, u32x *c6, u32x *c7, const u32 offset); -DECLSPEC void switch_buffer_by_offset_8x4_be (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const u32 offset); -DECLSPEC void switch_buffer_by_offset_8x4_carry_be (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u32x *c0, u32x *c1, u32x *c2, u32x *c3, u32x *c4, u32x *c5, u32x *c6, u32x *c7, const u32 offset); -DECLSPEC void switch_buffer_by_offset_1x64_le (u32x *w, const u32 offset); -DECLSPEC void switch_buffer_by_offset_1x64_be (u32x *w, const u32 offset); -DECLSPEC void truncate_block_4x4_le_S (u32 *w0, const u32 len); -DECLSPEC void truncate_block_4x4_be_S (u32 *w0, const u32 len); -DECLSPEC void truncate_block_16x4_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len); -DECLSPEC void truncate_block_16x4_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len); -DECLSPEC void set_mark_1x4_S (u32 *v, const u32 offset); -DECLSPEC void append_helper_1x4_S (u32 *r, const u32 v, const u32 *m); -DECLSPEC void append_0x01_2x4_S (u32 *w0, u32 *w1, const u32 offset); -DECLSPEC void append_0x06_2x4_S (u32 *w0, u32 *w1, const u32 offset); -DECLSPEC void append_0x01_4x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 offset); -DECLSPEC void append_0x2d_4x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 offset); -DECLSPEC void append_0x80_1x4_S (u32 *w0, const u32 offset); -DECLSPEC void append_0x80_2x4_S (u32 *w0, u32 *w1, const u32 offset); -DECLSPEC void append_0x80_3x4_S (u32 *w0, u32 *w1, u32 *w2, const u32 offset); -DECLSPEC void append_0x80_4x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 offset); -DECLSPEC void append_0x80_8x4_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const u32 offset); -DECLSPEC void make_utf16be_S (const u32 *in, u32 *out1, u32 *out2); -DECLSPEC void make_utf16le_S (const u32 *in, u32 *out1, u32 *out2); -DECLSPEC void undo_utf16be_S (const u32 *in1, const u32 *in2, u32 *out); -DECLSPEC void undo_utf16le_S (const u32 *in1, const u32 *in2, u32 *out); -DECLSPEC void switch_buffer_by_offset_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 offset); -DECLSPEC void switch_buffer_by_offset_carry_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *c0, u32 *c1, u32 *c2, u32 *c3, const u32 offset); -DECLSPEC void switch_buffer_by_offset_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 offset); -DECLSPEC void switch_buffer_by_offset_carry_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *c0, u32 *c1, u32 *c2, u32 *c3, const u32 offset); -DECLSPEC void switch_buffer_by_offset_8x4_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const u32 offset); -DECLSPEC void switch_buffer_by_offset_8x4_carry_le_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, u32 *c0, u32 *c1, u32 *c2, u32 *c3, u32 *c4, u32 *c5, u32 *c6, u32 *c7, const u32 offset); -DECLSPEC void switch_buffer_by_offset_8x4_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const u32 offset); -DECLSPEC void switch_buffer_by_offset_8x4_carry_be_S (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, u32 *c0, u32 *c1, u32 *c2, u32 *c3, u32 *c4, u32 *c5, u32 *c6, u32 *c7, const u32 offset); -DECLSPEC void switch_buffer_by_offset_1x64_le_S (u32 *w, const u32 offset); -DECLSPEC void switch_buffer_by_offset_1x64_be_S (u32 *w, const u32 offset); -DECLSPEC void switch_buffer_by_offset_le_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32x offset); -DECLSPEC void switch_buffer_by_offset_8x4_le_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const u32x offset); -DECLSPEC void append_0x01_2x4_VV (u32x *w0, u32x *w1, const u32x offset); -DECLSPEC void append_0x01_4x4_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32x offset); -DECLSPEC void append_0x06_2x4_VV (u32x *w0, u32x *w1, const u32x offset); -DECLSPEC void append_0x80_2x4_VV (u32x *w0, u32x *w1, const u32x offset); -DECLSPEC void append_0x80_4x4_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32x offset); -DECLSPEC void append_0x2d_4x4_VV (u32x *w0, u32x *w1, u32x *w2, u32x *w3, const u32x offset); +DECLSPEC int hc_execute_keyboard_layout_mapping (PRIVATE_AS u32 *w, const int pw_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt); +DECLSPEC void make_utf16be (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2); +DECLSPEC void make_utf16beN (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2); +DECLSPEC void make_utf16le (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2); +DECLSPEC void make_utf16leN (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2); +DECLSPEC void undo_utf16be (PRIVATE_AS const u32x *in1, PRIVATE_AS const u32x *in2, PRIVATE_AS u32x *out); +DECLSPEC void undo_utf16le (PRIVATE_AS const u32x *in1, PRIVATE_AS const u32x *in2, PRIVATE_AS u32x *out); +DECLSPEC void set_mark_1x4 (PRIVATE_AS u32 *v, const u32 offset); +DECLSPEC void append_helper_1x4 (PRIVATE_AS u32x *r, const u32 v, PRIVATE_AS const u32 *m); +DECLSPEC void append_0x80_1x4 (PRIVATE_AS u32x *w0, const u32 offset); +DECLSPEC void append_0x80_2x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32 offset); +DECLSPEC void append_0x80_3x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, const u32 offset); +DECLSPEC void append_0x80_4x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset); +DECLSPEC void append_0x80_8x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset); +DECLSPEC void append_0x80_1x16 (PRIVATE_AS u32x *w, const u32 offset); +DECLSPEC void switch_buffer_by_offset_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset); +DECLSPEC void switch_buffer_by_offset_carry_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, const u32 offset); +DECLSPEC void switch_buffer_by_offset_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset); +DECLSPEC void switch_buffer_by_offset_carry_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, const u32 offset); +DECLSPEC void switch_buffer_by_offset_8x4_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset); +DECLSPEC void switch_buffer_by_offset_8x4_carry_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, PRIVATE_AS u32x *c4, PRIVATE_AS u32x *c5, PRIVATE_AS u32x *c6, PRIVATE_AS u32x *c7, const u32 offset); +DECLSPEC void switch_buffer_by_offset_8x4_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset); +DECLSPEC void switch_buffer_by_offset_8x4_carry_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, PRIVATE_AS u32x *c4, PRIVATE_AS u32x *c5, PRIVATE_AS u32x *c6, PRIVATE_AS u32x *c7, const u32 offset); +DECLSPEC void switch_buffer_by_offset_1x64_le (PRIVATE_AS u32x *w, const u32 offset); +DECLSPEC void switch_buffer_by_offset_1x64_be (PRIVATE_AS u32x *w, const u32 offset); +DECLSPEC void truncate_block_4x4_le_S (PRIVATE_AS u32 *w0, const u32 len); +DECLSPEC void truncate_block_4x4_be_S (PRIVATE_AS u32 *w0, const u32 len); +DECLSPEC void truncate_block_16x4_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 len); +DECLSPEC void truncate_block_16x4_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 len); +DECLSPEC void set_mark_1x4_S (PRIVATE_AS u32 *v, const u32 offset); +DECLSPEC void append_helper_1x4_S (PRIVATE_AS u32 *r, const u32 v, PRIVATE_AS const u32 *m); +DECLSPEC void append_0x01_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset); +DECLSPEC void append_0x06_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset); +DECLSPEC void append_0x01_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset); +DECLSPEC void append_0x2d_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset); +DECLSPEC void append_0x80_1x4_S (PRIVATE_AS u32 *w0, const u32 offset); +DECLSPEC void append_0x80_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset); +DECLSPEC void append_0x80_3x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, const u32 offset); +DECLSPEC void append_0x80_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset); +DECLSPEC void append_0x80_8x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset); +DECLSPEC void make_utf16be_S (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2); +DECLSPEC void make_utf16le_S (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2); +DECLSPEC void undo_utf16be_S (PRIVATE_AS const u32 *in1, PRIVATE_AS const u32 *in2, PRIVATE_AS u32 *out); +DECLSPEC void undo_utf16le_S (PRIVATE_AS const u32 *in1, PRIVATE_AS const u32 *in2, PRIVATE_AS u32 *out); +DECLSPEC void switch_buffer_by_offset_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset); +DECLSPEC void switch_buffer_by_offset_carry_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, const u32 offset); +DECLSPEC void switch_buffer_by_offset_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset); +DECLSPEC void switch_buffer_by_offset_carry_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, const u32 offset); +DECLSPEC void switch_buffer_by_offset_8x4_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset); +DECLSPEC void switch_buffer_by_offset_8x4_carry_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, PRIVATE_AS u32 *c4, PRIVATE_AS u32 *c5, PRIVATE_AS u32 *c6, PRIVATE_AS u32 *c7, const u32 offset); +DECLSPEC void switch_buffer_by_offset_8x4_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset); +DECLSPEC void switch_buffer_by_offset_8x4_carry_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, PRIVATE_AS u32 *c4, PRIVATE_AS u32 *c5, PRIVATE_AS u32 *c6, PRIVATE_AS u32 *c7, const u32 offset); +DECLSPEC void switch_buffer_by_offset_1x64_le_S (PRIVATE_AS u32 *w, const u32 offset); +DECLSPEC void switch_buffer_by_offset_1x64_be_S (PRIVATE_AS u32 *w, const u32 offset); +DECLSPEC void switch_buffer_by_offset_le_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset); +DECLSPEC void switch_buffer_by_offset_8x4_le_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32x offset); +DECLSPEC void append_0x01_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset); +DECLSPEC void append_0x01_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset); +DECLSPEC void append_0x06_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset); +DECLSPEC void append_0x80_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset); +DECLSPEC void append_0x80_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset); +DECLSPEC void append_0x2d_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset); -#endif +#endif // _INC_COMMON_H diff --git a/OpenCL/inc_diskcryptor_xts.cl b/OpenCL/inc_diskcryptor_xts.cl index e643e879f..2b4ec5f93 100644 --- a/OpenCL/inc_diskcryptor_xts.cl +++ b/OpenCL/inc_diskcryptor_xts.cl @@ -12,7 +12,7 @@ #include "inc_cipher_twofish.h" #include "inc_diskcryptor_xts.h" -DECLSPEC void dcrp_xts_mul2 (u32 *in, u32 *out) +DECLSPEC void dcrp_xts_mul2 (PRIVATE_AS u32 *in, PRIVATE_AS u32 *out) { const u32 c = in[3] >> 31; @@ -24,7 +24,7 @@ DECLSPEC void dcrp_xts_mul2 (u32 *in, u32 *out) out[0] ^= c * 0x87; } -DECLSPEC void dcrp_aes256_decrypt_xts (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void dcrp_aes256_decrypt_xts (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { out[0] = in[0]; out[1] = in[1]; @@ -55,7 +55,7 @@ DECLSPEC void dcrp_aes256_decrypt_xts (const u32 *ukey1, const u32 *ukey2, const out[3] ^= T[3]; } -DECLSPEC void dcrp_serpent256_decrypt_xts (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks) +DECLSPEC void dcrp_serpent256_decrypt_xts (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks) { out[0] = in[0]; out[1] = in[1]; @@ -86,7 +86,7 @@ DECLSPEC void dcrp_serpent256_decrypt_xts (const u32 *ukey1, const u32 *ukey2, c out[3] ^= T[3]; } -DECLSPEC void dcrp_twofish256_decrypt_xts (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *sk, u32 *lk) +DECLSPEC void dcrp_twofish256_decrypt_xts (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk) { out[0] = in[0]; out[1] = in[1]; @@ -119,7 +119,7 @@ DECLSPEC void dcrp_twofish256_decrypt_xts (const u32 *ukey1, const u32 *ukey2, c // 512 bit -DECLSPEC int dcrp_verify_header_aes (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int dcrp_verify_header_aes (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_aes[60]; @@ -147,7 +147,7 @@ DECLSPEC int dcrp_verify_header_aes (GLOBAL_AS const u32 *data_buf, const u32 *u return 1; } -DECLSPEC int dcrp_verify_header_serpent (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2) +DECLSPEC int dcrp_verify_header_serpent (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2) { u32 ks_serpent[140]; @@ -175,7 +175,7 @@ DECLSPEC int dcrp_verify_header_serpent (GLOBAL_AS const u32 *data_buf, const u3 return 1; } -DECLSPEC int dcrp_verify_header_twofish (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2) +DECLSPEC int dcrp_verify_header_twofish (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2) { u32 sk_twofish[4]; u32 lk_twofish[40]; @@ -206,7 +206,7 @@ DECLSPEC int dcrp_verify_header_twofish (GLOBAL_AS const u32 *data_buf, const u3 // 1024 bit -DECLSPEC int dcrp_verify_header_aes_twofish (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int dcrp_verify_header_aes_twofish (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_aes[60]; @@ -239,7 +239,7 @@ DECLSPEC int dcrp_verify_header_aes_twofish (GLOBAL_AS const u32 *data_buf, cons return 1; } -DECLSPEC int dcrp_verify_header_serpent_aes (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int dcrp_verify_header_serpent_aes (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_serpent[140]; u32 ks_aes[60]; @@ -270,7 +270,7 @@ DECLSPEC int dcrp_verify_header_serpent_aes (GLOBAL_AS const u32 *data_buf, cons return 1; } -DECLSPEC int dcrp_verify_header_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4) +DECLSPEC int dcrp_verify_header_twofish_serpent (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4) { u32 sk_twofish[4]; u32 lk_twofish[40]; @@ -305,7 +305,7 @@ DECLSPEC int dcrp_verify_header_twofish_serpent (GLOBAL_AS const u32 *data_buf, // 1536 bit -DECLSPEC int dcrp_verify_header_aes_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int dcrp_verify_header_aes_twofish_serpent (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, PRIVATE_AS const u32 *ukey5, PRIVATE_AS const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_aes[60]; @@ -342,7 +342,7 @@ DECLSPEC int dcrp_verify_header_aes_twofish_serpent (GLOBAL_AS const u32 *data_b return 1; } -DECLSPEC int dcrp_verify_header_serpent_twofish_aes (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int dcrp_verify_header_serpent_twofish_aes (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, PRIVATE_AS const u32 *ukey5, PRIVATE_AS const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_serpent[140]; diff --git a/OpenCL/inc_diskcryptor_xts.h b/OpenCL/inc_diskcryptor_xts.h index a71234724..eac08d15d 100644 --- a/OpenCL/inc_diskcryptor_xts.h +++ b/OpenCL/inc_diskcryptor_xts.h @@ -6,17 +6,17 @@ #ifndef _INC_DISKCRYPTOR_XTS_H #define _INC_DISKCRYPTOR_XTS_H -DECLSPEC void dcrp_xts_mul2 (u32 *in, u32 *out); -DECLSPEC void dcrp_aes256_decrypt_xts (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void dcrp_serpent256_decrypt_xts (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks); -DECLSPEC void dcrp_twofish256_decrypt_xts (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *sk, u32 *lk); -DECLSPEC int dcrp_verify_header_aes (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC int dcrp_verify_header_serpent (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2); -DECLSPEC int dcrp_verify_header_twofish (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2); -DECLSPEC int dcrp_verify_header_aes_twofish (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC int dcrp_verify_header_serpent_aes (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC int dcrp_verify_header_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4); -DECLSPEC int dcrp_verify_header_aes_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC int dcrp_verify_header_serpent_twofish_aes (GLOBAL_AS const u32 *data_buf, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void dcrp_xts_mul2 (PRIVATE_AS u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void dcrp_aes256_decrypt_xts (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void dcrp_serpent256_decrypt_xts (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks); +DECLSPEC void dcrp_twofish256_decrypt_xts (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk); +DECLSPEC int dcrp_verify_header_aes (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC int dcrp_verify_header_serpent (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2); +DECLSPEC int dcrp_verify_header_twofish (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2); +DECLSPEC int dcrp_verify_header_aes_twofish (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC int dcrp_verify_header_serpent_aes (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC int dcrp_verify_header_twofish_serpent (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4); +DECLSPEC int dcrp_verify_header_aes_twofish_serpent (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, PRIVATE_AS const u32 *ukey5, PRIVATE_AS const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC int dcrp_verify_header_serpent_twofish_aes (GLOBAL_AS const u32 *data_buf, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, PRIVATE_AS const u32 *ukey5, PRIVATE_AS const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); #endif // _INC_DISKCRYPTOR_XTS_H diff --git a/OpenCL/inc_ecc_secp256k1.cl b/OpenCL/inc_ecc_secp256k1.cl index 822aa2694..e00845ef6 100644 --- a/OpenCL/inc_ecc_secp256k1.cl +++ b/OpenCL/inc_ecc_secp256k1.cl @@ -103,7 +103,7 @@ #include "inc_ecc_secp256k1.h" -DECLSPEC u32 sub (u32 *r, const u32 *a, const u32 *b) +DECLSPEC u32 sub (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *a, PRIVATE_AS const u32 *b) { u32 c = 0; // carry/borrow @@ -157,7 +157,7 @@ DECLSPEC u32 sub (u32 *r, const u32 *a, const u32 *b) return c; } -DECLSPEC u32 add (u32 *r, const u32 *a, const u32 *b) +DECLSPEC u32 add (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *a, PRIVATE_AS const u32 *b) { u32 c = 0; // carry/borrow @@ -211,7 +211,7 @@ DECLSPEC u32 add (u32 *r, const u32 *a, const u32 *b) return c; } -DECLSPEC void sub_mod (u32 *r, const u32 *a, const u32 *b) +DECLSPEC void sub_mod (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *a, PRIVATE_AS const u32 *b) { const u32 c = sub (r, a, b); // carry @@ -232,7 +232,7 @@ DECLSPEC void sub_mod (u32 *r, const u32 *a, const u32 *b) } } -DECLSPEC void add_mod (u32 *r, const u32 *a, const u32 *b) +DECLSPEC void add_mod (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *a, PRIVATE_AS const u32 *b) { const u32 c = add (r, a, b); // carry @@ -278,7 +278,7 @@ DECLSPEC void add_mod (u32 *r, const u32 *a, const u32 *b) } } -DECLSPEC void mod_512 (u32 *n) +DECLSPEC void mod_512 (PRIVATE_AS u32 *n) { // we need to perform a modulo operation with 512-bit % 256-bit (bignum modulo): // the modulus is the secp256k1 group order @@ -590,7 +590,7 @@ DECLSPEC void mod_512 (u32 *n) n[15] = a[15]; } -DECLSPEC void mul_mod (u32 *r, const u32 *a, const u32 *b) // TODO get rid of u64 ? +DECLSPEC void mul_mod (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *a, PRIVATE_AS const u32 *b) // TODO get rid of u64 ? { u32 t[16] = { 0 }; // we need up to double the space (2 * 8) @@ -743,7 +743,7 @@ DECLSPEC void mul_mod (u32 *r, const u32 *a, const u32 *b) // TODO get rid of u6 } } -DECLSPEC void sqrt_mod (u32 *r) +DECLSPEC void sqrt_mod (PRIVATE_AS u32 *r) { // Fermat's Little Theorem // secp256k1: y^2 = x^3 + 7 % p @@ -795,7 +795,7 @@ DECLSPEC void sqrt_mod (u32 *r) // (inverse (a, p) * a) % p == 1 (or think of a * a^-1 = a / a = 1) -DECLSPEC void inv_mod (u32 *a) +DECLSPEC void inv_mod (PRIVATE_AS u32 *a) { // How often does this really happen? it should "almost" never happen (but would be safer) // if ((a[0] | a[1] | a[2] | a[3] | a[4] | a[5] | a[6] | a[7]) == 0) return; @@ -1044,7 +1044,7 @@ DECLSPEC void inv_mod (u32 *a) Z = 2 * y * z */ -DECLSPEC void point_double (u32 *x, u32 *y, u32 *z) +DECLSPEC void point_double (PRIVATE_AS u32 *x, PRIVATE_AS u32 *y, PRIVATE_AS u32 *z) { // How often does this really happen? it should "almost" never happen (but would be safer) @@ -1231,7 +1231,7 @@ DECLSPEC void point_double (u32 *x, u32 *y, u32 *z) * y3 = t3-t4 */ -DECLSPEC void point_add (u32 *x1, u32 *y1, u32 *z1, u32 *x2, u32 *y2) // z2 = 1 +DECLSPEC void point_add (PRIVATE_AS u32 *x1, PRIVATE_AS u32 *y1, PRIVATE_AS u32 *z1, PRIVATE_AS u32 *x2, PRIVATE_AS u32 *y2) // z2 = 1 { // How often does this really happen? it should "almost" never happen (but would be safer) @@ -1415,7 +1415,7 @@ DECLSPEC void point_add (u32 *x1, u32 *y1, u32 *z1, u32 *x2, u32 *y2) // z2 = 1 z1[7] = t8[7]; } -DECLSPEC void point_get_coords (secp256k1_t *r, const u32 *x, const u32 *y) +DECLSPEC void point_get_coords (PRIVATE_AS secp256k1_t *r, PRIVATE_AS const u32 *x, PRIVATE_AS const u32 *y) { /* pre-compute 1/-1, 3/-3, 5/-5, 7/-7 times P (x, y) @@ -1740,7 +1740,7 @@ DECLSPEC void point_get_coords (secp256k1_t *r, const u32 *x, const u32 *y) * @param k in: tweak/scalar which should be converted, a pointer to an u32 array with a size of 8. * @return Returns the loop start index. */ -DECLSPEC int convert_to_window_naf (u32 *naf, const u32 *k) +DECLSPEC int convert_to_window_naf (PRIVATE_AS u32 *naf, PRIVATE_AS const u32 *k) { int loop_start = 0; u32 n[9]; @@ -1847,7 +1847,7 @@ DECLSPEC int convert_to_window_naf (u32 *naf, const u32 *k) * @param tmps in: a basepoint for the multiplication. * @return Returns the x coordinate with a leading parity/sign (for odd/even y), it is named a compressed coordinate. */ -DECLSPEC void point_mul_xy (u32 *x1, u32 *y1, const u32 *k, GLOBAL_AS const secp256k1_t *tmps) +DECLSPEC void point_mul_xy (PRIVATE_AS u32 *x1, PRIVATE_AS u32 *y1, PRIVATE_AS const u32 *k, GLOBAL_AS const secp256k1_t *tmps) { u32 naf[SECP256K1_NAF_SIZE] = { 0 }; int loop_start = convert_to_window_naf(naf, k); @@ -1987,7 +1987,7 @@ DECLSPEC void point_mul_xy (u32 *x1, u32 *y1, const u32 *k, GLOBAL_AS const secp * @param tmps in: a basepoint for the multiplication. * @return Returns the x coordinate with a leading parity/sign (for odd/even y), it is named a compressed coordinate. */ -DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps) +DECLSPEC void point_mul (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *k, GLOBAL_AS const secp256k1_t *tmps) { u32 x[8]; u32 y[8]; @@ -2021,7 +2021,7 @@ DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps * @param first_byte in: The parity of the y coordinate, a u32. * @return Returns 0 if successfull, returns 1 if x is greater than the basepoint. */ -DECLSPEC u32 transform_public (secp256k1_t *r, const u32 *x, const u32 first_byte) +DECLSPEC u32 transform_public (PRIVATE_AS secp256k1_t *r, PRIVATE_AS const u32 *x, const u32 first_byte) { u32 p[8]; @@ -2081,7 +2081,7 @@ DECLSPEC u32 transform_public (secp256k1_t *r, const u32 *x, const u32 first_byt * @param k in: x coordinate which should be converted with leading parity, a pointer to an u32 array with a size of 9. * @return Returns 0 if successfull, returns 1 if x is greater than the basepoint or the parity has an unexpected value. */ -DECLSPEC u32 parse_public (secp256k1_t *r, const u32 *k) +DECLSPEC u32 parse_public (PRIVATE_AS secp256k1_t *r, PRIVATE_AS const u32 *k) { // verify: @@ -2113,7 +2113,7 @@ DECLSPEC u32 parse_public (secp256k1_t *r, const u32 *k) * Set precomputed values of the basepoint g to a secp256k1 structure. * @param r out: x and y coordinates. pre-computed points: (x1,y1,-y1),(x3,y3,-y3),(x5,y5,-y5),(x7,y7,-y7) */ -DECLSPEC void set_precomputed_basepoint_g (secp256k1_t *r) +DECLSPEC void set_precomputed_basepoint_g (PRIVATE_AS secp256k1_t *r) { // x1 r->xy[ 0] = SECP256K1_G_PRE_COMPUTED_00; diff --git a/OpenCL/inc_ecc_secp256k1.h b/OpenCL/inc_ecc_secp256k1.h index 4a45d8b8c..6e52a5d64 100644 --- a/OpenCL/inc_ecc_secp256k1.h +++ b/OpenCL/inc_ecc_secp256k1.h @@ -214,12 +214,12 @@ typedef struct secp256k1 } secp256k1_t; -DECLSPEC u32 transform_public (secp256k1_t *r, const u32 *x, const u32 first_byte); -DECLSPEC u32 parse_public (secp256k1_t *r, const u32 *k); +DECLSPEC u32 transform_public (PRIVATE_AS secp256k1_t *r, PRIVATE_AS const u32 *x, const u32 first_byte); +DECLSPEC u32 parse_public (PRIVATE_AS secp256k1_t *r, PRIVATE_AS const u32 *k); -DECLSPEC void point_mul_xy (u32 *x1, u32 *y1, const u32 *k, GLOBAL_AS const secp256k1_t *tmps); -DECLSPEC void point_mul (u32 *r, const u32 *k, GLOBAL_AS const secp256k1_t *tmps); +DECLSPEC void point_mul_xy (PRIVATE_AS u32 *x1, PRIVATE_AS u32 *y1, PRIVATE_AS const u32 *k, GLOBAL_AS const secp256k1_t *tmps); +DECLSPEC void point_mul (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *k, GLOBAL_AS const secp256k1_t *tmps); -DECLSPEC void set_precomputed_basepoint_g (secp256k1_t *r); +DECLSPEC void set_precomputed_basepoint_g (PRIVATE_AS secp256k1_t *r); #endif // _INC_ECC_SECP256K1_H diff --git a/OpenCL/inc_hash_blake2b.cl b/OpenCL/inc_hash_blake2b.cl index 8bbe0511f..6f6146e77 100644 --- a/OpenCL/inc_hash_blake2b.cl +++ b/OpenCL/inc_hash_blake2b.cl @@ -210,7 +210,7 @@ DECLSPEC u64x blake2b_rot32 (const u64x a) return r; } -DECLSPEC void blake2b_transform (u64 *h, const u64 *m, const int len, const u64 f0) +DECLSPEC void blake2b_transform (PRIVATE_AS u64 *h, PRIVATE_AS const u64 *m, const int len, const u64 f0) { const u64 t0 = hl32_to_64_S (0, len); @@ -256,7 +256,7 @@ DECLSPEC void blake2b_transform (u64 *h, const u64 *m, const int len, const u64 h[7] = h[7] ^ v[7] ^ v[15]; } -DECLSPEC void blake2b_init (blake2b_ctx_t *ctx) +DECLSPEC void blake2b_init (PRIVATE_AS blake2b_ctx_t *ctx) { ctx->h[0] = BLAKE2B_IV_00 ^ 0x01010040; // default output length: 0x40 = 64 bytes ctx->h[1] = BLAKE2B_IV_01; @@ -287,7 +287,7 @@ DECLSPEC void blake2b_init (blake2b_ctx_t *ctx) ctx->len = 0; } -DECLSPEC void blake2b_update_128 (blake2b_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len) +DECLSPEC void blake2b_update_128 (PRIVATE_AS blake2b_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len) { if (len == 0) return; @@ -398,7 +398,7 @@ DECLSPEC void blake2b_update_128 (blake2b_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, ctx->len += len; } -DECLSPEC void blake2b_update (blake2b_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void blake2b_update (PRIVATE_AS blake2b_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -488,7 +488,7 @@ DECLSPEC void blake2b_update (blake2b_ctx_t *ctx, const u32 *w, const int len) blake2b_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - (u32) pos1); } -DECLSPEC void blake2b_update_global (blake2b_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void blake2b_update_global (PRIVATE_AS blake2b_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -578,12 +578,12 @@ DECLSPEC void blake2b_update_global (blake2b_ctx_t *ctx, GLOBAL_AS const u32 *w, blake2b_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - (u32) pos1); } -DECLSPEC void blake2b_final (blake2b_ctx_t *ctx) +DECLSPEC void blake2b_final (PRIVATE_AS blake2b_ctx_t *ctx) { blake2b_transform (ctx->h, ctx->m, ctx->len, BLAKE2B_FINAL); } -DECLSPEC void blake2b_transform_vector (u64x *h, const u64x *m, const u32x len, const u64 f0) +DECLSPEC void blake2b_transform_vector (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *m, const u32x len, const u64 f0) { const u64x t0 = hl32_to_64 (0, len); @@ -629,7 +629,7 @@ DECLSPEC void blake2b_transform_vector (u64x *h, const u64x *m, const u32x len, h[7] = h[7] ^ v[7] ^ v[15]; } -DECLSPEC void blake2b_init_vector (blake2b_ctx_vector_t *ctx) +DECLSPEC void blake2b_init_vector (PRIVATE_AS blake2b_ctx_vector_t *ctx) { ctx->h[0] = BLAKE2B_IV_00 ^ 0x01010040; // default output length: 0x40 = 64 bytes ctx->h[1] = BLAKE2B_IV_01; @@ -660,7 +660,7 @@ DECLSPEC void blake2b_init_vector (blake2b_ctx_vector_t *ctx) ctx->len = 0; } -DECLSPEC void blake2b_update_vector_128 (blake2b_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const int len) +DECLSPEC void blake2b_update_vector_128 (PRIVATE_AS blake2b_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const int len) { if (len == 0) return; @@ -771,7 +771,7 @@ DECLSPEC void blake2b_update_vector_128 (blake2b_ctx_vector_t *ctx, u32x *w0, u3 ctx->len += len; } -DECLSPEC void blake2b_update_vector (blake2b_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void blake2b_update_vector (PRIVATE_AS blake2b_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -861,7 +861,7 @@ DECLSPEC void blake2b_update_vector (blake2b_ctx_vector_t *ctx, const u32x *w, c blake2b_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - (u32) pos1); } -DECLSPEC void blake2b_final_vector (blake2b_ctx_vector_t *ctx) +DECLSPEC void blake2b_final_vector (PRIVATE_AS blake2b_ctx_vector_t *ctx) { blake2b_transform_vector (ctx->h, ctx->m, (u32x) ctx->len, BLAKE2B_FINAL); } diff --git a/OpenCL/inc_hash_blake2b.h b/OpenCL/inc_hash_blake2b.h index 4195e28b4..b7d6e134c 100644 --- a/OpenCL/inc_hash_blake2b.h +++ b/OpenCL/inc_hash_blake2b.h @@ -84,15 +84,15 @@ typedef struct blake2b_ctx_vector } blake2b_ctx_vector_t; -DECLSPEC void blake2b_transform (u64 *h, const u64 *m, const int len, const u64 f0); -DECLSPEC void blake2b_init (blake2b_ctx_t *ctx); -DECLSPEC void blake2b_update (blake2b_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void blake2b_update_global (blake2b_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void blake2b_final (blake2b_ctx_t *ctx); +DECLSPEC void blake2b_transform (PRIVATE_AS u64 *h, PRIVATE_AS const u64 *m, const int len, const u64 f0); +DECLSPEC void blake2b_init (PRIVATE_AS blake2b_ctx_t *ctx); +DECLSPEC void blake2b_update (PRIVATE_AS blake2b_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void blake2b_update_global (PRIVATE_AS blake2b_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void blake2b_final (PRIVATE_AS blake2b_ctx_t *ctx); -DECLSPEC void blake2b_transform_vector (u64x *h, const u64x *m, const u32x len, const u64 f0); -DECLSPEC void blake2b_init_vector (blake2b_ctx_vector_t *ctx); -DECLSPEC void blake2b_update_vector (blake2b_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void blake2b_final_vector (blake2b_ctx_vector_t *ctx); +DECLSPEC void blake2b_transform_vector (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *m, const u32x len, const u64 f0); +DECLSPEC void blake2b_init_vector (PRIVATE_AS blake2b_ctx_vector_t *ctx); +DECLSPEC void blake2b_update_vector (PRIVATE_AS blake2b_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void blake2b_final_vector (PRIVATE_AS blake2b_ctx_vector_t *ctx); #endif // _INC_HASH_BLAKE2B_H diff --git a/OpenCL/inc_hash_md4.cl b/OpenCL/inc_hash_md4.cl index 309bf5994..6411218fe 100644 --- a/OpenCL/inc_hash_md4.cl +++ b/OpenCL/inc_hash_md4.cl @@ -14,7 +14,7 @@ // input buf needs to be in algorithm native byte order (md4 = LE, sha1 = BE, etc) // input buf needs to be 64 byte aligned when using md4_update() -DECLSPEC void md4_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void md4_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest) { u32 a = digest[0]; u32 b = digest[1]; @@ -78,7 +78,7 @@ DECLSPEC void md4_transform (const u32 *w0, const u32 *w1, const u32 *w2, const digest[3] += d; } -DECLSPEC void md4_init (md4_ctx_t *ctx) +DECLSPEC void md4_init (PRIVATE_AS md4_ctx_t *ctx) { ctx->h[0] = MD4M_A; ctx->h[1] = MD4M_B; @@ -105,7 +105,7 @@ DECLSPEC void md4_init (md4_ctx_t *ctx) ctx->len = 0; } -DECLSPEC void md4_update_64 (md4_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void md4_update_64 (PRIVATE_AS md4_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { if (len == 0) return; @@ -225,7 +225,7 @@ DECLSPEC void md4_update_64 (md4_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, } } -DECLSPEC void md4_update (md4_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md4_update (PRIVATE_AS md4_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -277,7 +277,7 @@ DECLSPEC void md4_update (md4_ctx_t *ctx, const u32 *w, const int len) md4_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md4_update_swap (md4_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md4_update_swap (PRIVATE_AS md4_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -363,7 +363,7 @@ DECLSPEC void md4_update_swap (md4_ctx_t *ctx, const u32 *w, const int len) md4_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md4_update_utf16le (md4_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md4_update_utf16le (PRIVATE_AS md4_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -423,7 +423,7 @@ DECLSPEC void md4_update_utf16le (md4_ctx_t *ctx, const u32 *w, const int len) md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md4_update_utf16le_swap (md4_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md4_update_utf16le_swap (PRIVATE_AS md4_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -534,7 +534,7 @@ DECLSPEC void md4_update_utf16le_swap (md4_ctx_t *ctx, const u32 *w, const int l md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md4_update_global (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md4_update_global (PRIVATE_AS md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -586,7 +586,7 @@ DECLSPEC void md4_update_global (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const i md4_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md4_update_global_swap (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md4_update_global_swap (PRIVATE_AS md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -672,7 +672,7 @@ DECLSPEC void md4_update_global_swap (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, co md4_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md4_update_global_utf16le (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md4_update_global_utf16le (PRIVATE_AS md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -732,7 +732,7 @@ DECLSPEC void md4_update_global_utf16le (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md4_update_global_utf16le_swap (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md4_update_global_utf16le_swap (PRIVATE_AS md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -843,7 +843,7 @@ DECLSPEC void md4_update_global_utf16le_swap (md4_ctx_t *ctx, GLOBAL_AS const u3 md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md4_final (md4_ctx_t *ctx) +DECLSPEC void md4_final (PRIVATE_AS md4_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -879,7 +879,7 @@ DECLSPEC void md4_final (md4_ctx_t *ctx) // md4_hmac -DECLSPEC void md4_hmac_init_64 (md4_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3) +DECLSPEC void md4_hmac_init_64 (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3) { u32 a0[4]; u32 a1[4]; @@ -938,7 +938,7 @@ DECLSPEC void md4_hmac_init_64 (md4_hmac_ctx_t *ctx, const u32 *w0, const u32 *w md4_update_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void md4_hmac_init (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md4_hmac_init (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -995,7 +995,7 @@ DECLSPEC void md4_hmac_init (md4_hmac_ctx_t *ctx, const u32 *w, const int len) md4_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void md4_hmac_init_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md4_hmac_init_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1052,7 +1052,7 @@ DECLSPEC void md4_hmac_init_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int l md4_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void md4_hmac_init_global (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md4_hmac_init_global (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1109,7 +1109,7 @@ DECLSPEC void md4_hmac_init_global (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, md4_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void md4_hmac_init_global_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md4_hmac_init_global_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1166,52 +1166,52 @@ DECLSPEC void md4_hmac_init_global_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const u3 md4_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void md4_hmac_update_64 (md4_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void md4_hmac_update_64 (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { md4_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void md4_hmac_update (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md4_hmac_update (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { md4_update (&ctx->ipad, w, len); } -DECLSPEC void md4_hmac_update_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md4_hmac_update_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { md4_update_swap (&ctx->ipad, w, len); } -DECLSPEC void md4_hmac_update_utf16le (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md4_hmac_update_utf16le (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { md4_update_utf16le (&ctx->ipad, w, len); } -DECLSPEC void md4_hmac_update_utf16le_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md4_hmac_update_utf16le_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { md4_update_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void md4_hmac_update_global (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md4_hmac_update_global (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { md4_update_global (&ctx->ipad, w, len); } -DECLSPEC void md4_hmac_update_global_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md4_hmac_update_global_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { md4_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void md4_hmac_update_global_utf16le (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md4_hmac_update_global_utf16le (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { md4_update_global_utf16le (&ctx->ipad, w, len); } -DECLSPEC void md4_hmac_update_global_utf16le_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md4_hmac_update_global_utf16le_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { md4_update_global_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void md4_hmac_final (md4_hmac_ctx_t *ctx) +DECLSPEC void md4_hmac_final (PRIVATE_AS md4_hmac_ctx_t *ctx) { md4_final (&ctx->ipad); @@ -1239,7 +1239,7 @@ DECLSPEC void md4_hmac_final (md4_hmac_ctx_t *ctx) // while input buf can be a vector datatype, the length of the different elements can not -DECLSPEC void md4_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest) +DECLSPEC void md4_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -1303,7 +1303,7 @@ DECLSPEC void md4_transform_vector (const u32x *w0, const u32x *w1, const u32x * digest[3] += d; } -DECLSPEC void md4_init_vector (md4_ctx_vector_t *ctx) +DECLSPEC void md4_init_vector (PRIVATE_AS md4_ctx_vector_t *ctx) { ctx->h[0] = MD4M_A; ctx->h[1] = MD4M_B; @@ -1330,7 +1330,7 @@ DECLSPEC void md4_init_vector (md4_ctx_vector_t *ctx) ctx->len = 0; } -DECLSPEC void md4_init_vector_from_scalar (md4_ctx_vector_t *ctx, md4_ctx_t *ctx0) +DECLSPEC void md4_init_vector_from_scalar (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS md4_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -1357,7 +1357,7 @@ DECLSPEC void md4_init_vector_from_scalar (md4_ctx_vector_t *ctx, md4_ctx_t *ctx ctx->len = ctx0->len; } -DECLSPEC void md4_update_vector_64 (md4_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void md4_update_vector_64 (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { if (len == 0) return; @@ -1477,7 +1477,7 @@ DECLSPEC void md4_update_vector_64 (md4_ctx_vector_t *ctx, u32x *w0, u32x *w1, u } } -DECLSPEC void md4_update_vector (md4_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md4_update_vector (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1529,7 +1529,7 @@ DECLSPEC void md4_update_vector (md4_ctx_vector_t *ctx, const u32x *w, const int md4_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md4_update_vector_swap (md4_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md4_update_vector_swap (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1615,7 +1615,7 @@ DECLSPEC void md4_update_vector_swap (md4_ctx_vector_t *ctx, const u32x *w, cons md4_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md4_update_vector_utf16le (md4_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md4_update_vector_utf16le (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1657,7 +1657,7 @@ DECLSPEC void md4_update_vector_utf16le (md4_ctx_vector_t *ctx, const u32x *w, c md4_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md4_update_vector_utf16le_swap (md4_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md4_update_vector_utf16le_swap (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1733,7 +1733,7 @@ DECLSPEC void md4_update_vector_utf16le_swap (md4_ctx_vector_t *ctx, const u32x md4_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md4_final_vector (md4_ctx_vector_t *ctx) +DECLSPEC void md4_final_vector (PRIVATE_AS md4_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -1769,7 +1769,7 @@ DECLSPEC void md4_final_vector (md4_ctx_vector_t *ctx) // HMAC + Vector -DECLSPEC void md4_hmac_init_vector_64 (md4_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3) +DECLSPEC void md4_hmac_init_vector_64 (PRIVATE_AS md4_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3) { u32x a0[4]; u32x a1[4]; @@ -1828,7 +1828,7 @@ DECLSPEC void md4_hmac_init_vector_64 (md4_hmac_ctx_vector_t *ctx, const u32x *w md4_update_vector_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void md4_hmac_init_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md4_hmac_init_vector (PRIVATE_AS md4_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1885,17 +1885,17 @@ DECLSPEC void md4_hmac_init_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, c md4_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void md4_hmac_update_vector_64 (md4_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void md4_hmac_update_vector_64 (PRIVATE_AS md4_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { md4_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void md4_hmac_update_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md4_hmac_update_vector (PRIVATE_AS md4_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { md4_update_vector (&ctx->ipad, w, len); } -DECLSPEC void md4_hmac_final_vector (md4_hmac_ctx_vector_t *ctx) +DECLSPEC void md4_hmac_final_vector (PRIVATE_AS md4_hmac_ctx_vector_t *ctx) { md4_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_md4.h b/OpenCL/inc_hash_md4.h index 7c3b31894..a4fa88eb9 100644 --- a/OpenCL/inc_hash_md4.h +++ b/OpenCL/inc_hash_md4.h @@ -82,46 +82,46 @@ typedef struct md4_hmac_ctx_vector } md4_hmac_ctx_vector_t; -DECLSPEC void md4_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest); -DECLSPEC void md4_init (md4_ctx_t *ctx); -DECLSPEC void md4_update_64 (md4_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void md4_update (md4_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_update_swap (md4_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_update_utf16le (md4_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_update_utf16le_swap (md4_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_update_global (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_update_global_swap (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_update_global_utf16le (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_update_global_utf16le_swap (md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_final (md4_ctx_t *ctx); -DECLSPEC void md4_hmac_init_64 (md4_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3); -DECLSPEC void md4_hmac_init (md4_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_hmac_init_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_hmac_init_global (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_hmac_init_global_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_hmac_update_64 (md4_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void md4_hmac_update (md4_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_hmac_update_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_hmac_update_utf16le (md4_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_hmac_update_utf16le_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md4_hmac_update_global (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_hmac_update_global_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_hmac_update_global_utf16le (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_hmac_update_global_utf16le_swap (md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md4_hmac_final (md4_hmac_ctx_t *ctx); -DECLSPEC void md4_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); -DECLSPEC void md4_init_vector (md4_ctx_vector_t *ctx); -DECLSPEC void md4_init_vector_from_scalar (md4_ctx_vector_t *ctx, md4_ctx_t *ctx0); -DECLSPEC void md4_update_vector_64 (md4_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void md4_update_vector (md4_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md4_update_vector_swap (md4_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md4_update_vector_utf16le (md4_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md4_update_vector_utf16le_swap (md4_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md4_final_vector (md4_ctx_vector_t *ctx); -DECLSPEC void md4_hmac_init_vector_64 (md4_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3); -DECLSPEC void md4_hmac_init_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md4_hmac_update_vector_64 (md4_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void md4_hmac_update_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md4_hmac_final_vector (md4_hmac_ctx_vector_t *ctx); +DECLSPEC void md4_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest); +DECLSPEC void md4_init (PRIVATE_AS md4_ctx_t *ctx); +DECLSPEC void md4_update_64 (PRIVATE_AS md4_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void md4_update (PRIVATE_AS md4_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md4_update_swap (PRIVATE_AS md4_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md4_update_utf16le (PRIVATE_AS md4_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md4_update_utf16le_swap (PRIVATE_AS md4_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md4_update_global (PRIVATE_AS md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md4_update_global_swap (PRIVATE_AS md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md4_update_global_utf16le (PRIVATE_AS md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md4_update_global_utf16le_swap (PRIVATE_AS md4_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md4_final (PRIVATE_AS md4_ctx_t *ctx); +DECLSPEC void md4_hmac_init_64 (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3); +DECLSPEC void md4_hmac_init (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_init_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_init_global (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_init_global_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_update_64 (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void md4_hmac_update (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_update_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_update_utf16le (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_update_utf16le_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_update_global (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_update_global_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_update_global_utf16le (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_update_global_utf16le_swap (PRIVATE_AS md4_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md4_hmac_final (PRIVATE_AS md4_hmac_ctx_t *ctx); +DECLSPEC void md4_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest); +DECLSPEC void md4_init_vector (PRIVATE_AS md4_ctx_vector_t *ctx); +DECLSPEC void md4_init_vector_from_scalar (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS md4_ctx_t *ctx0); +DECLSPEC void md4_update_vector_64 (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void md4_update_vector (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md4_update_vector_swap (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md4_update_vector_utf16le (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md4_update_vector_utf16le_swap (PRIVATE_AS md4_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md4_final_vector (PRIVATE_AS md4_ctx_vector_t *ctx); +DECLSPEC void md4_hmac_init_vector_64 (PRIVATE_AS md4_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3); +DECLSPEC void md4_hmac_init_vector (PRIVATE_AS md4_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md4_hmac_update_vector_64 (PRIVATE_AS md4_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void md4_hmac_update_vector (PRIVATE_AS md4_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md4_hmac_final_vector (PRIVATE_AS md4_hmac_ctx_vector_t *ctx); #endif diff --git a/OpenCL/inc_hash_md5.cl b/OpenCL/inc_hash_md5.cl index c51752fb3..da496cef6 100644 --- a/OpenCL/inc_hash_md5.cl +++ b/OpenCL/inc_hash_md5.cl @@ -14,7 +14,7 @@ // input buf needs to be in algorithm native byte order (md5 = LE, sha1 = BE, etc) // input buf needs to be 64 byte aligned when using md5_update() -DECLSPEC void md5_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void md5_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest) { u32 a = digest[0]; u32 b = digest[1]; @@ -114,7 +114,7 @@ DECLSPEC void md5_transform (const u32 *w0, const u32 *w1, const u32 *w2, const digest[3] += d; } -DECLSPEC void md5_init (md5_ctx_t *ctx) +DECLSPEC void md5_init (PRIVATE_AS md5_ctx_t *ctx) { ctx->h[0] = MD5M_A; ctx->h[1] = MD5M_B; @@ -141,7 +141,7 @@ DECLSPEC void md5_init (md5_ctx_t *ctx) ctx->len = 0; } -DECLSPEC void md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void md5_update_64 (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { if (len == 0) return; @@ -261,7 +261,7 @@ DECLSPEC void md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, } } -DECLSPEC void md5_update (md5_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md5_update (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -313,7 +313,7 @@ DECLSPEC void md5_update (md5_ctx_t *ctx, const u32 *w, const int len) md5_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md5_update_swap (md5_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md5_update_swap (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -399,7 +399,7 @@ DECLSPEC void md5_update_swap (md5_ctx_t *ctx, const u32 *w, const int len) md5_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md5_update_utf16le (md5_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md5_update_utf16le (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -459,7 +459,7 @@ DECLSPEC void md5_update_utf16le (md5_ctx_t *ctx, const u32 *w, const int len) md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md5_update_utf16le_swap (md5_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md5_update_utf16le_swap (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -570,7 +570,7 @@ DECLSPEC void md5_update_utf16le_swap (md5_ctx_t *ctx, const u32 *w, const int l md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md5_update_global (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md5_update_global (PRIVATE_AS md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -622,7 +622,7 @@ DECLSPEC void md5_update_global (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const i md5_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md5_update_global_swap (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md5_update_global_swap (PRIVATE_AS md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -708,7 +708,7 @@ DECLSPEC void md5_update_global_swap (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, co md5_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md5_update_global_utf16le (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md5_update_global_utf16le (PRIVATE_AS md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -768,7 +768,7 @@ DECLSPEC void md5_update_global_utf16le (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md5_update_global_utf16le_swap (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md5_update_global_utf16le_swap (PRIVATE_AS md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -879,7 +879,7 @@ DECLSPEC void md5_update_global_utf16le_swap (md5_ctx_t *ctx, GLOBAL_AS const u3 md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md5_final (md5_ctx_t *ctx) +DECLSPEC void md5_final (PRIVATE_AS md5_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -915,7 +915,7 @@ DECLSPEC void md5_final (md5_ctx_t *ctx) // md5_hmac -DECLSPEC void md5_hmac_init_64 (md5_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3) +DECLSPEC void md5_hmac_init_64 (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3) { u32 a0[4]; u32 a1[4]; @@ -974,7 +974,7 @@ DECLSPEC void md5_hmac_init_64 (md5_hmac_ctx_t *ctx, const u32 *w0, const u32 *w md5_update_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void md5_hmac_init (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md5_hmac_init (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1031,7 +1031,7 @@ DECLSPEC void md5_hmac_init (md5_hmac_ctx_t *ctx, const u32 *w, const int len) md5_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void md5_hmac_init_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md5_hmac_init_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1088,7 +1088,7 @@ DECLSPEC void md5_hmac_init_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int l md5_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void md5_hmac_init_global (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md5_hmac_init_global (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1145,7 +1145,7 @@ DECLSPEC void md5_hmac_init_global (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, md5_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void md5_hmac_init_global_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md5_hmac_init_global_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1202,52 +1202,52 @@ DECLSPEC void md5_hmac_init_global_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const u3 md5_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void md5_hmac_update_64 (md5_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void md5_hmac_update_64 (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { md5_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void md5_hmac_update (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md5_hmac_update (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { md5_update (&ctx->ipad, w, len); } -DECLSPEC void md5_hmac_update_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md5_hmac_update_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { md5_update_swap (&ctx->ipad, w, len); } -DECLSPEC void md5_hmac_update_utf16le (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md5_hmac_update_utf16le (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { md5_update_utf16le (&ctx->ipad, w, len); } -DECLSPEC void md5_hmac_update_utf16le_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void md5_hmac_update_utf16le_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { md5_update_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void md5_hmac_update_global (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md5_hmac_update_global (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { md5_update_global (&ctx->ipad, w, len); } -DECLSPEC void md5_hmac_update_global_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md5_hmac_update_global_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { md5_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void md5_hmac_update_global_utf16le (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md5_hmac_update_global_utf16le (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { md5_update_global_utf16le (&ctx->ipad, w, len); } -DECLSPEC void md5_hmac_update_global_utf16le_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void md5_hmac_update_global_utf16le_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { md5_update_global_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void md5_hmac_final (md5_hmac_ctx_t *ctx) +DECLSPEC void md5_hmac_final (PRIVATE_AS md5_hmac_ctx_t *ctx) { md5_final (&ctx->ipad); @@ -1275,7 +1275,7 @@ DECLSPEC void md5_hmac_final (md5_hmac_ctx_t *ctx) // while input buf can be a vector datatype, the length of the different elements can not -DECLSPEC void md5_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest) +DECLSPEC void md5_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -1375,7 +1375,7 @@ DECLSPEC void md5_transform_vector (const u32x *w0, const u32x *w1, const u32x * digest[3] += d; } -DECLSPEC void md5_init_vector (md5_ctx_vector_t *ctx) +DECLSPEC void md5_init_vector (PRIVATE_AS md5_ctx_vector_t *ctx) { ctx->h[0] = MD5M_A; ctx->h[1] = MD5M_B; @@ -1402,7 +1402,7 @@ DECLSPEC void md5_init_vector (md5_ctx_vector_t *ctx) ctx->len = 0; } -DECLSPEC void md5_init_vector_from_scalar (md5_ctx_vector_t *ctx, md5_ctx_t *ctx0) +DECLSPEC void md5_init_vector_from_scalar (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS md5_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -1429,7 +1429,7 @@ DECLSPEC void md5_init_vector_from_scalar (md5_ctx_vector_t *ctx, md5_ctx_t *ctx ctx->len = ctx0->len; } -DECLSPEC void md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void md5_update_vector_64 (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { if (len == 0) return; @@ -1549,7 +1549,7 @@ DECLSPEC void md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x *w0, u32x *w1, u } } -DECLSPEC void md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md5_update_vector (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1601,7 +1601,7 @@ DECLSPEC void md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int md5_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md5_update_vector_swap (md5_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md5_update_vector_swap (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1687,7 +1687,7 @@ DECLSPEC void md5_update_vector_swap (md5_ctx_vector_t *ctx, const u32x *w, cons md5_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void md5_update_vector_utf16le (md5_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md5_update_vector_utf16le (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1729,7 +1729,7 @@ DECLSPEC void md5_update_vector_utf16le (md5_ctx_vector_t *ctx, const u32x *w, c md5_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md5_update_vector_utf16le_swap (md5_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md5_update_vector_utf16le_swap (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1805,7 +1805,7 @@ DECLSPEC void md5_update_vector_utf16le_swap (md5_ctx_vector_t *ctx, const u32x md5_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void md5_final_vector (md5_ctx_vector_t *ctx) +DECLSPEC void md5_final_vector (PRIVATE_AS md5_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -1841,7 +1841,7 @@ DECLSPEC void md5_final_vector (md5_ctx_vector_t *ctx) // HMAC + Vector -DECLSPEC void md5_hmac_init_vector_64 (md5_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3) +DECLSPEC void md5_hmac_init_vector_64 (PRIVATE_AS md5_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3) { u32x a0[4]; u32x a1[4]; @@ -1900,7 +1900,7 @@ DECLSPEC void md5_hmac_init_vector_64 (md5_hmac_ctx_vector_t *ctx, const u32x *w md5_update_vector_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void md5_hmac_init_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md5_hmac_init_vector (PRIVATE_AS md5_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1957,17 +1957,17 @@ DECLSPEC void md5_hmac_init_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, c md5_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void md5_hmac_update_vector_64 (md5_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void md5_hmac_update_vector_64 (PRIVATE_AS md5_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { md5_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void md5_hmac_update_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void md5_hmac_update_vector (PRIVATE_AS md5_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { md5_update_vector (&ctx->ipad, w, len); } -DECLSPEC void md5_hmac_final_vector (md5_hmac_ctx_vector_t *ctx) +DECLSPEC void md5_hmac_final_vector (PRIVATE_AS md5_hmac_ctx_vector_t *ctx) { md5_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_md5.h b/OpenCL/inc_hash_md5.h index 1e6eaaf93..ae2e40793 100644 --- a/OpenCL/inc_hash_md5.h +++ b/OpenCL/inc_hash_md5.h @@ -89,46 +89,46 @@ typedef struct md5_hmac_ctx_vector } md5_hmac_ctx_vector_t; -DECLSPEC void md5_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest); -DECLSPEC void md5_init (md5_ctx_t *ctx); -DECLSPEC void md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void md5_update (md5_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_update_swap (md5_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_update_utf16le (md5_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_update_utf16le_swap (md5_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_update_global (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_update_global_swap (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_update_global_utf16le (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_update_global_utf16le_swap (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_final (md5_ctx_t *ctx); -DECLSPEC void md5_hmac_init_64 (md5_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3); -DECLSPEC void md5_hmac_init (md5_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_hmac_init_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_hmac_init_global (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_hmac_init_global_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_hmac_update_64 (md5_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void md5_hmac_update (md5_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_hmac_update_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_hmac_update_utf16le (md5_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_hmac_update_utf16le_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void md5_hmac_update_global (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_hmac_update_global_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_hmac_update_global_utf16le (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_hmac_update_global_utf16le_swap (md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void md5_hmac_final (md5_hmac_ctx_t *ctx); -DECLSPEC void md5_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); -DECLSPEC void md5_init_vector (md5_ctx_vector_t *ctx); -DECLSPEC void md5_init_vector_from_scalar (md5_ctx_vector_t *ctx, md5_ctx_t *ctx0); -DECLSPEC void md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md5_update_vector_swap (md5_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md5_update_vector_utf16le (md5_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md5_update_vector_utf16le_swap (md5_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md5_final_vector (md5_ctx_vector_t *ctx); -DECLSPEC void md5_hmac_init_vector_64 (md5_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3); -DECLSPEC void md5_hmac_init_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md5_hmac_update_vector_64 (md5_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void md5_hmac_update_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void md5_hmac_final_vector (md5_hmac_ctx_vector_t *ctx); +DECLSPEC void md5_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest); +DECLSPEC void md5_init (PRIVATE_AS md5_ctx_t *ctx); +DECLSPEC void md5_update_64 (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void md5_update (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md5_update_swap (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md5_update_utf16le (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md5_update_utf16le_swap (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md5_update_global (PRIVATE_AS md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md5_update_global_swap (PRIVATE_AS md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md5_update_global_utf16le (PRIVATE_AS md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md5_update_global_utf16le_swap (PRIVATE_AS md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md5_final (PRIVATE_AS md5_ctx_t *ctx); +DECLSPEC void md5_hmac_init_64 (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3); +DECLSPEC void md5_hmac_init (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_init_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_init_global (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_init_global_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_update_64 (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void md5_hmac_update (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_update_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_update_utf16le (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_update_utf16le_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_update_global (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_update_global_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_update_global_utf16le (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_update_global_utf16le_swap (PRIVATE_AS md5_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void md5_hmac_final (PRIVATE_AS md5_hmac_ctx_t *ctx); +DECLSPEC void md5_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest); +DECLSPEC void md5_init_vector (PRIVATE_AS md5_ctx_vector_t *ctx); +DECLSPEC void md5_init_vector_from_scalar (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS md5_ctx_t *ctx0); +DECLSPEC void md5_update_vector_64 (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void md5_update_vector (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md5_update_vector_swap (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md5_update_vector_utf16le (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md5_update_vector_utf16le_swap (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md5_final_vector (PRIVATE_AS md5_ctx_vector_t *ctx); +DECLSPEC void md5_hmac_init_vector_64 (PRIVATE_AS md5_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3); +DECLSPEC void md5_hmac_init_vector (PRIVATE_AS md5_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md5_hmac_update_vector_64 (PRIVATE_AS md5_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void md5_hmac_update_vector (PRIVATE_AS md5_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void md5_hmac_final_vector (PRIVATE_AS md5_hmac_ctx_vector_t *ctx); #endif diff --git a/OpenCL/inc_hash_ripemd160.cl b/OpenCL/inc_hash_ripemd160.cl index 0a4aa22e6..8a5554413 100644 --- a/OpenCL/inc_hash_ripemd160.cl +++ b/OpenCL/inc_hash_ripemd160.cl @@ -14,7 +14,7 @@ // input buf needs to be in algorithm native byte order (ripemd160 = LE, sha1 = BE, etc) // input buf needs to be 64 byte aligned when using ripemd160_update() -DECLSPEC void ripemd160_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void ripemd160_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest) { u32 a1 = digest[0]; u32 b1 = digest[1]; @@ -211,7 +211,7 @@ DECLSPEC void ripemd160_transform (const u32 *w0, const u32 *w1, const u32 *w2, digest[4] = e; } -DECLSPEC void ripemd160_init (ripemd160_ctx_t *ctx) +DECLSPEC void ripemd160_init (PRIVATE_AS ripemd160_ctx_t *ctx) { ctx->h[0] = RIPEMD160M_A; ctx->h[1] = RIPEMD160M_B; @@ -239,7 +239,7 @@ DECLSPEC void ripemd160_init (ripemd160_ctx_t *ctx) ctx->len = 0; } -DECLSPEC void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void ripemd160_update_64 (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { if (len == 0) return; @@ -359,7 +359,7 @@ DECLSPEC void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 *w0, u32 *w1, u32 * } } -DECLSPEC void ripemd160_update (ripemd160_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void ripemd160_update (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -411,7 +411,7 @@ DECLSPEC void ripemd160_update (ripemd160_ctx_t *ctx, const u32 *w, const int le ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void ripemd160_update_swap (ripemd160_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void ripemd160_update_swap (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -497,7 +497,7 @@ DECLSPEC void ripemd160_update_swap (ripemd160_ctx_t *ctx, const u32 *w, const i ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void ripemd160_update_utf16le (ripemd160_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void ripemd160_update_utf16le (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -557,7 +557,7 @@ DECLSPEC void ripemd160_update_utf16le (ripemd160_ctx_t *ctx, const u32 *w, cons ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void ripemd160_update_utf16le_swap (ripemd160_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void ripemd160_update_utf16le_swap (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -668,7 +668,7 @@ DECLSPEC void ripemd160_update_utf16le_swap (ripemd160_ctx_t *ctx, const u32 *w, ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void ripemd160_update_global (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void ripemd160_update_global (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -720,7 +720,7 @@ DECLSPEC void ripemd160_update_global (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void ripemd160_update_global_swap (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void ripemd160_update_global_swap (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -806,7 +806,7 @@ DECLSPEC void ripemd160_update_global_swap (ripemd160_ctx_t *ctx, GLOBAL_AS cons ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void ripemd160_update_global_utf16le (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void ripemd160_update_global_utf16le (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -866,7 +866,7 @@ DECLSPEC void ripemd160_update_global_utf16le (ripemd160_ctx_t *ctx, GLOBAL_AS c ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void ripemd160_update_global_utf16le_swap (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void ripemd160_update_global_utf16le_swap (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -977,7 +977,7 @@ DECLSPEC void ripemd160_update_global_utf16le_swap (ripemd160_ctx_t *ctx, GLOBAL ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void ripemd160_final (ripemd160_ctx_t *ctx) +DECLSPEC void ripemd160_final (PRIVATE_AS ripemd160_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -1013,7 +1013,7 @@ DECLSPEC void ripemd160_final (ripemd160_ctx_t *ctx) // ripemd160_hmac -DECLSPEC void ripemd160_hmac_init_64 (ripemd160_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3) +DECLSPEC void ripemd160_hmac_init_64 (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3) { u32 a0[4]; u32 a1[4]; @@ -1072,7 +1072,7 @@ DECLSPEC void ripemd160_hmac_init_64 (ripemd160_hmac_ctx_t *ctx, const u32 *w0, ripemd160_update_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void ripemd160_hmac_init (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_init (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1129,7 +1129,7 @@ DECLSPEC void ripemd160_hmac_init (ripemd160_hmac_ctx_t *ctx, const u32 *w, cons ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void ripemd160_hmac_init_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_init_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1186,7 +1186,7 @@ DECLSPEC void ripemd160_hmac_init_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void ripemd160_hmac_init_global (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_init_global (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1243,7 +1243,7 @@ DECLSPEC void ripemd160_hmac_init_global (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS c ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void ripemd160_hmac_init_global_swap (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_init_global_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1300,52 +1300,52 @@ DECLSPEC void ripemd160_hmac_init_global_swap (ripemd160_hmac_ctx_t *ctx, GLOBAL ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void ripemd160_hmac_update_64 (ripemd160_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void ripemd160_hmac_update_64 (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { ripemd160_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void ripemd160_hmac_update (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_update (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { ripemd160_update (&ctx->ipad, w, len); } -DECLSPEC void ripemd160_hmac_update_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_update_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { ripemd160_update_swap (&ctx->ipad, w, len); } -DECLSPEC void ripemd160_hmac_update_utf16le (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_update_utf16le (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { ripemd160_update_utf16le (&ctx->ipad, w, len); } -DECLSPEC void ripemd160_hmac_update_utf16le_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_update_utf16le_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { ripemd160_update_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void ripemd160_hmac_update_global (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_update_global (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { ripemd160_update_global (&ctx->ipad, w, len); } -DECLSPEC void ripemd160_hmac_update_global_swap (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_update_global_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { ripemd160_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void ripemd160_hmac_update_global_utf16le (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_update_global_utf16le (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { ripemd160_update_global_utf16le (&ctx->ipad, w, len); } -DECLSPEC void ripemd160_hmac_update_global_utf16le_swap (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void ripemd160_hmac_update_global_utf16le_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { ripemd160_update_global_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void ripemd160_hmac_final (ripemd160_hmac_ctx_t *ctx) +DECLSPEC void ripemd160_hmac_final (PRIVATE_AS ripemd160_hmac_ctx_t *ctx) { ripemd160_final (&ctx->ipad); @@ -1373,7 +1373,7 @@ DECLSPEC void ripemd160_hmac_final (ripemd160_hmac_ctx_t *ctx) // while input buf can be a vector datatype, the length of the different elements can not -DECLSPEC void ripemd160_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest) +DECLSPEC void ripemd160_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest) { u32x a1 = digest[0]; u32x b1 = digest[1]; @@ -1570,7 +1570,7 @@ DECLSPEC void ripemd160_transform_vector (const u32x *w0, const u32x *w1, const digest[4] = e; } -DECLSPEC void ripemd160_init_vector (ripemd160_ctx_vector_t *ctx) +DECLSPEC void ripemd160_init_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx) { ctx->h[0] = RIPEMD160M_A; ctx->h[1] = RIPEMD160M_B; @@ -1598,7 +1598,7 @@ DECLSPEC void ripemd160_init_vector (ripemd160_ctx_vector_t *ctx) ctx->len = 0; } -DECLSPEC void ripemd160_init_vector_from_scalar (ripemd160_ctx_vector_t *ctx, ripemd160_ctx_t *ctx0) +DECLSPEC void ripemd160_init_vector_from_scalar (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS ripemd160_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -1626,7 +1626,7 @@ DECLSPEC void ripemd160_init_vector_from_scalar (ripemd160_ctx_vector_t *ctx, ri ctx->len = ctx0->len; } -DECLSPEC void ripemd160_update_vector_64 (ripemd160_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void ripemd160_update_vector_64 (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { if (len == 0) return; @@ -1746,7 +1746,7 @@ DECLSPEC void ripemd160_update_vector_64 (ripemd160_ctx_vector_t *ctx, u32x *w0, } } -DECLSPEC void ripemd160_update_vector (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void ripemd160_update_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1798,7 +1798,7 @@ DECLSPEC void ripemd160_update_vector (ripemd160_ctx_vector_t *ctx, const u32x * ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void ripemd160_update_vector_swap (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void ripemd160_update_vector_swap (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1884,7 +1884,7 @@ DECLSPEC void ripemd160_update_vector_swap (ripemd160_ctx_vector_t *ctx, const u ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void ripemd160_update_vector_utf16le (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void ripemd160_update_vector_utf16le (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1926,7 +1926,7 @@ DECLSPEC void ripemd160_update_vector_utf16le (ripemd160_ctx_vector_t *ctx, cons ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void ripemd160_update_vector_utf16le_swap (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void ripemd160_update_vector_utf16le_swap (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2002,7 +2002,7 @@ DECLSPEC void ripemd160_update_vector_utf16le_swap (ripemd160_ctx_vector_t *ctx, ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void ripemd160_final_vector (ripemd160_ctx_vector_t *ctx) +DECLSPEC void ripemd160_final_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -2038,7 +2038,7 @@ DECLSPEC void ripemd160_final_vector (ripemd160_ctx_vector_t *ctx) // HMAC + Vector -DECLSPEC void ripemd160_hmac_init_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3) +DECLSPEC void ripemd160_hmac_init_vector_64 (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3) { u32x a0[4]; u32x a1[4]; @@ -2097,7 +2097,7 @@ DECLSPEC void ripemd160_hmac_init_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, c ripemd160_update_vector_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void ripemd160_hmac_init_vector (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void ripemd160_hmac_init_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2154,17 +2154,17 @@ DECLSPEC void ripemd160_hmac_init_vector (ripemd160_hmac_ctx_vector_t *ctx, cons ripemd160_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void ripemd160_hmac_update_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void ripemd160_hmac_update_vector_64 (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { ripemd160_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void ripemd160_hmac_update_vector (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void ripemd160_hmac_update_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { ripemd160_update_vector (&ctx->ipad, w, len); } -DECLSPEC void ripemd160_hmac_final_vector (ripemd160_hmac_ctx_vector_t *ctx) +DECLSPEC void ripemd160_hmac_final_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx) { ripemd160_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_ripemd160.h b/OpenCL/inc_hash_ripemd160.h index 25a69ed56..15e8d1cb7 100644 --- a/OpenCL/inc_hash_ripemd160.h +++ b/OpenCL/inc_hash_ripemd160.h @@ -102,46 +102,46 @@ typedef struct ripemd160_hmac_ctx_vector } ripemd160_hmac_ctx_vector_t; -DECLSPEC void ripemd160_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest); -DECLSPEC void ripemd160_init (ripemd160_ctx_t *ctx); -DECLSPEC void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void ripemd160_update (ripemd160_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_update_swap (ripemd160_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_update_utf16le (ripemd160_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_update_utf16le_swap (ripemd160_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_update_global (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_update_global_swap (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_update_global_utf16le (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_update_global_utf16le_swap (ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_final (ripemd160_ctx_t *ctx); -DECLSPEC void ripemd160_hmac_init_64 (ripemd160_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3); -DECLSPEC void ripemd160_hmac_init (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_init_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_init_global (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_init_global_swap (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_64 (ripemd160_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void ripemd160_hmac_update (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_utf16le (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_utf16le_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_global (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_global_swap (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_global_utf16le (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_update_global_utf16le_swap (ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void ripemd160_hmac_final (ripemd160_hmac_ctx_t *ctx); -DECLSPEC void ripemd160_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); -DECLSPEC void ripemd160_init_vector (ripemd160_ctx_vector_t *ctx); -DECLSPEC void ripemd160_init_vector_from_scalar (ripemd160_ctx_vector_t *ctx, ripemd160_ctx_t *ctx0); -DECLSPEC void ripemd160_update_vector_64 (ripemd160_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void ripemd160_update_vector (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void ripemd160_update_vector_swap (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void ripemd160_update_vector_utf16le (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void ripemd160_update_vector_utf16le_swap (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void ripemd160_final_vector (ripemd160_ctx_vector_t *ctx); -DECLSPEC void ripemd160_hmac_init_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3); -DECLSPEC void ripemd160_hmac_init_vector (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void ripemd160_hmac_update_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void ripemd160_hmac_update_vector (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void ripemd160_hmac_final_vector (ripemd160_hmac_ctx_vector_t *ctx); +DECLSPEC void ripemd160_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest); +DECLSPEC void ripemd160_init (PRIVATE_AS ripemd160_ctx_t *ctx); +DECLSPEC void ripemd160_update_64 (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void ripemd160_update (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void ripemd160_update_swap (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void ripemd160_update_utf16le (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void ripemd160_update_utf16le_swap (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void ripemd160_update_global (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void ripemd160_update_global_swap (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void ripemd160_update_global_utf16le (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void ripemd160_update_global_utf16le_swap (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void ripemd160_final (PRIVATE_AS ripemd160_ctx_t *ctx); +DECLSPEC void ripemd160_hmac_init_64 (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3); +DECLSPEC void ripemd160_hmac_init (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_init_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_init_global (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_init_global_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_update_64 (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void ripemd160_hmac_update (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_update_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_update_utf16le (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_update_utf16le_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_update_global (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_update_global_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_update_global_utf16le (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_update_global_utf16le_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void ripemd160_hmac_final (PRIVATE_AS ripemd160_hmac_ctx_t *ctx); +DECLSPEC void ripemd160_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest); +DECLSPEC void ripemd160_init_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx); +DECLSPEC void ripemd160_init_vector_from_scalar (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS ripemd160_ctx_t *ctx0); +DECLSPEC void ripemd160_update_vector_64 (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void ripemd160_update_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void ripemd160_update_vector_swap (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void ripemd160_update_vector_utf16le (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void ripemd160_update_vector_utf16le_swap (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void ripemd160_final_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx); +DECLSPEC void ripemd160_hmac_init_vector_64 (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3); +DECLSPEC void ripemd160_hmac_init_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void ripemd160_hmac_update_vector_64 (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void ripemd160_hmac_update_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void ripemd160_hmac_final_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx); #endif // _INC_HASH_RIPEMD160_H diff --git a/OpenCL/inc_hash_sha1.cl b/OpenCL/inc_hash_sha1.cl index 0ca52926b..1f8d9e95e 100644 --- a/OpenCL/inc_hash_sha1.cl +++ b/OpenCL/inc_hash_sha1.cl @@ -14,7 +14,7 @@ // input buf needs to be in algorithm native byte order (md5 = LE, sha1 = BE, etc) // input buf needs to be 64 byte aligned when using sha1_update() -DECLSPEC void sha1_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void sha1_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest) { u32 a = digest[0]; u32 b = digest[1]; @@ -326,7 +326,7 @@ DECLSPEC void sha1_transform (const u32 *w0, const u32 *w1, const u32 *w2, const digest[4] += e; } -DECLSPEC void sha1_init (sha1_ctx_t *ctx) +DECLSPEC void sha1_init (PRIVATE_AS sha1_ctx_t *ctx) { ctx->h[0] = SHA1M_A; ctx->h[1] = SHA1M_B; @@ -354,7 +354,7 @@ DECLSPEC void sha1_init (sha1_ctx_t *ctx) ctx->len = 0; } -DECLSPEC void sha1_update_64 (sha1_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void sha1_update_64 (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { if (len == 0) return; @@ -474,7 +474,7 @@ DECLSPEC void sha1_update_64 (sha1_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w } } -DECLSPEC void sha1_update (sha1_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_update (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -526,7 +526,7 @@ DECLSPEC void sha1_update (sha1_ctx_t *ctx, const u32 *w, const int len) sha1_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha1_update_swap (sha1_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_update_swap (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -612,7 +612,7 @@ DECLSPEC void sha1_update_swap (sha1_ctx_t *ctx, const u32 *w, const int len) sha1_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha1_update_utf16le (sha1_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_update_utf16le (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -672,7 +672,7 @@ DECLSPEC void sha1_update_utf16le (sha1_ctx_t *ctx, const u32 *w, const int len) sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_update_utf16le_swap (sha1_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_update_utf16le_swap (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -783,7 +783,7 @@ DECLSPEC void sha1_update_utf16le_swap (sha1_ctx_t *ctx, const u32 *w, const int sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_update_utf16be (sha1_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_update_utf16be (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -825,7 +825,7 @@ DECLSPEC void sha1_update_utf16be (sha1_ctx_t *ctx, const u32 *w, const int len) sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_update_utf16be_swap (sha1_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_update_utf16be_swap (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -901,7 +901,7 @@ DECLSPEC void sha1_update_utf16be_swap (sha1_ctx_t *ctx, const u32 *w, const int sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_update_global (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_update_global (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -953,7 +953,7 @@ DECLSPEC void sha1_update_global (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const sha1_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha1_update_global_swap (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_update_global_swap (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1039,7 +1039,7 @@ DECLSPEC void sha1_update_global_swap (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, sha1_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha1_update_global_utf16le (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_update_global_utf16le (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -1099,7 +1099,7 @@ DECLSPEC void sha1_update_global_utf16le (sha1_ctx_t *ctx, GLOBAL_AS const u32 * sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_update_global_utf16le_swap (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_update_global_utf16le_swap (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -1210,7 +1210,7 @@ DECLSPEC void sha1_update_global_utf16le_swap (sha1_ctx_t *ctx, GLOBAL_AS const sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_update_global_utf16be (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_update_global_utf16be (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1252,7 +1252,7 @@ DECLSPEC void sha1_update_global_utf16be (sha1_ctx_t *ctx, GLOBAL_AS const u32 * sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_update_global_utf16be_swap (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_update_global_utf16be_swap (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1328,7 +1328,7 @@ DECLSPEC void sha1_update_global_utf16be_swap (sha1_ctx_t *ctx, GLOBAL_AS const sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_final (sha1_ctx_t *ctx) +DECLSPEC void sha1_final (PRIVATE_AS sha1_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -1364,7 +1364,7 @@ DECLSPEC void sha1_final (sha1_ctx_t *ctx) // sha1_hmac -DECLSPEC void sha1_hmac_init_64 (sha1_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3) +DECLSPEC void sha1_hmac_init_64 (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3) { u32 a0[4]; u32 a1[4]; @@ -1423,7 +1423,7 @@ DECLSPEC void sha1_hmac_init_64 (sha1_hmac_ctx_t *ctx, const u32 *w0, const u32 sha1_update_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void sha1_hmac_init (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_hmac_init (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1480,7 +1480,7 @@ DECLSPEC void sha1_hmac_init (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) sha1_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha1_hmac_init_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_hmac_init_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1537,7 +1537,7 @@ DECLSPEC void sha1_hmac_init_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int sha1_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha1_hmac_init_global (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_hmac_init_global (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1594,7 +1594,7 @@ DECLSPEC void sha1_hmac_init_global (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 * sha1_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha1_hmac_init_global_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_hmac_init_global_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1651,52 +1651,52 @@ DECLSPEC void sha1_hmac_init_global_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const sha1_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha1_hmac_update_64 (sha1_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void sha1_hmac_update_64 (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { sha1_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void sha1_hmac_update (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_hmac_update (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha1_update (&ctx->ipad, w, len); } -DECLSPEC void sha1_hmac_update_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_hmac_update_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha1_update_swap (&ctx->ipad, w, len); } -DECLSPEC void sha1_hmac_update_utf16le (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_hmac_update_utf16le (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha1_update_utf16le (&ctx->ipad, w, len); } -DECLSPEC void sha1_hmac_update_utf16le_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha1_hmac_update_utf16le_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha1_update_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void sha1_hmac_update_global (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_hmac_update_global (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha1_update_global (&ctx->ipad, w, len); } -DECLSPEC void sha1_hmac_update_global_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_hmac_update_global_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha1_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void sha1_hmac_update_global_utf16le (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_hmac_update_global_utf16le (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha1_update_global_utf16le (&ctx->ipad, w, len); } -DECLSPEC void sha1_hmac_update_global_utf16le_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha1_hmac_update_global_utf16le_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha1_update_global_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void sha1_hmac_final (sha1_hmac_ctx_t *ctx) +DECLSPEC void sha1_hmac_final (PRIVATE_AS sha1_hmac_ctx_t *ctx) { sha1_final (&ctx->ipad); @@ -1724,7 +1724,7 @@ DECLSPEC void sha1_hmac_final (sha1_hmac_ctx_t *ctx) // while input buf can be a vector datatype, the length of the different elements can not -DECLSPEC void sha1_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest) +DECLSPEC void sha1_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -2038,7 +2038,7 @@ DECLSPEC void sha1_transform_vector (const u32x *w0, const u32x *w1, const u32x digest[4] += e; } -DECLSPEC void sha1_init_vector (sha1_ctx_vector_t *ctx) +DECLSPEC void sha1_init_vector (PRIVATE_AS sha1_ctx_vector_t *ctx) { ctx->h[0] = SHA1M_A; ctx->h[1] = SHA1M_B; @@ -2066,7 +2066,7 @@ DECLSPEC void sha1_init_vector (sha1_ctx_vector_t *ctx) ctx->len = 0; } -DECLSPEC void sha1_init_vector_from_scalar (sha1_ctx_vector_t *ctx, sha1_ctx_t *ctx0) +DECLSPEC void sha1_init_vector_from_scalar (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS sha1_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -2094,7 +2094,7 @@ DECLSPEC void sha1_init_vector_from_scalar (sha1_ctx_vector_t *ctx, sha1_ctx_t * ctx->len = ctx0->len; } -DECLSPEC void sha1_update_vector_64 (sha1_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void sha1_update_vector_64 (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { if (len == 0) return; @@ -2214,7 +2214,7 @@ DECLSPEC void sha1_update_vector_64 (sha1_ctx_vector_t *ctx, u32x *w0, u32x *w1, } } -DECLSPEC void sha1_update_vector (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha1_update_vector (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2266,7 +2266,7 @@ DECLSPEC void sha1_update_vector (sha1_ctx_vector_t *ctx, const u32x *w, const i sha1_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha1_update_vector_swap (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha1_update_vector_swap (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2352,7 +2352,7 @@ DECLSPEC void sha1_update_vector_swap (sha1_ctx_vector_t *ctx, const u32x *w, co sha1_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha1_update_vector_utf16le (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha1_update_vector_utf16le (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2394,7 +2394,7 @@ DECLSPEC void sha1_update_vector_utf16le (sha1_ctx_vector_t *ctx, const u32x *w, sha1_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_update_vector_utf16le_swap (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha1_update_vector_utf16le_swap (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2470,7 +2470,7 @@ DECLSPEC void sha1_update_vector_utf16le_swap (sha1_ctx_vector_t *ctx, const u32 sha1_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_update_vector_utf16leN (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha1_update_vector_utf16leN (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2512,7 +2512,7 @@ DECLSPEC void sha1_update_vector_utf16leN (sha1_ctx_vector_t *ctx, const u32x *w sha1_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_update_vector_utf16beN (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha1_update_vector_utf16beN (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2554,7 +2554,7 @@ DECLSPEC void sha1_update_vector_utf16beN (sha1_ctx_vector_t *ctx, const u32x *w sha1_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha1_final_vector (sha1_ctx_vector_t *ctx) +DECLSPEC void sha1_final_vector (PRIVATE_AS sha1_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -2590,7 +2590,7 @@ DECLSPEC void sha1_final_vector (sha1_ctx_vector_t *ctx) // HMAC + Vector -DECLSPEC void sha1_hmac_init_vector_64 (sha1_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3) +DECLSPEC void sha1_hmac_init_vector_64 (PRIVATE_AS sha1_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3) { u32x a0[4]; u32x a1[4]; @@ -2649,7 +2649,7 @@ DECLSPEC void sha1_hmac_init_vector_64 (sha1_hmac_ctx_vector_t *ctx, const u32x sha1_update_vector_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void sha1_hmac_init_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha1_hmac_init_vector (PRIVATE_AS sha1_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2706,17 +2706,17 @@ DECLSPEC void sha1_hmac_init_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, sha1_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha1_hmac_update_vector_64 (sha1_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void sha1_hmac_update_vector_64 (PRIVATE_AS sha1_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { sha1_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void sha1_hmac_update_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha1_hmac_update_vector (PRIVATE_AS sha1_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { sha1_update_vector (&ctx->ipad, w, len); } -DECLSPEC void sha1_hmac_final_vector (sha1_hmac_ctx_vector_t *ctx) +DECLSPEC void sha1_hmac_final_vector (PRIVATE_AS sha1_hmac_ctx_vector_t *ctx) { sha1_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha1.h b/OpenCL/inc_hash_sha1.h index 2ff36fdad..947ff8e68 100644 --- a/OpenCL/inc_hash_sha1.h +++ b/OpenCL/inc_hash_sha1.h @@ -90,52 +90,52 @@ typedef struct sha1_hmac_ctx_vector } sha1_hmac_ctx_vector_t; -DECLSPEC void sha1_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest); -DECLSPEC void sha1_init (sha1_ctx_t *ctx); -DECLSPEC void sha1_update_64 (sha1_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void sha1_update (sha1_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_update_swap (sha1_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_update_utf16le (sha1_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_update_utf16le_swap (sha1_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_update_utf16be (sha1_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_update_utf16be_swap (sha1_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_update_global (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_update_global_swap (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_update_global_utf16le (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_update_global_utf16le_swap (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_update_global_utf16be (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_update_global_utf16be_swap (sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_final (sha1_ctx_t *ctx); -DECLSPEC void sha1_hmac_init_64 (sha1_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3); -DECLSPEC void sha1_hmac_init (sha1_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_hmac_init_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_hmac_init_global (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_hmac_init_global_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_64 (sha1_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void sha1_hmac_update (sha1_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_utf16le (sha1_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_utf16le_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_global (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_global_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_global_utf16le (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_hmac_update_global_utf16le_swap (sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha1_hmac_final (sha1_hmac_ctx_t *ctx); -DECLSPEC void sha1_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); -DECLSPEC void sha1_init_vector (sha1_ctx_vector_t *ctx); -DECLSPEC void sha1_init_vector_from_scalar (sha1_ctx_vector_t *ctx, sha1_ctx_t *ctx0); -DECLSPEC void sha1_update_vector_64 (sha1_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void sha1_update_vector (sha1_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha1_update_vector_swap (sha1_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha1_update_vector_utf16le (sha1_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha1_update_vector_utf16le_swap (sha1_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha1_update_vector_utf16leN (sha1_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha1_update_vector_utf16beN (sha1_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha1_final_vector (sha1_ctx_vector_t *ctx); -DECLSPEC void sha1_hmac_init_vector_64 (sha1_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3); -DECLSPEC void sha1_hmac_init_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha1_hmac_update_vector_64 (sha1_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void sha1_hmac_update_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha1_hmac_final_vector (sha1_hmac_ctx_vector_t *ctx); +DECLSPEC void sha1_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest); +DECLSPEC void sha1_init (PRIVATE_AS sha1_ctx_t *ctx); +DECLSPEC void sha1_update_64 (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void sha1_update (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_update_swap (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_update_utf16le (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_update_utf16le_swap (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_update_utf16be (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_update_utf16be_swap (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_update_global (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_update_global_swap (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_update_global_utf16le (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_update_global_utf16le_swap (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_update_global_utf16be (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_update_global_utf16be_swap (PRIVATE_AS sha1_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_final (PRIVATE_AS sha1_ctx_t *ctx); +DECLSPEC void sha1_hmac_init_64 (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3); +DECLSPEC void sha1_hmac_init (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_init_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_init_global (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_init_global_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_update_64 (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void sha1_hmac_update (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_update_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_update_utf16le (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_update_utf16le_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_update_global (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_update_global_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_update_global_utf16le (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_update_global_utf16le_swap (PRIVATE_AS sha1_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha1_hmac_final (PRIVATE_AS sha1_hmac_ctx_t *ctx); +DECLSPEC void sha1_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest); +DECLSPEC void sha1_init_vector (PRIVATE_AS sha1_ctx_vector_t *ctx); +DECLSPEC void sha1_init_vector_from_scalar (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS sha1_ctx_t *ctx0); +DECLSPEC void sha1_update_vector_64 (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void sha1_update_vector (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha1_update_vector_swap (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha1_update_vector_utf16le (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha1_update_vector_utf16le_swap (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha1_update_vector_utf16leN (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha1_update_vector_utf16beN (PRIVATE_AS sha1_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha1_final_vector (PRIVATE_AS sha1_ctx_vector_t *ctx); +DECLSPEC void sha1_hmac_init_vector_64 (PRIVATE_AS sha1_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3); +DECLSPEC void sha1_hmac_init_vector (PRIVATE_AS sha1_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha1_hmac_update_vector_64 (PRIVATE_AS sha1_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void sha1_hmac_update_vector (PRIVATE_AS sha1_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha1_hmac_final_vector (PRIVATE_AS sha1_hmac_ctx_vector_t *ctx); #endif diff --git a/OpenCL/inc_hash_sha224.cl b/OpenCL/inc_hash_sha224.cl index 5e4aa55ca..b084214a9 100644 --- a/OpenCL/inc_hash_sha224.cl +++ b/OpenCL/inc_hash_sha224.cl @@ -34,7 +34,7 @@ CONSTANT_VK u32a k_sha224[64] = // input buf needs to be in algorithm native byte order (md5 = LE, sha1 = BE, etc) // input buf needs to be 64 byte aligned when using sha224_update() -DECLSPEC void sha224_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void sha224_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest) { u32 a = digest[0]; u32 b = digest[1]; @@ -125,7 +125,7 @@ DECLSPEC void sha224_transform (const u32 *w0, const u32 *w1, const u32 *w2, con digest[7] += h; } -DECLSPEC void sha224_init (sha224_ctx_t *ctx) +DECLSPEC void sha224_init (PRIVATE_AS sha224_ctx_t *ctx) { ctx->h[0] = SHA224M_A; ctx->h[1] = SHA224M_B; @@ -156,7 +156,7 @@ DECLSPEC void sha224_init (sha224_ctx_t *ctx) ctx->len = 0; } -DECLSPEC void sha224_update_64 (sha224_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void sha224_update_64 (PRIVATE_AS sha224_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { if (len == 0) return; @@ -276,7 +276,7 @@ DECLSPEC void sha224_update_64 (sha224_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u3 } } -DECLSPEC void sha224_update (sha224_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha224_update (PRIVATE_AS sha224_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -328,7 +328,7 @@ DECLSPEC void sha224_update (sha224_ctx_t *ctx, const u32 *w, const int len) sha224_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha224_update_swap (sha224_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha224_update_swap (PRIVATE_AS sha224_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -414,7 +414,7 @@ DECLSPEC void sha224_update_swap (sha224_ctx_t *ctx, const u32 *w, const int len sha224_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha224_update_utf16le (sha224_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha224_update_utf16le (PRIVATE_AS sha224_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -474,7 +474,7 @@ DECLSPEC void sha224_update_utf16le (sha224_ctx_t *ctx, const u32 *w, const int sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha224_update_utf16le_swap (sha224_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha224_update_utf16le_swap (PRIVATE_AS sha224_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -585,7 +585,7 @@ DECLSPEC void sha224_update_utf16le_swap (sha224_ctx_t *ctx, const u32 *w, const sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha224_update_global (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha224_update_global (PRIVATE_AS sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -637,7 +637,7 @@ DECLSPEC void sha224_update_global (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, c sha224_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha224_update_global_swap (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha224_update_global_swap (PRIVATE_AS sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -723,7 +723,7 @@ DECLSPEC void sha224_update_global_swap (sha224_ctx_t *ctx, GLOBAL_AS const u32 sha224_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha224_update_global_utf16le (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha224_update_global_utf16le (PRIVATE_AS sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -783,7 +783,7 @@ DECLSPEC void sha224_update_global_utf16le (sha224_ctx_t *ctx, GLOBAL_AS const u sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha224_update_global_utf16le_swap (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha224_update_global_utf16le_swap (PRIVATE_AS sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -894,7 +894,7 @@ DECLSPEC void sha224_update_global_utf16le_swap (sha224_ctx_t *ctx, GLOBAL_AS co sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha224_final (sha224_ctx_t *ctx) +DECLSPEC void sha224_final (PRIVATE_AS sha224_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -930,7 +930,7 @@ DECLSPEC void sha224_final (sha224_ctx_t *ctx) // sha224_hmac -DECLSPEC void sha224_hmac_init_64 (sha224_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3) +DECLSPEC void sha224_hmac_init_64 (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3) { u32 a0[4]; u32 a1[4]; @@ -989,7 +989,7 @@ DECLSPEC void sha224_hmac_init_64 (sha224_hmac_ctx_t *ctx, const u32 *w0, const sha224_update_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void sha224_hmac_init (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha224_hmac_init (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1046,7 +1046,7 @@ DECLSPEC void sha224_hmac_init (sha224_hmac_ctx_t *ctx, const u32 *w, const int sha224_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha224_hmac_init_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha224_hmac_init_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1103,7 +1103,7 @@ DECLSPEC void sha224_hmac_init_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const sha224_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha224_hmac_init_global (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha224_hmac_init_global (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1160,7 +1160,7 @@ DECLSPEC void sha224_hmac_init_global (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u sha224_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha224_hmac_init_global_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha224_hmac_init_global_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1217,52 +1217,52 @@ DECLSPEC void sha224_hmac_init_global_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS co sha224_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha224_hmac_update_64 (sha224_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void sha224_hmac_update_64 (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { sha224_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void sha224_hmac_update (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha224_hmac_update (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha224_update (&ctx->ipad, w, len); } -DECLSPEC void sha224_hmac_update_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha224_hmac_update_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha224_update_swap (&ctx->ipad, w, len); } -DECLSPEC void sha224_hmac_update_utf16le (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha224_hmac_update_utf16le (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha224_update_utf16le (&ctx->ipad, w, len); } -DECLSPEC void sha224_hmac_update_utf16le_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha224_hmac_update_utf16le_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha224_update_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void sha224_hmac_update_global (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha224_hmac_update_global (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha224_update_global (&ctx->ipad, w, len); } -DECLSPEC void sha224_hmac_update_global_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha224_hmac_update_global_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha224_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void sha224_hmac_update_global_utf16le (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha224_hmac_update_global_utf16le (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha224_update_global_utf16le (&ctx->ipad, w, len); } -DECLSPEC void sha224_hmac_update_global_utf16le_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha224_hmac_update_global_utf16le_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha224_update_global_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void sha224_hmac_final (sha224_hmac_ctx_t *ctx) +DECLSPEC void sha224_hmac_final (PRIVATE_AS sha224_hmac_ctx_t *ctx) { sha224_final (&ctx->ipad); @@ -1290,7 +1290,7 @@ DECLSPEC void sha224_hmac_final (sha224_hmac_ctx_t *ctx) // while input buf can be a vector datatype, the length of the different elements can not -DECLSPEC void sha224_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest) +DECLSPEC void sha224_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -1381,7 +1381,7 @@ DECLSPEC void sha224_transform_vector (const u32x *w0, const u32x *w1, const u32 digest[7] += h; } -DECLSPEC void sha224_init_vector (sha224_ctx_vector_t *ctx) +DECLSPEC void sha224_init_vector (PRIVATE_AS sha224_ctx_vector_t *ctx) { ctx->h[0] = SHA224M_A; ctx->h[1] = SHA224M_B; @@ -1412,7 +1412,7 @@ DECLSPEC void sha224_init_vector (sha224_ctx_vector_t *ctx) ctx->len = 0; } -DECLSPEC void sha224_init_vector_from_scalar (sha224_ctx_vector_t *ctx, sha224_ctx_t *ctx0) +DECLSPEC void sha224_init_vector_from_scalar (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS sha224_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -1443,7 +1443,7 @@ DECLSPEC void sha224_init_vector_from_scalar (sha224_ctx_vector_t *ctx, sha224_c ctx->len = ctx0->len; } -DECLSPEC void sha224_update_vector_64 (sha224_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void sha224_update_vector_64 (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { if (len == 0) return; @@ -1563,7 +1563,7 @@ DECLSPEC void sha224_update_vector_64 (sha224_ctx_vector_t *ctx, u32x *w0, u32x } } -DECLSPEC void sha224_update_vector (sha224_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha224_update_vector (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1615,7 +1615,7 @@ DECLSPEC void sha224_update_vector (sha224_ctx_vector_t *ctx, const u32x *w, con sha224_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha224_update_vector_swap (sha224_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha224_update_vector_swap (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1701,7 +1701,7 @@ DECLSPEC void sha224_update_vector_swap (sha224_ctx_vector_t *ctx, const u32x *w sha224_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha224_update_vector_utf16le (sha224_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha224_update_vector_utf16le (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1743,7 +1743,7 @@ DECLSPEC void sha224_update_vector_utf16le (sha224_ctx_vector_t *ctx, const u32x sha224_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha224_update_vector_utf16le_swap (sha224_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha224_update_vector_utf16le_swap (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1819,7 +1819,7 @@ DECLSPEC void sha224_update_vector_utf16le_swap (sha224_ctx_vector_t *ctx, const sha224_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha224_update_vector_utf16beN (sha224_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha224_update_vector_utf16beN (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1861,7 +1861,7 @@ DECLSPEC void sha224_update_vector_utf16beN (sha224_ctx_vector_t *ctx, const u32 sha224_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha224_final_vector (sha224_ctx_vector_t *ctx) +DECLSPEC void sha224_final_vector (PRIVATE_AS sha224_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -1897,7 +1897,7 @@ DECLSPEC void sha224_final_vector (sha224_ctx_vector_t *ctx) // HMAC + Vector -DECLSPEC void sha224_hmac_init_vector_64 (sha224_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3) +DECLSPEC void sha224_hmac_init_vector_64 (PRIVATE_AS sha224_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3) { u32x a0[4]; u32x a1[4]; @@ -1956,7 +1956,7 @@ DECLSPEC void sha224_hmac_init_vector_64 (sha224_hmac_ctx_vector_t *ctx, const u sha224_update_vector_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void sha224_hmac_init_vector (sha224_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha224_hmac_init_vector (PRIVATE_AS sha224_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2013,17 +2013,17 @@ DECLSPEC void sha224_hmac_init_vector (sha224_hmac_ctx_vector_t *ctx, const u32x sha224_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha224_hmac_update_vector_64 (sha224_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void sha224_hmac_update_vector_64 (PRIVATE_AS sha224_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { sha224_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void sha224_hmac_update_vector (sha224_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha224_hmac_update_vector (PRIVATE_AS sha224_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { sha224_update_vector (&ctx->ipad, w, len); } -DECLSPEC void sha224_hmac_final_vector (sha224_hmac_ctx_vector_t *ctx) +DECLSPEC void sha224_hmac_final_vector (PRIVATE_AS sha224_hmac_ctx_vector_t *ctx) { sha224_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha224.h b/OpenCL/inc_hash_sha224.h index d68c79d65..e497a0536 100644 --- a/OpenCL/inc_hash_sha224.h +++ b/OpenCL/inc_hash_sha224.h @@ -89,47 +89,47 @@ typedef struct sha224_hmac_ctx_vector } sha224_hmac_ctx_vector_t; -DECLSPEC void sha224_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest); -DECLSPEC void sha224_init (sha224_ctx_t *ctx); -DECLSPEC void sha224_update_64 (sha224_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void sha224_update (sha224_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_update_swap (sha224_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_update_utf16le (sha224_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_update_utf16le_swap (sha224_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_update_global (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_update_global_swap (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_update_global_utf16le (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_update_global_utf16le_swap (sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_final (sha224_ctx_t *ctx); -DECLSPEC void sha224_hmac_init_64 (sha224_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3); -DECLSPEC void sha224_hmac_init (sha224_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_hmac_init_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_hmac_init_global (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_hmac_init_global_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_64 (sha224_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void sha224_hmac_update (sha224_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_utf16le (sha224_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_utf16le_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_global (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_global_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_global_utf16le (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_hmac_update_global_utf16le_swap (sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha224_hmac_final (sha224_hmac_ctx_t *ctx); -DECLSPEC void sha224_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); -DECLSPEC void sha224_init_vector (sha224_ctx_vector_t *ctx); -DECLSPEC void sha224_init_vector_from_scalar (sha224_ctx_vector_t *ctx, sha224_ctx_t *ctx0); -DECLSPEC void sha224_update_vector_64 (sha224_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void sha224_update_vector (sha224_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha224_update_vector_swap (sha224_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha224_update_vector_utf16le (sha224_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha224_update_vector_utf16le_swap (sha224_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha224_update_vector_utf16beN (sha224_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha224_final_vector (sha224_ctx_vector_t *ctx); -DECLSPEC void sha224_hmac_init_vector_64 (sha224_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3); -DECLSPEC void sha224_hmac_init_vector (sha224_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha224_hmac_update_vector_64 (sha224_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void sha224_hmac_update_vector (sha224_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha224_hmac_final_vector (sha224_hmac_ctx_vector_t *ctx); +DECLSPEC void sha224_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest); +DECLSPEC void sha224_init (PRIVATE_AS sha224_ctx_t *ctx); +DECLSPEC void sha224_update_64 (PRIVATE_AS sha224_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void sha224_update (PRIVATE_AS sha224_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha224_update_swap (PRIVATE_AS sha224_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha224_update_utf16le (PRIVATE_AS sha224_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha224_update_utf16le_swap (PRIVATE_AS sha224_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha224_update_global (PRIVATE_AS sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha224_update_global_swap (PRIVATE_AS sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha224_update_global_utf16le (PRIVATE_AS sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha224_update_global_utf16le_swap (PRIVATE_AS sha224_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha224_final (PRIVATE_AS sha224_ctx_t *ctx); +DECLSPEC void sha224_hmac_init_64 (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3); +DECLSPEC void sha224_hmac_init (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_init_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_init_global (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_init_global_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_update_64 (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void sha224_hmac_update (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_update_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_update_utf16le (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_update_utf16le_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_update_global (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_update_global_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_update_global_utf16le (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_update_global_utf16le_swap (PRIVATE_AS sha224_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha224_hmac_final (PRIVATE_AS sha224_hmac_ctx_t *ctx); +DECLSPEC void sha224_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest); +DECLSPEC void sha224_init_vector (PRIVATE_AS sha224_ctx_vector_t *ctx); +DECLSPEC void sha224_init_vector_from_scalar (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS sha224_ctx_t *ctx0); +DECLSPEC void sha224_update_vector_64 (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void sha224_update_vector (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha224_update_vector_swap (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha224_update_vector_utf16le (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha224_update_vector_utf16le_swap (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha224_update_vector_utf16beN (PRIVATE_AS sha224_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha224_final_vector (PRIVATE_AS sha224_ctx_vector_t *ctx); +DECLSPEC void sha224_hmac_init_vector_64 (PRIVATE_AS sha224_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3); +DECLSPEC void sha224_hmac_init_vector (PRIVATE_AS sha224_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha224_hmac_update_vector_64 (PRIVATE_AS sha224_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void sha224_hmac_update_vector (PRIVATE_AS sha224_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha224_hmac_final_vector (PRIVATE_AS sha224_hmac_ctx_vector_t *ctx); #endif // _INC_HASH_SHA224_H diff --git a/OpenCL/inc_hash_sha256.cl b/OpenCL/inc_hash_sha256.cl index 40f456d8b..de55101f4 100644 --- a/OpenCL/inc_hash_sha256.cl +++ b/OpenCL/inc_hash_sha256.cl @@ -34,7 +34,7 @@ CONSTANT_VK u32a k_sha256[64] = // input buf needs to be in algorithm native byte order (md5 = LE, sha256 = BE, etc) // input buf needs to be 64 byte aligned when using sha256_update() -DECLSPEC void sha256_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void sha256_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest) { u32 a = digest[0]; u32 b = digest[1]; @@ -125,7 +125,7 @@ DECLSPEC void sha256_transform (const u32 *w0, const u32 *w1, const u32 *w2, con digest[7] += h; } -DECLSPEC void sha256_init (sha256_ctx_t *ctx) +DECLSPEC void sha256_init (PRIVATE_AS sha256_ctx_t *ctx) { ctx->h[0] = SHA256M_A; ctx->h[1] = SHA256M_B; @@ -156,7 +156,7 @@ DECLSPEC void sha256_init (sha256_ctx_t *ctx) ctx->len = 0; } -DECLSPEC void sha256_update_64 (sha256_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void sha256_update_64 (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { if (len == 0) return; @@ -276,7 +276,7 @@ DECLSPEC void sha256_update_64 (sha256_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u3 } } -DECLSPEC void sha256_update (sha256_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha256_update (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -328,7 +328,7 @@ DECLSPEC void sha256_update (sha256_ctx_t *ctx, const u32 *w, const int len) sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha256_update_swap (sha256_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha256_update_swap (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -414,7 +414,7 @@ DECLSPEC void sha256_update_swap (sha256_ctx_t *ctx, const u32 *w, const int len sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha256_update_utf16le (sha256_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha256_update_utf16le (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -474,7 +474,7 @@ DECLSPEC void sha256_update_utf16le (sha256_ctx_t *ctx, const u32 *w, const int sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha256_update_utf16le_swap (sha256_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha256_update_utf16le_swap (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -585,7 +585,7 @@ DECLSPEC void sha256_update_utf16le_swap (sha256_ctx_t *ctx, const u32 *w, const sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha256_update_global (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha256_update_global (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -637,7 +637,7 @@ DECLSPEC void sha256_update_global (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, c sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha256_update_global_swap (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha256_update_global_swap (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -723,7 +723,7 @@ DECLSPEC void sha256_update_global_swap (sha256_ctx_t *ctx, GLOBAL_AS const u32 sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha256_update_global_utf16le (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha256_update_global_utf16le (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -783,7 +783,7 @@ DECLSPEC void sha256_update_global_utf16le (sha256_ctx_t *ctx, GLOBAL_AS const u sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha256_update_global_utf16le_swap (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha256_update_global_utf16le_swap (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -894,7 +894,7 @@ DECLSPEC void sha256_update_global_utf16le_swap (sha256_ctx_t *ctx, GLOBAL_AS co sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha256_final (sha256_ctx_t *ctx) +DECLSPEC void sha256_final (PRIVATE_AS sha256_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -930,7 +930,7 @@ DECLSPEC void sha256_final (sha256_ctx_t *ctx) // sha256_hmac -DECLSPEC void sha256_hmac_init_64 (sha256_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3) +DECLSPEC void sha256_hmac_init_64 (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3) { u32 a0[4]; u32 a1[4]; @@ -989,7 +989,7 @@ DECLSPEC void sha256_hmac_init_64 (sha256_hmac_ctx_t *ctx, const u32 *w0, const sha256_update_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void sha256_hmac_init (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha256_hmac_init (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1046,7 +1046,7 @@ DECLSPEC void sha256_hmac_init (sha256_hmac_ctx_t *ctx, const u32 *w, const int sha256_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha256_hmac_init_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha256_hmac_init_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1103,7 +1103,7 @@ DECLSPEC void sha256_hmac_init_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const sha256_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha256_hmac_init_global (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha256_hmac_init_global (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1160,7 +1160,7 @@ DECLSPEC void sha256_hmac_init_global (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u sha256_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha256_hmac_init_global_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha256_hmac_init_global_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1217,52 +1217,52 @@ DECLSPEC void sha256_hmac_init_global_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS co sha256_hmac_init_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha256_hmac_update_64 (sha256_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void sha256_hmac_update_64 (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { sha256_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void sha256_hmac_update (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha256_hmac_update (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha256_update (&ctx->ipad, w, len); } -DECLSPEC void sha256_hmac_update_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha256_hmac_update_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha256_update_swap (&ctx->ipad, w, len); } -DECLSPEC void sha256_hmac_update_utf16le (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha256_hmac_update_utf16le (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha256_update_utf16le (&ctx->ipad, w, len); } -DECLSPEC void sha256_hmac_update_utf16le_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha256_hmac_update_utf16le_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha256_update_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void sha256_hmac_update_global (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha256_hmac_update_global (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha256_update_global (&ctx->ipad, w, len); } -DECLSPEC void sha256_hmac_update_global_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha256_hmac_update_global_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha256_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void sha256_hmac_update_global_utf16le (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha256_hmac_update_global_utf16le (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha256_update_global_utf16le (&ctx->ipad, w, len); } -DECLSPEC void sha256_hmac_update_global_utf16le_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha256_hmac_update_global_utf16le_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha256_update_global_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void sha256_hmac_final (sha256_hmac_ctx_t *ctx) +DECLSPEC void sha256_hmac_final (PRIVATE_AS sha256_hmac_ctx_t *ctx) { sha256_final (&ctx->ipad); @@ -1290,7 +1290,7 @@ DECLSPEC void sha256_hmac_final (sha256_hmac_ctx_t *ctx) // while input buf can be a vector datatype, the length of the different elements can not -DECLSPEC void sha256_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest) +DECLSPEC void sha256_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -1381,7 +1381,7 @@ DECLSPEC void sha256_transform_vector (const u32x *w0, const u32x *w1, const u32 digest[7] += h; } -DECLSPEC void sha256_init_vector (sha256_ctx_vector_t *ctx) +DECLSPEC void sha256_init_vector (PRIVATE_AS sha256_ctx_vector_t *ctx) { ctx->h[0] = SHA256M_A; ctx->h[1] = SHA256M_B; @@ -1412,7 +1412,7 @@ DECLSPEC void sha256_init_vector (sha256_ctx_vector_t *ctx) ctx->len = 0; } -DECLSPEC void sha256_init_vector_from_scalar (sha256_ctx_vector_t *ctx, sha256_ctx_t *ctx0) +DECLSPEC void sha256_init_vector_from_scalar (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS sha256_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -1443,7 +1443,7 @@ DECLSPEC void sha256_init_vector_from_scalar (sha256_ctx_vector_t *ctx, sha256_c ctx->len = ctx0->len; } -DECLSPEC void sha256_update_vector_64 (sha256_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void sha256_update_vector_64 (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { if (len == 0) return; @@ -1563,7 +1563,7 @@ DECLSPEC void sha256_update_vector_64 (sha256_ctx_vector_t *ctx, u32x *w0, u32x } } -DECLSPEC void sha256_update_vector (sha256_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha256_update_vector (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1615,7 +1615,7 @@ DECLSPEC void sha256_update_vector (sha256_ctx_vector_t *ctx, const u32x *w, con sha256_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha256_update_vector_swap (sha256_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha256_update_vector_swap (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1701,7 +1701,7 @@ DECLSPEC void sha256_update_vector_swap (sha256_ctx_vector_t *ctx, const u32x *w sha256_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void sha256_update_vector_utf16le (sha256_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha256_update_vector_utf16le (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1743,7 +1743,7 @@ DECLSPEC void sha256_update_vector_utf16le (sha256_ctx_vector_t *ctx, const u32x sha256_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha256_update_vector_utf16le_swap (sha256_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha256_update_vector_utf16le_swap (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1819,7 +1819,7 @@ DECLSPEC void sha256_update_vector_utf16le_swap (sha256_ctx_vector_t *ctx, const sha256_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha256_update_vector_utf16beN (sha256_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha256_update_vector_utf16beN (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1861,7 +1861,7 @@ DECLSPEC void sha256_update_vector_utf16beN (sha256_ctx_vector_t *ctx, const u32 sha256_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void sha256_final_vector (sha256_ctx_vector_t *ctx) +DECLSPEC void sha256_final_vector (PRIVATE_AS sha256_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -1897,7 +1897,7 @@ DECLSPEC void sha256_final_vector (sha256_ctx_vector_t *ctx) // HMAC + Vector -DECLSPEC void sha256_hmac_init_vector_64 (sha256_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3) +DECLSPEC void sha256_hmac_init_vector_64 (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3) { u32x a0[4]; u32x a1[4]; @@ -1956,7 +1956,7 @@ DECLSPEC void sha256_hmac_init_vector_64 (sha256_hmac_ctx_vector_t *ctx, const u sha256_update_vector_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void sha256_hmac_init_vector (sha256_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha256_hmac_init_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2013,17 +2013,17 @@ DECLSPEC void sha256_hmac_init_vector (sha256_hmac_ctx_vector_t *ctx, const u32x sha256_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -DECLSPEC void sha256_hmac_update_vector_64 (sha256_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void sha256_hmac_update_vector_64 (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { sha256_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void sha256_hmac_update_vector (sha256_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha256_hmac_update_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { sha256_update_vector (&ctx->ipad, w, len); } -DECLSPEC void sha256_hmac_final_vector (sha256_hmac_ctx_vector_t *ctx) +DECLSPEC void sha256_hmac_final_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx) { sha256_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha256.h b/OpenCL/inc_hash_sha256.h index ccf5a79f8..018c1024e 100644 --- a/OpenCL/inc_hash_sha256.h +++ b/OpenCL/inc_hash_sha256.h @@ -89,47 +89,47 @@ typedef struct sha256_hmac_ctx_vector } sha256_hmac_ctx_vector_t; -DECLSPEC void sha256_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest); -DECLSPEC void sha256_init (sha256_ctx_t *ctx); -DECLSPEC void sha256_update_64 (sha256_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void sha256_update (sha256_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_update_swap (sha256_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_update_utf16le (sha256_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_update_utf16le_swap (sha256_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_update_global (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_update_global_swap (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_update_global_utf16le (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_update_global_utf16le_swap (sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_final (sha256_ctx_t *ctx); -DECLSPEC void sha256_hmac_init_64 (sha256_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3); -DECLSPEC void sha256_hmac_init (sha256_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_hmac_init_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_hmac_init_global (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_hmac_init_global_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_64 (sha256_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void sha256_hmac_update (sha256_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_utf16le (sha256_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_utf16le_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_global (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_global_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_global_utf16le (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_hmac_update_global_utf16le_swap (sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha256_hmac_final (sha256_hmac_ctx_t *ctx); -DECLSPEC void sha256_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest); -DECLSPEC void sha256_init_vector (sha256_ctx_vector_t *ctx); -DECLSPEC void sha256_init_vector_from_scalar (sha256_ctx_vector_t *ctx, sha256_ctx_t *ctx0); -DECLSPEC void sha256_update_vector_64 (sha256_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void sha256_update_vector (sha256_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha256_update_vector_swap (sha256_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha256_update_vector_utf16le (sha256_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha256_update_vector_utf16le_swap (sha256_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha256_update_vector_utf16beN (sha256_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha256_final_vector (sha256_ctx_vector_t *ctx); -DECLSPEC void sha256_hmac_init_vector_64 (sha256_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3); -DECLSPEC void sha256_hmac_init_vector (sha256_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha256_hmac_update_vector_64 (sha256_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void sha256_hmac_update_vector (sha256_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha256_hmac_final_vector (sha256_hmac_ctx_vector_t *ctx); +DECLSPEC void sha256_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest); +DECLSPEC void sha256_init (PRIVATE_AS sha256_ctx_t *ctx); +DECLSPEC void sha256_update_64 (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void sha256_update (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha256_update_swap (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha256_update_utf16le (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha256_update_utf16le_swap (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha256_update_global (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha256_update_global_swap (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha256_update_global_utf16le (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha256_update_global_utf16le_swap (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha256_final (PRIVATE_AS sha256_ctx_t *ctx); +DECLSPEC void sha256_hmac_init_64 (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3); +DECLSPEC void sha256_hmac_init (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_init_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_init_global (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_init_global_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_update_64 (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void sha256_hmac_update (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_update_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_update_utf16le (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_update_utf16le_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_update_global (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_update_global_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_update_global_utf16le (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_update_global_utf16le_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha256_hmac_final (PRIVATE_AS sha256_hmac_ctx_t *ctx); +DECLSPEC void sha256_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest); +DECLSPEC void sha256_init_vector (PRIVATE_AS sha256_ctx_vector_t *ctx); +DECLSPEC void sha256_init_vector_from_scalar (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS sha256_ctx_t *ctx0); +DECLSPEC void sha256_update_vector_64 (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void sha256_update_vector (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha256_update_vector_swap (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha256_update_vector_utf16le (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha256_update_vector_utf16le_swap (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha256_update_vector_utf16beN (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha256_final_vector (PRIVATE_AS sha256_ctx_vector_t *ctx); +DECLSPEC void sha256_hmac_init_vector_64 (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3); +DECLSPEC void sha256_hmac_init_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha256_hmac_update_vector_64 (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void sha256_hmac_update_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha256_hmac_final_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx); #endif diff --git a/OpenCL/inc_hash_sha384.cl b/OpenCL/inc_hash_sha384.cl index 625908503..e3fd761c6 100644 --- a/OpenCL/inc_hash_sha384.cl +++ b/OpenCL/inc_hash_sha384.cl @@ -38,7 +38,7 @@ CONSTANT_VK u64a k_sha384[80] = // input buf needs to be in algorithm native byte order (md5 = LE, sha1 = BE, etc) // input buf needs to be 128 byte aligned when using sha384_update() -DECLSPEC void sha384_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, const u32 *w4, const u32 *w5, const u32 *w6, const u32 *w7, u64 *digest) +DECLSPEC void sha384_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS const u32 *w4, PRIVATE_AS const u32 *w5, PRIVATE_AS const u32 *w6, PRIVATE_AS const u32 *w7, PRIVATE_AS u64 *digest) { u64 a = digest[0]; u64 b = digest[1]; @@ -129,7 +129,7 @@ DECLSPEC void sha384_transform (const u32 *w0, const u32 *w1, const u32 *w2, con digest[7] += h; } -DECLSPEC void sha384_init (sha384_ctx_t *ctx) +DECLSPEC void sha384_init (PRIVATE_AS sha384_ctx_t *ctx) { ctx->h[0] = SHA384M_A; ctx->h[1] = SHA384M_B; @@ -176,7 +176,7 @@ DECLSPEC void sha384_init (sha384_ctx_t *ctx) ctx->len = 0; } -DECLSPEC void sha384_update_128 (sha384_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len) +DECLSPEC void sha384_update_128 (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len) { if (len == 0) return; @@ -380,7 +380,7 @@ DECLSPEC void sha384_update_128 (sha384_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u } } -DECLSPEC void sha384_update (sha384_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha384_update (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -468,7 +468,7 @@ DECLSPEC void sha384_update (sha384_ctx_t *ctx, const u32 *w, const int len) sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha384_update_swap (sha384_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha384_update_swap (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -622,7 +622,7 @@ DECLSPEC void sha384_update_swap (sha384_ctx_t *ctx, const u32 *w, const int len sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha384_update_utf16le (sha384_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha384_update_utf16le (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -706,7 +706,7 @@ DECLSPEC void sha384_update_utf16le (sha384_ctx_t *ctx, const u32 *w, const int sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha384_update_utf16le_swap (sha384_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha384_update_utf16le_swap (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -889,7 +889,7 @@ DECLSPEC void sha384_update_utf16le_swap (sha384_ctx_t *ctx, const u32 *w, const sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha384_update_global (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha384_update_global (PRIVATE_AS sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -977,7 +977,7 @@ DECLSPEC void sha384_update_global (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, c sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha384_update_global_swap (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha384_update_global_swap (PRIVATE_AS sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1131,7 +1131,7 @@ DECLSPEC void sha384_update_global_swap (sha384_ctx_t *ctx, GLOBAL_AS const u32 sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha384_update_global_utf16le (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha384_update_global_utf16le (PRIVATE_AS sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -1215,7 +1215,7 @@ DECLSPEC void sha384_update_global_utf16le (sha384_ctx_t *ctx, GLOBAL_AS const u sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha384_update_global_utf16le_swap (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha384_update_global_utf16le_swap (PRIVATE_AS sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -1398,7 +1398,7 @@ DECLSPEC void sha384_update_global_utf16le_swap (sha384_ctx_t *ctx, GLOBAL_AS co sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha384_final (sha384_ctx_t *ctx) +DECLSPEC void sha384_final (PRIVATE_AS sha384_ctx_t *ctx) { const int pos = ctx->len & 127; @@ -1450,7 +1450,7 @@ DECLSPEC void sha384_final (sha384_ctx_t *ctx) // sha384_hmac -DECLSPEC void sha384_hmac_init_128 (sha384_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, const u32 *w4, const u32 *w5, const u32 *w6, const u32 *w7) +DECLSPEC void sha384_hmac_init_128 (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS const u32 *w4, PRIVATE_AS const u32 *w5, PRIVATE_AS const u32 *w6, PRIVATE_AS const u32 *w7) { u32 a0[4]; u32 a1[4]; @@ -1549,7 +1549,7 @@ DECLSPEC void sha384_hmac_init_128 (sha384_hmac_ctx_t *ctx, const u32 *w0, const sha384_update_128 (&ctx->opad, b0, b1, b2, b3, b4, b5, b6, b7, 128); } -DECLSPEC void sha384_hmac_init (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha384_hmac_init (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1642,7 +1642,7 @@ DECLSPEC void sha384_hmac_init (sha384_hmac_ctx_t *ctx, const u32 *w, const int sha384_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -DECLSPEC void sha384_hmac_init_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha384_hmac_init_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1735,7 +1735,7 @@ DECLSPEC void sha384_hmac_init_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const sha384_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -DECLSPEC void sha384_hmac_init_global (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha384_hmac_init_global (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1828,7 +1828,7 @@ DECLSPEC void sha384_hmac_init_global (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u sha384_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -DECLSPEC void sha384_hmac_init_global_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha384_hmac_init_global_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1921,52 +1921,52 @@ DECLSPEC void sha384_hmac_init_global_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS co sha384_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -DECLSPEC void sha384_hmac_update_128 (sha384_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len) +DECLSPEC void sha384_hmac_update_128 (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len) { sha384_update_128 (&ctx->ipad, w0, w1, w2, w3, w4, w5, w6, w7, len); } -DECLSPEC void sha384_hmac_update (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha384_hmac_update (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha384_update (&ctx->ipad, w, len); } -DECLSPEC void sha384_hmac_update_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha384_hmac_update_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha384_update_swap (&ctx->ipad, w, len); } -DECLSPEC void sha384_hmac_update_utf16le (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha384_hmac_update_utf16le (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha384_update_utf16le (&ctx->ipad, w, len); } -DECLSPEC void sha384_hmac_update_utf16le_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha384_hmac_update_utf16le_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha384_update_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void sha384_hmac_update_global (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha384_hmac_update_global (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha384_update_global (&ctx->ipad, w, len); } -DECLSPEC void sha384_hmac_update_global_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha384_hmac_update_global_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha384_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void sha384_hmac_update_global_utf16le (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha384_hmac_update_global_utf16le (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha384_update_global_utf16le (&ctx->ipad, w, len); } -DECLSPEC void sha384_hmac_update_global_utf16le_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha384_hmac_update_global_utf16le_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha384_update_global_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void sha384_hmac_final (sha384_hmac_ctx_t *ctx) +DECLSPEC void sha384_hmac_final (PRIVATE_AS sha384_hmac_ctx_t *ctx) { sha384_final (&ctx->ipad); @@ -2010,7 +2010,7 @@ DECLSPEC void sha384_hmac_final (sha384_hmac_ctx_t *ctx) // while input buf can be a vector datatype, the length of the different elements can not -DECLSPEC void sha384_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest) +DECLSPEC void sha384_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS const u32x *w4, PRIVATE_AS const u32x *w5, PRIVATE_AS const u32x *w6, PRIVATE_AS const u32x *w7, PRIVATE_AS u64x *digest) { u64x a = digest[0]; u64x b = digest[1]; @@ -2101,7 +2101,7 @@ DECLSPEC void sha384_transform_vector (const u32x *w0, const u32x *w1, const u32 digest[7] += h; } -DECLSPEC void sha384_init_vector (sha384_ctx_vector_t *ctx) +DECLSPEC void sha384_init_vector (PRIVATE_AS sha384_ctx_vector_t *ctx) { ctx->h[0] = SHA384M_A; ctx->h[1] = SHA384M_B; @@ -2148,7 +2148,7 @@ DECLSPEC void sha384_init_vector (sha384_ctx_vector_t *ctx) ctx->len = 0; } -DECLSPEC void sha384_init_vector_from_scalar (sha384_ctx_vector_t *ctx, sha384_ctx_t *ctx0) +DECLSPEC void sha384_init_vector_from_scalar (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS sha384_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -2195,7 +2195,7 @@ DECLSPEC void sha384_init_vector_from_scalar (sha384_ctx_vector_t *ctx, sha384_c ctx->len = ctx0->len; } -DECLSPEC void sha384_update_vector_128 (sha384_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const int len) +DECLSPEC void sha384_update_vector_128 (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const int len) { if (len == 0) return; @@ -2399,7 +2399,7 @@ DECLSPEC void sha384_update_vector_128 (sha384_ctx_vector_t *ctx, u32x *w0, u32x } } -DECLSPEC void sha384_update_vector (sha384_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha384_update_vector (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2487,7 +2487,7 @@ DECLSPEC void sha384_update_vector (sha384_ctx_vector_t *ctx, const u32x *w, con sha384_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha384_update_vector_swap (sha384_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha384_update_vector_swap (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2641,7 +2641,7 @@ DECLSPEC void sha384_update_vector_swap (sha384_ctx_vector_t *ctx, const u32x *w sha384_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha384_update_vector_utf16le (sha384_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha384_update_vector_utf16le (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2707,7 +2707,7 @@ DECLSPEC void sha384_update_vector_utf16le (sha384_ctx_vector_t *ctx, const u32x sha384_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha384_update_vector_utf16le_swap (sha384_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha384_update_vector_utf16le_swap (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2839,7 +2839,7 @@ DECLSPEC void sha384_update_vector_utf16le_swap (sha384_ctx_vector_t *ctx, const sha384_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha384_update_vector_utf16beN (sha384_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha384_update_vector_utf16beN (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2905,7 +2905,7 @@ DECLSPEC void sha384_update_vector_utf16beN (sha384_ctx_vector_t *ctx, const u32 sha384_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha384_final_vector (sha384_ctx_vector_t *ctx) +DECLSPEC void sha384_final_vector (PRIVATE_AS sha384_ctx_vector_t *ctx) { const int pos = ctx->len & 127; @@ -2957,7 +2957,7 @@ DECLSPEC void sha384_final_vector (sha384_ctx_vector_t *ctx) // HMAC + Vector -DECLSPEC void sha384_hmac_init_vector_128 (sha384_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7) +DECLSPEC void sha384_hmac_init_vector_128 (PRIVATE_AS sha384_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS const u32x *w4, PRIVATE_AS const u32x *w5, PRIVATE_AS const u32x *w6, PRIVATE_AS const u32x *w7) { u32x a0[4]; u32x a1[4]; @@ -3056,7 +3056,7 @@ DECLSPEC void sha384_hmac_init_vector_128 (sha384_hmac_ctx_vector_t *ctx, const sha384_update_vector_128 (&ctx->opad, b0, b1, b2, b3, b4, b5, b6, b7, 128); } -DECLSPEC void sha384_hmac_init_vector (sha384_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha384_hmac_init_vector (PRIVATE_AS sha384_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -3149,17 +3149,17 @@ DECLSPEC void sha384_hmac_init_vector (sha384_hmac_ctx_vector_t *ctx, const u32x sha384_hmac_init_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -DECLSPEC void sha384_hmac_update_vector_128 (sha384_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const int len) +DECLSPEC void sha384_hmac_update_vector_128 (PRIVATE_AS sha384_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const int len) { sha384_update_vector_128 (&ctx->ipad, w0, w1, w2, w3, w4, w5, w6, w7, len); } -DECLSPEC void sha384_hmac_update_vector (sha384_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha384_hmac_update_vector (PRIVATE_AS sha384_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { sha384_update_vector (&ctx->ipad, w, len); } -DECLSPEC void sha384_hmac_final_vector (sha384_hmac_ctx_vector_t *ctx) +DECLSPEC void sha384_hmac_final_vector (PRIVATE_AS sha384_hmac_ctx_vector_t *ctx) { sha384_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha384.h b/OpenCL/inc_hash_sha384.h index 92266b24a..802168fb5 100644 --- a/OpenCL/inc_hash_sha384.h +++ b/OpenCL/inc_hash_sha384.h @@ -103,47 +103,47 @@ typedef struct sha384_hmac_ctx_vector } sha384_hmac_ctx_vector_t; -DECLSPEC void sha384_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, const u32 *w4, const u32 *w5, const u32 *w6, const u32 *w7, u64 *digest); -DECLSPEC void sha384_init (sha384_ctx_t *ctx); -DECLSPEC void sha384_update_128 (sha384_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len); -DECLSPEC void sha384_update (sha384_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_update_swap (sha384_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_update_utf16le (sha384_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_update_utf16le_swap (sha384_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_update_global (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_update_global_swap (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_update_global_utf16le (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_update_global_utf16le_swap (sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_final (sha384_ctx_t *ctx); -DECLSPEC void sha384_hmac_init_128 (sha384_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, const u32 *w4, const u32 *w5, const u32 *w6, const u32 *w7); -DECLSPEC void sha384_hmac_init (sha384_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_hmac_init_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_hmac_init_global (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_hmac_init_global_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_128 (sha384_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len); -DECLSPEC void sha384_hmac_update (sha384_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_utf16le (sha384_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_utf16le_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_global (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_global_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_global_utf16le (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_hmac_update_global_utf16le_swap (sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha384_hmac_final (sha384_hmac_ctx_t *ctx); -DECLSPEC void sha384_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest); -DECLSPEC void sha384_init_vector (sha384_ctx_vector_t *ctx); -DECLSPEC void sha384_init_vector_from_scalar (sha384_ctx_vector_t *ctx, sha384_ctx_t *ctx0); -DECLSPEC void sha384_update_vector_128 (sha384_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const int len); -DECLSPEC void sha384_update_vector (sha384_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha384_update_vector_swap (sha384_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha384_update_vector_utf16le (sha384_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha384_update_vector_utf16le_swap (sha384_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha384_update_vector_utf16beN (sha384_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha384_final_vector (sha384_ctx_vector_t *ctx); -DECLSPEC void sha384_hmac_init_vector_128 (sha384_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7); -DECLSPEC void sha384_hmac_init_vector (sha384_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha384_hmac_update_vector_128 (sha384_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const int len); -DECLSPEC void sha384_hmac_update_vector (sha384_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha384_hmac_final_vector (sha384_hmac_ctx_vector_t *ctx); +DECLSPEC void sha384_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS const u32 *w4, PRIVATE_AS const u32 *w5, PRIVATE_AS const u32 *w6, PRIVATE_AS const u32 *w7, PRIVATE_AS u64 *digest); +DECLSPEC void sha384_init (PRIVATE_AS sha384_ctx_t *ctx); +DECLSPEC void sha384_update_128 (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len); +DECLSPEC void sha384_update (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha384_update_swap (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha384_update_utf16le (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha384_update_utf16le_swap (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha384_update_global (PRIVATE_AS sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha384_update_global_swap (PRIVATE_AS sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha384_update_global_utf16le (PRIVATE_AS sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha384_update_global_utf16le_swap (PRIVATE_AS sha384_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha384_final (PRIVATE_AS sha384_ctx_t *ctx); +DECLSPEC void sha384_hmac_init_128 (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS const u32 *w4, PRIVATE_AS const u32 *w5, PRIVATE_AS const u32 *w6, PRIVATE_AS const u32 *w7); +DECLSPEC void sha384_hmac_init (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_init_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_init_global (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_init_global_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_update_128 (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len); +DECLSPEC void sha384_hmac_update (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_update_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_update_utf16le (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_update_utf16le_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_update_global (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_update_global_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_update_global_utf16le (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_update_global_utf16le_swap (PRIVATE_AS sha384_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha384_hmac_final (PRIVATE_AS sha384_hmac_ctx_t *ctx); +DECLSPEC void sha384_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS const u32x *w4, PRIVATE_AS const u32x *w5, PRIVATE_AS const u32x *w6, PRIVATE_AS const u32x *w7, PRIVATE_AS u64x *digest); +DECLSPEC void sha384_init_vector (PRIVATE_AS sha384_ctx_vector_t *ctx); +DECLSPEC void sha384_init_vector_from_scalar (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS sha384_ctx_t *ctx0); +DECLSPEC void sha384_update_vector_128 (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const int len); +DECLSPEC void sha384_update_vector (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha384_update_vector_swap (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha384_update_vector_utf16le (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha384_update_vector_utf16le_swap (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha384_update_vector_utf16beN (PRIVATE_AS sha384_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha384_final_vector (PRIVATE_AS sha384_ctx_vector_t *ctx); +DECLSPEC void sha384_hmac_init_vector_128 (PRIVATE_AS sha384_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS const u32x *w4, PRIVATE_AS const u32x *w5, PRIVATE_AS const u32x *w6, PRIVATE_AS const u32x *w7); +DECLSPEC void sha384_hmac_init_vector (PRIVATE_AS sha384_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha384_hmac_update_vector_128 (PRIVATE_AS sha384_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const int len); +DECLSPEC void sha384_hmac_update_vector (PRIVATE_AS sha384_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha384_hmac_final_vector (PRIVATE_AS sha384_hmac_ctx_vector_t *ctx); #endif // _INC_HASH_SHA384_H diff --git a/OpenCL/inc_hash_sha512.cl b/OpenCL/inc_hash_sha512.cl index c3f3e9d95..dc0ac665b 100644 --- a/OpenCL/inc_hash_sha512.cl +++ b/OpenCL/inc_hash_sha512.cl @@ -38,7 +38,7 @@ CONSTANT_VK u64a k_sha512[80] = // input buf needs to be in algorithm native byte order (md5 = LE, sha1 = BE, etc) // input buf needs to be 128 byte aligned when using sha512_update() -DECLSPEC void sha512_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, const u32 *w4, const u32 *w5, const u32 *w6, const u32 *w7, u64 *digest) +DECLSPEC void sha512_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS const u32 *w4, PRIVATE_AS const u32 *w5, PRIVATE_AS const u32 *w6, PRIVATE_AS const u32 *w7, PRIVATE_AS u64 *digest) { u64 a = digest[0]; u64 b = digest[1]; @@ -129,7 +129,7 @@ DECLSPEC void sha512_transform (const u32 *w0, const u32 *w1, const u32 *w2, con digest[7] += h; } -DECLSPEC void sha512_init (sha512_ctx_t *ctx) +DECLSPEC void sha512_init (PRIVATE_AS sha512_ctx_t *ctx) { ctx->h[0] = SHA512M_A; ctx->h[1] = SHA512M_B; @@ -176,7 +176,7 @@ DECLSPEC void sha512_init (sha512_ctx_t *ctx) ctx->len = 0; } -DECLSPEC void sha512_update_128 (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len) +DECLSPEC void sha512_update_128 (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len) { if (len == 0) return; @@ -380,7 +380,7 @@ DECLSPEC void sha512_update_128 (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u } } -DECLSPEC void sha512_update (sha512_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha512_update (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -468,7 +468,7 @@ DECLSPEC void sha512_update (sha512_ctx_t *ctx, const u32 *w, const int len) sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha512_update_swap (sha512_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha512_update_swap (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -622,7 +622,7 @@ DECLSPEC void sha512_update_swap (sha512_ctx_t *ctx, const u32 *w, const int len sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha512_update_utf16le (sha512_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha512_update_utf16le (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -706,7 +706,7 @@ DECLSPEC void sha512_update_utf16le (sha512_ctx_t *ctx, const u32 *w, const int sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha512_update_utf16le_swap (sha512_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha512_update_utf16le_swap (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -889,7 +889,7 @@ DECLSPEC void sha512_update_utf16le_swap (sha512_ctx_t *ctx, const u32 *w, const sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha512_update_global (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha512_update_global (PRIVATE_AS sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -977,7 +977,7 @@ DECLSPEC void sha512_update_global (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, c sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha512_update_global_swap (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha512_update_global_swap (PRIVATE_AS sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1131,7 +1131,7 @@ DECLSPEC void sha512_update_global_swap (sha512_ctx_t *ctx, GLOBAL_AS const u32 sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha512_update_global_utf16le (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha512_update_global_utf16le (PRIVATE_AS sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -1215,7 +1215,7 @@ DECLSPEC void sha512_update_global_utf16le (sha512_ctx_t *ctx, GLOBAL_AS const u sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha512_update_global_utf16le_swap (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha512_update_global_utf16le_swap (PRIVATE_AS sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -1398,7 +1398,7 @@ DECLSPEC void sha512_update_global_utf16le_swap (sha512_ctx_t *ctx, GLOBAL_AS co sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha512_final (sha512_ctx_t *ctx) +DECLSPEC void sha512_final (PRIVATE_AS sha512_ctx_t *ctx) { const int pos = ctx->len & 127; @@ -1450,7 +1450,7 @@ DECLSPEC void sha512_final (sha512_ctx_t *ctx) // sha512_hmac -DECLSPEC void sha512_hmac_init_128 (sha512_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, const u32 *w4, const u32 *w5, const u32 *w6, const u32 *w7) +DECLSPEC void sha512_hmac_init_128 (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS const u32 *w4, PRIVATE_AS const u32 *w5, PRIVATE_AS const u32 *w6, PRIVATE_AS const u32 *w7) { u32 a0[4]; u32 a1[4]; @@ -1549,7 +1549,7 @@ DECLSPEC void sha512_hmac_init_128 (sha512_hmac_ctx_t *ctx, const u32 *w0, const sha512_update_128 (&ctx->opad, b0, b1, b2, b3, b4, b5, b6, b7, 128); } -DECLSPEC void sha512_hmac_init (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha512_hmac_init (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1642,7 +1642,7 @@ DECLSPEC void sha512_hmac_init (sha512_hmac_ctx_t *ctx, const u32 *w, const int sha512_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -DECLSPEC void sha512_hmac_init_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha512_hmac_init_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1735,7 +1735,7 @@ DECLSPEC void sha512_hmac_init_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const sha512_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -DECLSPEC void sha512_hmac_init_global (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha512_hmac_init_global (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1828,7 +1828,7 @@ DECLSPEC void sha512_hmac_init_global (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u sha512_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -DECLSPEC void sha512_hmac_init_global_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha512_hmac_init_global_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1921,7 +1921,7 @@ DECLSPEC void sha512_hmac_init_global_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS co sha512_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -DECLSPEC void sha512_hmac_init_global_utf16le_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha512_hmac_init_global_utf16le_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -2137,52 +2137,52 @@ DECLSPEC void sha512_hmac_init_global_utf16le_swap (sha512_hmac_ctx_t *ctx, GLOB sha512_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -DECLSPEC void sha512_hmac_update_128 (sha512_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len) +DECLSPEC void sha512_hmac_update_128 (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len) { sha512_update_128 (&ctx->ipad, w0, w1, w2, w3, w4, w5, w6, w7, len); } -DECLSPEC void sha512_hmac_update (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha512_hmac_update (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha512_update (&ctx->ipad, w, len); } -DECLSPEC void sha512_hmac_update_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha512_hmac_update_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha512_update_swap (&ctx->ipad, w, len); } -DECLSPEC void sha512_hmac_update_utf16le (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha512_hmac_update_utf16le (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha512_update_utf16le (&ctx->ipad, w, len); } -DECLSPEC void sha512_hmac_update_utf16le_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void sha512_hmac_update_utf16le_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { sha512_update_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void sha512_hmac_update_global (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha512_hmac_update_global (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha512_update_global (&ctx->ipad, w, len); } -DECLSPEC void sha512_hmac_update_global_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha512_hmac_update_global_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha512_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void sha512_hmac_update_global_utf16le (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha512_hmac_update_global_utf16le (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha512_update_global_utf16le (&ctx->ipad, w, len); } -DECLSPEC void sha512_hmac_update_global_utf16le_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void sha512_hmac_update_global_utf16le_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { sha512_update_global_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void sha512_hmac_final (sha512_hmac_ctx_t *ctx) +DECLSPEC void sha512_hmac_final (PRIVATE_AS sha512_hmac_ctx_t *ctx) { sha512_final (&ctx->ipad); @@ -2226,7 +2226,7 @@ DECLSPEC void sha512_hmac_final (sha512_hmac_ctx_t *ctx) // while input buf can be a vector datatype, the length of the different elements can not -DECLSPEC void sha512_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest) +DECLSPEC void sha512_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS const u32x *w4, PRIVATE_AS const u32x *w5, PRIVATE_AS const u32x *w6, PRIVATE_AS const u32x *w7, PRIVATE_AS u64x *digest) { u64x a = digest[0]; u64x b = digest[1]; @@ -2317,7 +2317,7 @@ DECLSPEC void sha512_transform_vector (const u32x *w0, const u32x *w1, const u32 digest[7] += h; } -DECLSPEC void sha512_init_vector (sha512_ctx_vector_t *ctx) +DECLSPEC void sha512_init_vector (PRIVATE_AS sha512_ctx_vector_t *ctx) { ctx->h[0] = SHA512M_A; ctx->h[1] = SHA512M_B; @@ -2364,7 +2364,7 @@ DECLSPEC void sha512_init_vector (sha512_ctx_vector_t *ctx) ctx->len = 0; } -DECLSPEC void sha512_init_vector_from_scalar (sha512_ctx_vector_t *ctx, sha512_ctx_t *ctx0) +DECLSPEC void sha512_init_vector_from_scalar (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS sha512_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -2411,7 +2411,7 @@ DECLSPEC void sha512_init_vector_from_scalar (sha512_ctx_vector_t *ctx, sha512_c ctx->len = ctx0->len; } -DECLSPEC void sha512_update_vector_128 (sha512_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const int len) +DECLSPEC void sha512_update_vector_128 (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const int len) { if (len == 0) return; @@ -2615,7 +2615,7 @@ DECLSPEC void sha512_update_vector_128 (sha512_ctx_vector_t *ctx, u32x *w0, u32x } } -DECLSPEC void sha512_update_vector (sha512_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha512_update_vector (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2703,7 +2703,7 @@ DECLSPEC void sha512_update_vector (sha512_ctx_vector_t *ctx, const u32x *w, con sha512_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha512_update_vector_swap (sha512_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha512_update_vector_swap (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2857,7 +2857,7 @@ DECLSPEC void sha512_update_vector_swap (sha512_ctx_vector_t *ctx, const u32x *w sha512_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -DECLSPEC void sha512_update_vector_utf16le (sha512_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha512_update_vector_utf16le (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2923,7 +2923,7 @@ DECLSPEC void sha512_update_vector_utf16le (sha512_ctx_vector_t *ctx, const u32x sha512_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha512_update_vector_utf16le_swap (sha512_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha512_update_vector_utf16le_swap (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -3055,7 +3055,7 @@ DECLSPEC void sha512_update_vector_utf16le_swap (sha512_ctx_vector_t *ctx, const sha512_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha512_update_vector_utf16beN (sha512_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha512_update_vector_utf16beN (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -3121,7 +3121,7 @@ DECLSPEC void sha512_update_vector_utf16beN (sha512_ctx_vector_t *ctx, const u32 sha512_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -DECLSPEC void sha512_final_vector (sha512_ctx_vector_t *ctx) +DECLSPEC void sha512_final_vector (PRIVATE_AS sha512_ctx_vector_t *ctx) { const int pos = ctx->len & 127; @@ -3173,7 +3173,7 @@ DECLSPEC void sha512_final_vector (sha512_ctx_vector_t *ctx) // HMAC + Vector -DECLSPEC void sha512_hmac_init_vector_128 (sha512_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7) +DECLSPEC void sha512_hmac_init_vector_128 (PRIVATE_AS sha512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS const u32x *w4, PRIVATE_AS const u32x *w5, PRIVATE_AS const u32x *w6, PRIVATE_AS const u32x *w7) { u32x a0[4]; u32x a1[4]; @@ -3272,7 +3272,7 @@ DECLSPEC void sha512_hmac_init_vector_128 (sha512_hmac_ctx_vector_t *ctx, const sha512_update_vector_128 (&ctx->opad, b0, b1, b2, b3, b4, b5, b6, b7, 128); } -DECLSPEC void sha512_hmac_init_vector (sha512_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha512_hmac_init_vector (PRIVATE_AS sha512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -3365,17 +3365,17 @@ DECLSPEC void sha512_hmac_init_vector (sha512_hmac_ctx_vector_t *ctx, const u32x sha512_hmac_init_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -DECLSPEC void sha512_hmac_update_vector_128 (sha512_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const int len) +DECLSPEC void sha512_hmac_update_vector_128 (PRIVATE_AS sha512_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const int len) { sha512_update_vector_128 (&ctx->ipad, w0, w1, w2, w3, w4, w5, w6, w7, len); } -DECLSPEC void sha512_hmac_update_vector (sha512_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void sha512_hmac_update_vector (PRIVATE_AS sha512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { sha512_update_vector (&ctx->ipad, w, len); } -DECLSPEC void sha512_hmac_final_vector (sha512_hmac_ctx_vector_t *ctx) +DECLSPEC void sha512_hmac_final_vector (PRIVATE_AS sha512_hmac_ctx_vector_t *ctx) { sha512_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha512.h b/OpenCL/inc_hash_sha512.h index c66aa1fb9..94001474a 100644 --- a/OpenCL/inc_hash_sha512.h +++ b/OpenCL/inc_hash_sha512.h @@ -103,48 +103,48 @@ typedef struct sha512_hmac_ctx_vector } sha512_hmac_ctx_vector_t; -DECLSPEC void sha512_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, const u32 *w4, const u32 *w5, const u32 *w6, const u32 *w7, u64 *digest); -DECLSPEC void sha512_init (sha512_ctx_t *ctx); -DECLSPEC void sha512_update_128 (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len); -DECLSPEC void sha512_update (sha512_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_update_swap (sha512_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_update_utf16le (sha512_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_update_utf16le_swap (sha512_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_update_global (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_update_global_swap (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_update_global_utf16le (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_update_global_utf16le_swap (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_final (sha512_ctx_t *ctx); -DECLSPEC void sha512_hmac_init_128 (sha512_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, const u32 *w4, const u32 *w5, const u32 *w6, const u32 *w7); -DECLSPEC void sha512_hmac_init (sha512_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_hmac_init_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_hmac_init_global (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_hmac_init_global_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_hmac_init_global_utf16le_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_128 (sha512_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len); -DECLSPEC void sha512_hmac_update (sha512_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_utf16le (sha512_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_utf16le_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_global (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_global_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_global_utf16le (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_hmac_update_global_utf16le_swap (sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void sha512_hmac_final (sha512_hmac_ctx_t *ctx); -DECLSPEC void sha512_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest); -DECLSPEC void sha512_init_vector (sha512_ctx_vector_t *ctx); -DECLSPEC void sha512_init_vector_from_scalar (sha512_ctx_vector_t *ctx, sha512_ctx_t *ctx0); -DECLSPEC void sha512_update_vector_128 (sha512_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const int len); -DECLSPEC void sha512_update_vector (sha512_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha512_update_vector_swap (sha512_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha512_update_vector_utf16le (sha512_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha512_update_vector_utf16le_swap (sha512_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha512_update_vector_utf16beN (sha512_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha512_final_vector (sha512_ctx_vector_t *ctx); -DECLSPEC void sha512_hmac_init_vector_128 (sha512_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7); -DECLSPEC void sha512_hmac_init_vector (sha512_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha512_hmac_update_vector_128 (sha512_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, const int len); -DECLSPEC void sha512_hmac_update_vector (sha512_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void sha512_hmac_final_vector (sha512_hmac_ctx_vector_t *ctx); +DECLSPEC void sha512_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS const u32 *w4, PRIVATE_AS const u32 *w5, PRIVATE_AS const u32 *w6, PRIVATE_AS const u32 *w7, PRIVATE_AS u64 *digest); +DECLSPEC void sha512_init (PRIVATE_AS sha512_ctx_t *ctx); +DECLSPEC void sha512_update_128 (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len); +DECLSPEC void sha512_update (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha512_update_swap (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha512_update_utf16le (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha512_update_utf16le_swap (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha512_update_global (PRIVATE_AS sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_update_global_swap (PRIVATE_AS sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_update_global_utf16le (PRIVATE_AS sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_update_global_utf16le_swap (PRIVATE_AS sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_final (PRIVATE_AS sha512_ctx_t *ctx); +DECLSPEC void sha512_hmac_init_128 (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS const u32 *w4, PRIVATE_AS const u32 *w5, PRIVATE_AS const u32 *w6, PRIVATE_AS const u32 *w7); +DECLSPEC void sha512_hmac_init (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_init_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_init_global (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_init_global_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_init_global_utf16le_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_update_128 (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len); +DECLSPEC void sha512_hmac_update (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_update_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_update_utf16le (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_update_utf16le_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_update_global (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_update_global_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_update_global_utf16le (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_update_global_utf16le_swap (PRIVATE_AS sha512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void sha512_hmac_final (PRIVATE_AS sha512_hmac_ctx_t *ctx); +DECLSPEC void sha512_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS const u32x *w4, PRIVATE_AS const u32x *w5, PRIVATE_AS const u32x *w6, PRIVATE_AS const u32x *w7, PRIVATE_AS u64x *digest); +DECLSPEC void sha512_init_vector (PRIVATE_AS sha512_ctx_vector_t *ctx); +DECLSPEC void sha512_init_vector_from_scalar (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS sha512_ctx_t *ctx0); +DECLSPEC void sha512_update_vector_128 (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const int len); +DECLSPEC void sha512_update_vector (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha512_update_vector_swap (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha512_update_vector_utf16le (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha512_update_vector_utf16le_swap (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha512_update_vector_utf16beN (PRIVATE_AS sha512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha512_final_vector (PRIVATE_AS sha512_ctx_vector_t *ctx); +DECLSPEC void sha512_hmac_init_vector_128 (PRIVATE_AS sha512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS const u32x *w4, PRIVATE_AS const u32x *w5, PRIVATE_AS const u32x *w6, PRIVATE_AS const u32x *w7); +DECLSPEC void sha512_hmac_init_vector (PRIVATE_AS sha512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha512_hmac_update_vector_128 (PRIVATE_AS sha512_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const int len); +DECLSPEC void sha512_hmac_update_vector (PRIVATE_AS sha512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void sha512_hmac_final_vector (PRIVATE_AS sha512_hmac_ctx_vector_t *ctx); #endif // _INC_HASH_SHA512_H diff --git a/OpenCL/inc_hash_streebog256.cl b/OpenCL/inc_hash_streebog256.cl index 074da7d84..f35ccacf7 100644 --- a/OpenCL/inc_hash_streebog256.cl +++ b/OpenCL/inc_hash_streebog256.cl @@ -593,7 +593,7 @@ CONSTANT_VK u64a sbob256_rc64[12][8] = }, }; -DECLSPEC void streebog256_init (streebog256_ctx_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog256_init (PRIVATE_AS streebog256_ctx_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]) { ctx->h[0] = 0x0101010101010101UL; ctx->h[1] = 0x0101010101010101UL; @@ -647,7 +647,7 @@ DECLSPEC void streebog256_init (streebog256_ctx_t *ctx, SHM_TYPE u64a (*s_sbob_s ctx->s_sbob_sl64 = s_sbob_sl64; } -DECLSPEC void streebog256_add (u64 *x, const u64 *y) +DECLSPEC void streebog256_add (PRIVATE_AS u64 *x, PRIVATE_AS const u64 *y) { u64 carry = 0; @@ -666,7 +666,7 @@ DECLSPEC void streebog256_add (u64 *x, const u64 *y) } } -DECLSPEC void streebog256_g (u64 *h, const u64 *n, const u64 *m, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog256_g (PRIVATE_AS u64 *h, PRIVATE_AS const u64 *n, PRIVATE_AS const u64 *m, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u64 k[8]; u64 s[8]; @@ -734,7 +734,7 @@ DECLSPEC void streebog256_g (u64 *h, const u64 *n, const u64 *m, SHM_TYPE u64a ( } } -DECLSPEC void streebog256_transform (streebog256_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3) +DECLSPEC void streebog256_transform (PRIVATE_AS streebog256_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3) { u64 m[8]; @@ -756,7 +756,7 @@ DECLSPEC void streebog256_transform (streebog256_ctx_t *ctx, const u32 *w0, cons streebog256_add (ctx->s, m); } -DECLSPEC void streebog256_update_64 (streebog256_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void streebog256_update_64 (PRIVATE_AS streebog256_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { if (len == 0) return; @@ -876,7 +876,7 @@ DECLSPEC void streebog256_update_64 (streebog256_ctx_t *ctx, u32 *w0, u32 *w1, u } } -DECLSPEC void streebog256_update (streebog256_ctx_t *ctx, const u32 *w, int len) +DECLSPEC void streebog256_update (PRIVATE_AS streebog256_ctx_t *ctx, PRIVATE_AS const u32 *w, int len) { u32 w0[4]; u32 w1[4]; @@ -933,7 +933,7 @@ DECLSPEC void streebog256_update (streebog256_ctx_t *ctx, const u32 *w, int len) } } -DECLSPEC void streebog256_update_swap (streebog256_ctx_t *ctx, const u32 *w, int len) +DECLSPEC void streebog256_update_swap (PRIVATE_AS streebog256_ctx_t *ctx, PRIVATE_AS const u32 *w, int len) { u32 w0[4]; u32 w1[4]; @@ -990,7 +990,7 @@ DECLSPEC void streebog256_update_swap (streebog256_ctx_t *ctx, const u32 *w, int } } -DECLSPEC void streebog256_update_global_swap (streebog256_ctx_t *ctx, GLOBAL_AS const u32 *w, int len) +DECLSPEC void streebog256_update_global_swap (PRIVATE_AS streebog256_ctx_t *ctx, GLOBAL_AS const u32 *w, int len) { u32 w0[4]; u32 w1[4]; @@ -1047,7 +1047,7 @@ DECLSPEC void streebog256_update_global_swap (streebog256_ctx_t *ctx, GLOBAL_AS } } -DECLSPEC void streebog256_final (streebog256_ctx_t *ctx) +DECLSPEC void streebog256_final (PRIVATE_AS streebog256_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -1080,7 +1080,7 @@ DECLSPEC void streebog256_final (streebog256_ctx_t *ctx) streebog256_g (ctx->h, nullbuf, ctx->s, ctx->s_sbob_sl64); } -DECLSPEC void streebog256_hmac_init_64 (streebog256_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog256_hmac_init_64 (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32 a0[4]; u32 a1[4]; @@ -1139,7 +1139,7 @@ DECLSPEC void streebog256_hmac_init_64 (streebog256_hmac_ctx_t *ctx, const u32 * streebog256_update_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void streebog256_hmac_init (streebog256_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog256_hmac_init (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32 w0[4]; u32 w1[4]; @@ -1196,7 +1196,7 @@ DECLSPEC void streebog256_hmac_init (streebog256_hmac_ctx_t *ctx, const u32 *w, streebog256_hmac_init_64 (ctx, w0, w1, w2, w3, s_sbob_sl64); } -DECLSPEC void streebog256_hmac_init_swap (streebog256_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog256_hmac_init_swap (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32 w0[4]; u32 w1[4]; @@ -1253,27 +1253,27 @@ DECLSPEC void streebog256_hmac_init_swap (streebog256_hmac_ctx_t *ctx, const u32 streebog256_hmac_init_64 (ctx, w0, w1, w2, w3, s_sbob_sl64); } -DECLSPEC void streebog256_hmac_update_64 (streebog256_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void streebog256_hmac_update_64 (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { streebog256_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void streebog256_hmac_update (streebog256_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void streebog256_hmac_update (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { streebog256_update (&ctx->ipad, w, len); } -DECLSPEC void streebog256_hmac_update_swap (streebog256_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void streebog256_hmac_update_swap (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { streebog256_update_swap (&ctx->ipad, w, len); } -DECLSPEC void streebog256_hmac_update_global_swap (streebog256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void streebog256_hmac_update_global_swap (PRIVATE_AS streebog256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { streebog256_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void streebog256_hmac_final (streebog256_hmac_ctx_t *ctx) +DECLSPEC void streebog256_hmac_final (PRIVATE_AS streebog256_hmac_ctx_t *ctx) { streebog256_final (&ctx->ipad); @@ -1299,7 +1299,7 @@ DECLSPEC void streebog256_hmac_final (streebog256_hmac_ctx_t *ctx) streebog256_final (&ctx->opad); } -DECLSPEC void streebog256_init_vector (streebog256_ctx_vector_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog256_init_vector (PRIVATE_AS streebog256_ctx_vector_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]) { ctx->h[0] = 0x0101010101010101UL; ctx->h[1] = 0x0101010101010101UL; @@ -1353,7 +1353,7 @@ DECLSPEC void streebog256_init_vector (streebog256_ctx_vector_t *ctx, SHM_TYPE u ctx->s_sbob_sl64 = s_sbob_sl64; } -DECLSPEC void streebog256_add_vector (u64x *x, const u64x *y) +DECLSPEC void streebog256_add_vector (PRIVATE_AS u64x *x, PRIVATE_AS const u64x *y) { u64x carry = 0; @@ -1372,7 +1372,7 @@ DECLSPEC void streebog256_add_vector (u64x *x, const u64x *y) } } -DECLSPEC void streebog256_g_vector (u64x *h, const u64x *n, const u64x *m, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog256_g_vector (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *n, PRIVATE_AS const u64x *m, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; @@ -1440,7 +1440,7 @@ DECLSPEC void streebog256_g_vector (u64x *h, const u64x *n, const u64x *m, SHM_T } } -DECLSPEC void streebog256_transform_vector (streebog256_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3) +DECLSPEC void streebog256_transform_vector (PRIVATE_AS streebog256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3) { u64x m[8]; @@ -1462,7 +1462,7 @@ DECLSPEC void streebog256_transform_vector (streebog256_ctx_vector_t *ctx, const streebog256_add_vector (ctx->s, m); } -DECLSPEC void streebog256_update_vector_64 (streebog256_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void streebog256_update_vector_64 (PRIVATE_AS streebog256_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { if (len == 0) return; @@ -1582,7 +1582,7 @@ DECLSPEC void streebog256_update_vector_64 (streebog256_ctx_vector_t *ctx, u32x } } -DECLSPEC void streebog256_update_vector (streebog256_ctx_vector_t *ctx, const u32x *w, int len) +DECLSPEC void streebog256_update_vector (PRIVATE_AS streebog256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, int len) { u32x w0[4]; u32x w1[4]; @@ -1639,7 +1639,7 @@ DECLSPEC void streebog256_update_vector (streebog256_ctx_vector_t *ctx, const u3 } } -DECLSPEC void streebog256_update_vector_swap (streebog256_ctx_vector_t *ctx, const u32x *w, int len) +DECLSPEC void streebog256_update_vector_swap (PRIVATE_AS streebog256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, int len) { u32x w0[4]; u32x w1[4]; @@ -1696,7 +1696,7 @@ DECLSPEC void streebog256_update_vector_swap (streebog256_ctx_vector_t *ctx, con } } -DECLSPEC void streebog256_final_vector (streebog256_ctx_vector_t *ctx) +DECLSPEC void streebog256_final_vector (PRIVATE_AS streebog256_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -1729,7 +1729,7 @@ DECLSPEC void streebog256_final_vector (streebog256_ctx_vector_t *ctx) streebog256_g_vector (ctx->h, nullbuf, ctx->s, ctx->s_sbob_sl64); } -DECLSPEC void streebog256_hmac_init_vector_64 (streebog256_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog256_hmac_init_vector_64 (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32x a0[4]; u32x a1[4]; @@ -1788,7 +1788,7 @@ DECLSPEC void streebog256_hmac_init_vector_64 (streebog256_hmac_ctx_vector_t *ct streebog256_update_vector_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void streebog256_hmac_init_vector (streebog256_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog256_hmac_init_vector (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32x w0[4]; u32x w1[4]; @@ -1845,7 +1845,7 @@ DECLSPEC void streebog256_hmac_init_vector (streebog256_hmac_ctx_vector_t *ctx, streebog256_hmac_init_vector_64 (ctx, w0, w1, w2, w3, s_sbob_sl64); } -DECLSPEC void streebog256_hmac_init_vector_swap (streebog256_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog256_hmac_init_vector_swap (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32x w0[4]; u32x w1[4]; @@ -1902,17 +1902,17 @@ DECLSPEC void streebog256_hmac_init_vector_swap (streebog256_hmac_ctx_vector_t * streebog256_hmac_init_vector_64 (ctx, w0, w1, w2, w3, s_sbob_sl64); } -DECLSPEC void streebog256_hmac_update_vector (streebog256_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void streebog256_hmac_update_vector (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { streebog256_update_vector (&ctx->ipad, w, len); } -DECLSPEC void streebog256_hmac_update_vector_swap (streebog256_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void streebog256_hmac_update_vector_swap (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { streebog256_update_vector_swap (&ctx->ipad, w, len); } -DECLSPEC void streebog256_hmac_final_vector (streebog256_hmac_ctx_vector_t *ctx) +DECLSPEC void streebog256_hmac_final_vector (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx) { streebog256_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_streebog256.h b/OpenCL/inc_hash_streebog256.h index 71e87cf96..46fc09563 100644 --- a/OpenCL/inc_hash_streebog256.h +++ b/OpenCL/inc_hash_streebog256.h @@ -86,36 +86,36 @@ typedef struct streebog256_hmac_ctx_vector } streebog256_hmac_ctx_vector_t; -DECLSPEC void streebog256_init (streebog256_ctx_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog256_add (u64 *x, const u64 *y); -DECLSPEC void streebog256_g (u64 *h, const u64 *n, const u64 *m, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog256_transform (streebog256_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3); -DECLSPEC void streebog256_update_64 (streebog256_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void streebog256_update (streebog256_ctx_t *ctx, const u32 *w, int len); -DECLSPEC void streebog256_update_swap (streebog256_ctx_t *ctx, const u32 *w, int len); -DECLSPEC void streebog256_update_global_swap (streebog256_ctx_t *ctx, GLOBAL_AS const u32 *w, int len); -DECLSPEC void streebog256_final (streebog256_ctx_t *ctx); -DECLSPEC void streebog256_hmac_init_64 (streebog256_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog256_hmac_init (streebog256_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog256_hmac_init_swap (streebog256_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog256_hmac_update_64 (streebog256_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void streebog256_hmac_update (streebog256_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void streebog256_hmac_update_swap (streebog256_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void streebog256_hmac_update_global_swap (streebog256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void streebog256_hmac_final (streebog256_hmac_ctx_t *ctx); -DECLSPEC void streebog256_init_vector (streebog256_ctx_vector_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog256_add_vector (u64x *x, const u64x *y); -DECLSPEC void streebog256_g_vector (u64x *h, const u64x *n, const u64x *m, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog256_transform_vector (streebog256_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3); -DECLSPEC void streebog256_update_vector_64 (streebog256_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void streebog256_update_vector (streebog256_ctx_vector_t *ctx, const u32x *w, int len); -DECLSPEC void streebog256_update_vector_swap (streebog256_ctx_vector_t *ctx, const u32x *w, int len); -DECLSPEC void streebog256_final_vector (streebog256_ctx_vector_t *ctx); -DECLSPEC void streebog256_hmac_init_vector_64 (streebog256_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog256_hmac_init_vector (streebog256_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog256_hmac_init_vector_swap (streebog256_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog256_hmac_update_vector (streebog256_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void streebog256_hmac_update_vector_swap (streebog256_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void streebog256_hmac_final_vector (streebog256_hmac_ctx_vector_t *ctx); +DECLSPEC void streebog256_init (PRIVATE_AS streebog256_ctx_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog256_add (PRIVATE_AS u64 *x, PRIVATE_AS const u64 *y); +DECLSPEC void streebog256_g (PRIVATE_AS u64 *h, PRIVATE_AS const u64 *n, PRIVATE_AS const u64 *m, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog256_transform (PRIVATE_AS streebog256_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3); +DECLSPEC void streebog256_update_64 (PRIVATE_AS streebog256_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void streebog256_update (PRIVATE_AS streebog256_ctx_t *ctx, PRIVATE_AS const u32 *w, int len); +DECLSPEC void streebog256_update_swap (PRIVATE_AS streebog256_ctx_t *ctx, PRIVATE_AS const u32 *w, int len); +DECLSPEC void streebog256_update_global_swap (PRIVATE_AS streebog256_ctx_t *ctx, GLOBAL_AS const u32 *w, int len); +DECLSPEC void streebog256_final (PRIVATE_AS streebog256_ctx_t *ctx); +DECLSPEC void streebog256_hmac_init_64 (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog256_hmac_init (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog256_hmac_init_swap (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog256_hmac_update_64 (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void streebog256_hmac_update (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void streebog256_hmac_update_swap (PRIVATE_AS streebog256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void streebog256_hmac_update_global_swap (PRIVATE_AS streebog256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void streebog256_hmac_final (PRIVATE_AS streebog256_hmac_ctx_t *ctx); +DECLSPEC void streebog256_init_vector (PRIVATE_AS streebog256_ctx_vector_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog256_add_vector (PRIVATE_AS u64x *x, PRIVATE_AS const u64x *y); +DECLSPEC void streebog256_g_vector (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *n, PRIVATE_AS const u64x *m, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog256_transform_vector (PRIVATE_AS streebog256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3); +DECLSPEC void streebog256_update_vector_64 (PRIVATE_AS streebog256_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void streebog256_update_vector (PRIVATE_AS streebog256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, int len); +DECLSPEC void streebog256_update_vector_swap (PRIVATE_AS streebog256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, int len); +DECLSPEC void streebog256_final_vector (PRIVATE_AS streebog256_ctx_vector_t *ctx); +DECLSPEC void streebog256_hmac_init_vector_64 (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog256_hmac_init_vector (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog256_hmac_init_vector_swap (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog256_hmac_update_vector (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void streebog256_hmac_update_vector_swap (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void streebog256_hmac_final_vector (PRIVATE_AS streebog256_hmac_ctx_vector_t *ctx); #endif // _INC_HASH_STREEBOG256_H diff --git a/OpenCL/inc_hash_streebog512.cl b/OpenCL/inc_hash_streebog512.cl index f52780096..559d2d6f3 100644 --- a/OpenCL/inc_hash_streebog512.cl +++ b/OpenCL/inc_hash_streebog512.cl @@ -593,7 +593,7 @@ CONSTANT_VK u64a sbob512_rc64[12][8] = }, }; -DECLSPEC void streebog512_init (streebog512_ctx_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog512_init (PRIVATE_AS streebog512_ctx_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]) { ctx->h[0] = 0; ctx->h[1] = 0; @@ -647,7 +647,7 @@ DECLSPEC void streebog512_init (streebog512_ctx_t *ctx, SHM_TYPE u64a (*s_sbob_s ctx->s_sbob_sl64 = s_sbob_sl64; } -DECLSPEC void streebog512_add (u64 *x, const u64 *y) +DECLSPEC void streebog512_add (PRIVATE_AS u64 *x, PRIVATE_AS const u64 *y) { u64 carry = 0; @@ -666,7 +666,7 @@ DECLSPEC void streebog512_add (u64 *x, const u64 *y) } } -DECLSPEC void streebog512_g (u64 *h, const u64 *n, const u64 *m, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog512_g (PRIVATE_AS u64 *h, PRIVATE_AS const u64 *n, PRIVATE_AS const u64 *m, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u64 k[8]; u64 s[8]; @@ -734,7 +734,7 @@ DECLSPEC void streebog512_g (u64 *h, const u64 *n, const u64 *m, SHM_TYPE u64a ( } } -DECLSPEC void streebog512_transform (streebog512_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3) +DECLSPEC void streebog512_transform (PRIVATE_AS streebog512_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3) { u64 m[8]; @@ -756,7 +756,7 @@ DECLSPEC void streebog512_transform (streebog512_ctx_t *ctx, const u32 *w0, cons streebog512_add (ctx->s, m); } -DECLSPEC void streebog512_update_64 (streebog512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void streebog512_update_64 (PRIVATE_AS streebog512_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { if (len == 0) return; @@ -876,7 +876,7 @@ DECLSPEC void streebog512_update_64 (streebog512_ctx_t *ctx, u32 *w0, u32 *w1, u } } -DECLSPEC void streebog512_update (streebog512_ctx_t *ctx, const u32 *w, int len) +DECLSPEC void streebog512_update (PRIVATE_AS streebog512_ctx_t *ctx, PRIVATE_AS const u32 *w, int len) { u32 w0[4]; u32 w1[4]; @@ -933,7 +933,7 @@ DECLSPEC void streebog512_update (streebog512_ctx_t *ctx, const u32 *w, int len) } } -DECLSPEC void streebog512_update_swap (streebog512_ctx_t *ctx, const u32 *w, int len) +DECLSPEC void streebog512_update_swap (PRIVATE_AS streebog512_ctx_t *ctx, PRIVATE_AS const u32 *w, int len) { u32 w0[4]; u32 w1[4]; @@ -990,7 +990,7 @@ DECLSPEC void streebog512_update_swap (streebog512_ctx_t *ctx, const u32 *w, int } } -DECLSPEC void streebog512_update_global_swap (streebog512_ctx_t *ctx, GLOBAL_AS const u32 *w, int len) +DECLSPEC void streebog512_update_global_swap (PRIVATE_AS streebog512_ctx_t *ctx, GLOBAL_AS const u32 *w, int len) { u32 w0[4]; u32 w1[4]; @@ -1047,7 +1047,7 @@ DECLSPEC void streebog512_update_global_swap (streebog512_ctx_t *ctx, GLOBAL_AS } } -DECLSPEC void streebog512_final (streebog512_ctx_t *ctx) +DECLSPEC void streebog512_final (PRIVATE_AS streebog512_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -1080,7 +1080,7 @@ DECLSPEC void streebog512_final (streebog512_ctx_t *ctx) streebog512_g (ctx->h, nullbuf, ctx->s, ctx->s_sbob_sl64); } -DECLSPEC void streebog512_hmac_init_64 (streebog512_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog512_hmac_init_64 (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32 a0[4]; u32 a1[4]; @@ -1139,7 +1139,7 @@ DECLSPEC void streebog512_hmac_init_64 (streebog512_hmac_ctx_t *ctx, const u32 * streebog512_update_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void streebog512_hmac_init (streebog512_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog512_hmac_init (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32 w0[4]; u32 w1[4]; @@ -1196,7 +1196,7 @@ DECLSPEC void streebog512_hmac_init (streebog512_hmac_ctx_t *ctx, const u32 *w, streebog512_hmac_init_64 (ctx, w0, w1, w2, w3, s_sbob_sl64); } -DECLSPEC void streebog512_hmac_init_swap (streebog512_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog512_hmac_init_swap (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32 w0[4]; u32 w1[4]; @@ -1253,27 +1253,27 @@ DECLSPEC void streebog512_hmac_init_swap (streebog512_hmac_ctx_t *ctx, const u32 streebog512_hmac_init_64 (ctx, w0, w1, w2, w3, s_sbob_sl64); } -DECLSPEC void streebog512_hmac_update_64 (streebog512_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void streebog512_hmac_update_64 (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { streebog512_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void streebog512_hmac_update (streebog512_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void streebog512_hmac_update (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { streebog512_update (&ctx->ipad, w, len); } -DECLSPEC void streebog512_hmac_update_swap (streebog512_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void streebog512_hmac_update_swap (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { streebog512_update_swap (&ctx->ipad, w, len); } -DECLSPEC void streebog512_hmac_update_global_swap (streebog512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void streebog512_hmac_update_global_swap (PRIVATE_AS streebog512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { streebog512_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void streebog512_hmac_final (streebog512_hmac_ctx_t *ctx) +DECLSPEC void streebog512_hmac_final (PRIVATE_AS streebog512_hmac_ctx_t *ctx) { streebog512_final (&ctx->ipad); @@ -1318,7 +1318,7 @@ DECLSPEC void streebog512_hmac_final (streebog512_hmac_ctx_t *ctx) streebog512_final (&ctx->opad); } -DECLSPEC void streebog512_init_vector (streebog512_ctx_vector_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog512_init_vector (PRIVATE_AS streebog512_ctx_vector_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]) { ctx->h[0] = 0; ctx->h[1] = 0; @@ -1372,7 +1372,7 @@ DECLSPEC void streebog512_init_vector (streebog512_ctx_vector_t *ctx, SHM_TYPE u ctx->s_sbob_sl64 = s_sbob_sl64; } -DECLSPEC void streebog512_add_vector (u64x *x, const u64x *y) +DECLSPEC void streebog512_add_vector (PRIVATE_AS u64x *x, PRIVATE_AS const u64x *y) { u64x carry = 0; @@ -1391,7 +1391,7 @@ DECLSPEC void streebog512_add_vector (u64x *x, const u64x *y) } } -DECLSPEC void streebog512_g_vector (u64x *h, const u64x *n, const u64x *m, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog512_g_vector (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *n, PRIVATE_AS const u64x *m, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; @@ -1459,7 +1459,7 @@ DECLSPEC void streebog512_g_vector (u64x *h, const u64x *n, const u64x *m, SHM_T } } -DECLSPEC void streebog512_transform_vector (streebog512_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3) +DECLSPEC void streebog512_transform_vector (PRIVATE_AS streebog512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3) { u64x m[8]; @@ -1481,7 +1481,7 @@ DECLSPEC void streebog512_transform_vector (streebog512_ctx_vector_t *ctx, const streebog512_add_vector (ctx->s, m); } -DECLSPEC void streebog512_update_vector_64 (streebog512_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void streebog512_update_vector_64 (PRIVATE_AS streebog512_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { if (len == 0) return; @@ -1601,7 +1601,7 @@ DECLSPEC void streebog512_update_vector_64 (streebog512_ctx_vector_t *ctx, u32x } } -DECLSPEC void streebog512_update_vector (streebog512_ctx_vector_t *ctx, const u32x *w, int len) +DECLSPEC void streebog512_update_vector (PRIVATE_AS streebog512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, int len) { u32x w0[4]; u32x w1[4]; @@ -1658,7 +1658,7 @@ DECLSPEC void streebog512_update_vector (streebog512_ctx_vector_t *ctx, const u3 } } -DECLSPEC void streebog512_update_vector_swap (streebog512_ctx_vector_t *ctx, const u32x *w, int len) +DECLSPEC void streebog512_update_vector_swap (PRIVATE_AS streebog512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, int len) { u32x w0[4]; u32x w1[4]; @@ -1715,7 +1715,7 @@ DECLSPEC void streebog512_update_vector_swap (streebog512_ctx_vector_t *ctx, con } } -DECLSPEC void streebog512_final_vector (streebog512_ctx_vector_t *ctx) +DECLSPEC void streebog512_final_vector (PRIVATE_AS streebog512_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -1748,7 +1748,7 @@ DECLSPEC void streebog512_final_vector (streebog512_ctx_vector_t *ctx) streebog512_g_vector (ctx->h, nullbuf, ctx->s, ctx->s_sbob_sl64); } -DECLSPEC void streebog512_hmac_init_vector_64 (streebog512_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog512_hmac_init_vector_64 (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32x a0[4]; u32x a1[4]; @@ -1807,7 +1807,7 @@ DECLSPEC void streebog512_hmac_init_vector_64 (streebog512_hmac_ctx_vector_t *ct streebog512_update_vector_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void streebog512_hmac_init_vector (streebog512_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog512_hmac_init_vector (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32x w0[4]; u32x w1[4]; @@ -1864,7 +1864,7 @@ DECLSPEC void streebog512_hmac_init_vector (streebog512_hmac_ctx_vector_t *ctx, streebog512_hmac_init_vector_64 (ctx, w0, w1, w2, w3, s_sbob_sl64); } -DECLSPEC void streebog512_hmac_init_vector_swap (streebog512_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void streebog512_hmac_init_vector_swap (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) { u32x w0[4]; u32x w1[4]; @@ -1921,17 +1921,17 @@ DECLSPEC void streebog512_hmac_init_vector_swap (streebog512_hmac_ctx_vector_t * streebog512_hmac_init_vector_64 (ctx, w0, w1, w2, w3, s_sbob_sl64); } -DECLSPEC void streebog512_hmac_update_vector (streebog512_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void streebog512_hmac_update_vector (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { streebog512_update_vector (&ctx->ipad, w, len); } -DECLSPEC void streebog512_hmac_update_vector_swap (streebog512_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void streebog512_hmac_update_vector_swap (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { streebog512_update_vector_swap (&ctx->ipad, w, len); } -DECLSPEC void streebog512_hmac_final_vector (streebog512_hmac_ctx_vector_t *ctx) +DECLSPEC void streebog512_hmac_final_vector (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx) { streebog512_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_streebog512.h b/OpenCL/inc_hash_streebog512.h index e038181c7..dae421738 100644 --- a/OpenCL/inc_hash_streebog512.h +++ b/OpenCL/inc_hash_streebog512.h @@ -98,36 +98,36 @@ typedef struct streebog512_hmac_ctx_vector } streebog512_hmac_ctx_vector_t; -DECLSPEC void streebog512_init (streebog512_ctx_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog512_add (u64 *x, const u64 *y); -DECLSPEC void streebog512_g (u64 *h, const u64 *n, const u64 *m, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog512_transform (streebog512_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3); -DECLSPEC void streebog512_update_64 (streebog512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void streebog512_update (streebog512_ctx_t *ctx, const u32 *w, int len); -DECLSPEC void streebog512_update_swap (streebog512_ctx_t *ctx, const u32 *w, int len); -DECLSPEC void streebog512_update_global_swap (streebog512_ctx_t *ctx, GLOBAL_AS const u32 *w, int len); -DECLSPEC void streebog512_final (streebog512_ctx_t *ctx); -DECLSPEC void streebog512_hmac_init_64 (streebog512_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog512_hmac_init (streebog512_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog512_hmac_init_swap (streebog512_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog512_hmac_update_64 (streebog512_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void streebog512_hmac_update (streebog512_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void streebog512_hmac_update_swap (streebog512_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void streebog512_hmac_update_global_swap (streebog512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void streebog512_hmac_final (streebog512_hmac_ctx_t *ctx); -DECLSPEC void streebog512_init_vector (streebog512_ctx_vector_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog512_add_vector (u64x *x, const u64x *y); -DECLSPEC void streebog512_g_vector (u64x *h, const u64x *n, const u64x *m, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog512_transform_vector (streebog512_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3); -DECLSPEC void streebog512_update_vector_64 (streebog512_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void streebog512_update_vector (streebog512_ctx_vector_t *ctx, const u32x *w, int len); -DECLSPEC void streebog512_update_vector_swap (streebog512_ctx_vector_t *ctx, const u32x *w, int len); -DECLSPEC void streebog512_final_vector (streebog512_ctx_vector_t *ctx); -DECLSPEC void streebog512_hmac_init_vector_64 (streebog512_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog512_hmac_init_vector (streebog512_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog512_hmac_init_vector_swap (streebog512_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); -DECLSPEC void streebog512_hmac_update_vector (streebog512_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void streebog512_hmac_update_vector_swap (streebog512_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void streebog512_hmac_final_vector (streebog512_hmac_ctx_vector_t *ctx); +DECLSPEC void streebog512_init (PRIVATE_AS streebog512_ctx_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog512_add (PRIVATE_AS u64 *x, PRIVATE_AS const u64 *y); +DECLSPEC void streebog512_g (PRIVATE_AS u64 *h, PRIVATE_AS const u64 *n, PRIVATE_AS const u64 *m, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog512_transform (PRIVATE_AS streebog512_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3); +DECLSPEC void streebog512_update_64 (PRIVATE_AS streebog512_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void streebog512_update (PRIVATE_AS streebog512_ctx_t *ctx, PRIVATE_AS const u32 *w, int len); +DECLSPEC void streebog512_update_swap (PRIVATE_AS streebog512_ctx_t *ctx, PRIVATE_AS const u32 *w, int len); +DECLSPEC void streebog512_update_global_swap (PRIVATE_AS streebog512_ctx_t *ctx, GLOBAL_AS const u32 *w, int len); +DECLSPEC void streebog512_final (PRIVATE_AS streebog512_ctx_t *ctx); +DECLSPEC void streebog512_hmac_init_64 (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog512_hmac_init (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog512_hmac_init_swap (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog512_hmac_update_64 (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void streebog512_hmac_update (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void streebog512_hmac_update_swap (PRIVATE_AS streebog512_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void streebog512_hmac_update_global_swap (PRIVATE_AS streebog512_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void streebog512_hmac_final (PRIVATE_AS streebog512_hmac_ctx_t *ctx); +DECLSPEC void streebog512_init_vector (PRIVATE_AS streebog512_ctx_vector_t *ctx, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog512_add_vector (PRIVATE_AS u64x *x, PRIVATE_AS const u64x *y); +DECLSPEC void streebog512_g_vector (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *n, PRIVATE_AS const u64x *m, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog512_transform_vector (PRIVATE_AS streebog512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3); +DECLSPEC void streebog512_update_vector_64 (PRIVATE_AS streebog512_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void streebog512_update_vector (PRIVATE_AS streebog512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, int len); +DECLSPEC void streebog512_update_vector_swap (PRIVATE_AS streebog512_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, int len); +DECLSPEC void streebog512_final_vector (PRIVATE_AS streebog512_ctx_vector_t *ctx); +DECLSPEC void streebog512_hmac_init_vector_64 (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog512_hmac_init_vector (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog512_hmac_init_vector_swap (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]); +DECLSPEC void streebog512_hmac_update_vector (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void streebog512_hmac_update_vector_swap (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void streebog512_hmac_final_vector (PRIVATE_AS streebog512_hmac_ctx_vector_t *ctx); #endif // _INC_HASH_STREEBOG512_H diff --git a/OpenCL/inc_hash_whirlpool.cl b/OpenCL/inc_hash_whirlpool.cl index 01853f5a0..67ba34c8a 100644 --- a/OpenCL/inc_hash_whirlpool.cl +++ b/OpenCL/inc_hash_whirlpool.cl @@ -636,7 +636,7 @@ CONSTANT_VK u64a MT7[256] = S7 = L7 ^ K7; \ } -DECLSPEC void whirlpool_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { u64 W0 = hl32_to_64_S (w0[0], w0[1]); u64 W1 = hl32_to_64_S (w0[2], w0[3]); @@ -712,7 +712,7 @@ DECLSPEC void whirlpool_transform (const u32 *w0, const u32 *w1, const u32 *w2, digest[15] = l32_from_64_S (D7); } -DECLSPEC void whirlpool_init (whirlpool_ctx_t *ctx, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_init (PRIVATE_AS whirlpool_ctx_t *ctx, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { ctx->h[ 0] = 0; ctx->h[ 1] = 0; @@ -760,7 +760,7 @@ DECLSPEC void whirlpool_init (whirlpool_ctx_t *ctx, SHM_TYPE u64 *s_MT0, SHM_TYP ctx->s_MT7 = s_MT7; } -DECLSPEC void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void whirlpool_update_64 (PRIVATE_AS whirlpool_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { if (len == 0) return; @@ -880,7 +880,7 @@ DECLSPEC void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 *w0, u32 *w1, u32 * } } -DECLSPEC void whirlpool_update (whirlpool_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void whirlpool_update (PRIVATE_AS whirlpool_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -932,7 +932,7 @@ DECLSPEC void whirlpool_update (whirlpool_ctx_t *ctx, const u32 *w, const int le whirlpool_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void whirlpool_update_swap (whirlpool_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void whirlpool_update_swap (PRIVATE_AS whirlpool_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1018,7 +1018,7 @@ DECLSPEC void whirlpool_update_swap (whirlpool_ctx_t *ctx, const u32 *w, const i whirlpool_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void whirlpool_update_utf16le (whirlpool_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void whirlpool_update_utf16le (PRIVATE_AS whirlpool_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -1078,7 +1078,7 @@ DECLSPEC void whirlpool_update_utf16le (whirlpool_ctx_t *ctx, const u32 *w, cons whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void whirlpool_update_utf16le_swap (whirlpool_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void whirlpool_update_utf16le_swap (PRIVATE_AS whirlpool_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { if (hc_enc_scan (w, len)) { @@ -1189,7 +1189,7 @@ DECLSPEC void whirlpool_update_utf16le_swap (whirlpool_ctx_t *ctx, const u32 *w, whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void whirlpool_update_global (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void whirlpool_update_global (PRIVATE_AS whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1241,7 +1241,7 @@ DECLSPEC void whirlpool_update_global (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 whirlpool_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void whirlpool_update_global_swap (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void whirlpool_update_global_swap (PRIVATE_AS whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1327,7 +1327,7 @@ DECLSPEC void whirlpool_update_global_swap (whirlpool_ctx_t *ctx, GLOBAL_AS cons whirlpool_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void whirlpool_update_global_utf16le (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void whirlpool_update_global_utf16le (PRIVATE_AS whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -1387,7 +1387,7 @@ DECLSPEC void whirlpool_update_global_utf16le (whirlpool_ctx_t *ctx, GLOBAL_AS c whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void whirlpool_update_global_utf16le_swap (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void whirlpool_update_global_utf16le_swap (PRIVATE_AS whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { if (hc_enc_scan_global (w, len)) { @@ -1498,7 +1498,7 @@ DECLSPEC void whirlpool_update_global_utf16le_swap (whirlpool_ctx_t *ctx, GLOBAL whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void whirlpool_final (whirlpool_ctx_t *ctx) +DECLSPEC void whirlpool_final (PRIVATE_AS whirlpool_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -1534,7 +1534,7 @@ DECLSPEC void whirlpool_final (whirlpool_ctx_t *ctx) // whirlpool_hmac -DECLSPEC void whirlpool_hmac_init_64 (whirlpool_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_hmac_init_64 (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { u32 a0[4]; u32 a1[4]; @@ -1593,7 +1593,7 @@ DECLSPEC void whirlpool_hmac_init_64 (whirlpool_hmac_ctx_t *ctx, const u32 *w0, whirlpool_update_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void whirlpool_hmac_init (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_hmac_init (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { u32 w0[4]; u32 w1[4]; @@ -1650,7 +1650,7 @@ DECLSPEC void whirlpool_hmac_init (whirlpool_hmac_ctx_t *ctx, const u32 *w, cons whirlpool_hmac_init_64 (ctx, w0, w1, w2, w3, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } -DECLSPEC void whirlpool_hmac_init_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_hmac_init_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { u32 w0[4]; u32 w1[4]; @@ -1707,7 +1707,7 @@ DECLSPEC void whirlpool_hmac_init_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, whirlpool_hmac_init_64 (ctx, w0, w1, w2, w3, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } -DECLSPEC void whirlpool_hmac_init_global (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_hmac_init_global (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { u32 w0[4]; u32 w1[4]; @@ -1764,7 +1764,7 @@ DECLSPEC void whirlpool_hmac_init_global (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS c whirlpool_hmac_init_64 (ctx, w0, w1, w2, w3, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } -DECLSPEC void whirlpool_hmac_init_global_swap (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_hmac_init_global_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { u32 w0[4]; u32 w1[4]; @@ -1821,52 +1821,52 @@ DECLSPEC void whirlpool_hmac_init_global_swap (whirlpool_hmac_ctx_t *ctx, GLOBAL whirlpool_hmac_init_64 (ctx, w0, w1, w2, w3, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } -DECLSPEC void whirlpool_hmac_update_64 (whirlpool_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void whirlpool_hmac_update_64 (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { whirlpool_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void whirlpool_hmac_update (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void whirlpool_hmac_update (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { whirlpool_update (&ctx->ipad, w, len); } -DECLSPEC void whirlpool_hmac_update_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void whirlpool_hmac_update_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { whirlpool_update_swap (&ctx->ipad, w, len); } -DECLSPEC void whirlpool_hmac_update_utf16le (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void whirlpool_hmac_update_utf16le (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { whirlpool_update_utf16le (&ctx->ipad, w, len); } -DECLSPEC void whirlpool_hmac_update_utf16le_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void whirlpool_hmac_update_utf16le_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { whirlpool_update_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void whirlpool_hmac_update_global (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void whirlpool_hmac_update_global (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { whirlpool_update_global (&ctx->ipad, w, len); } -DECLSPEC void whirlpool_hmac_update_global_swap (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void whirlpool_hmac_update_global_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { whirlpool_update_global_swap (&ctx->ipad, w, len); } -DECLSPEC void whirlpool_hmac_update_global_utf16le (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void whirlpool_hmac_update_global_utf16le (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { whirlpool_update_global_utf16le (&ctx->ipad, w, len); } -DECLSPEC void whirlpool_hmac_update_global_utf16le_swap (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void whirlpool_hmac_update_global_utf16le_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { whirlpool_update_global_utf16le_swap (&ctx->ipad, w, len); } -DECLSPEC void whirlpool_hmac_final (whirlpool_hmac_ctx_t *ctx) +DECLSPEC void whirlpool_hmac_final (PRIVATE_AS whirlpool_hmac_ctx_t *ctx) { whirlpool_final (&ctx->ipad); @@ -1991,7 +1991,7 @@ DECLSPEC void whirlpool_hmac_final (whirlpool_hmac_ctx_t *ctx) S7 = L7 ^ K7; \ } -DECLSPEC void whirlpool_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { u64x W0 = hl32_to_64 (w0[0], w0[1]); u64x W1 = hl32_to_64 (w0[2], w0[3]); @@ -2067,7 +2067,7 @@ DECLSPEC void whirlpool_transform_vector (const u32x *w0, const u32x *w1, const digest[15] = l32_from_64 (D7); } -DECLSPEC void whirlpool_init_vector (whirlpool_ctx_vector_t *ctx, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_init_vector (PRIVATE_AS whirlpool_ctx_vector_t *ctx, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { ctx->h[ 0] = 0; ctx->h[ 1] = 0; @@ -2115,7 +2115,7 @@ DECLSPEC void whirlpool_init_vector (whirlpool_ctx_vector_t *ctx, SHM_TYPE u64 * ctx->s_MT7 = s_MT7; } -DECLSPEC void whirlpool_init_vector_from_scalar (whirlpool_ctx_vector_t *ctx, whirlpool_ctx_t *ctx0) +DECLSPEC void whirlpool_init_vector_from_scalar (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS whirlpool_ctx_t *ctx0) { ctx->h[ 0] = ctx0->h[ 0]; ctx->h[ 1] = ctx0->h[ 1]; @@ -2163,7 +2163,7 @@ DECLSPEC void whirlpool_init_vector_from_scalar (whirlpool_ctx_vector_t *ctx, wh ctx->s_MT7 = ctx0->s_MT7; } -DECLSPEC void whirlpool_update_vector_64 (whirlpool_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void whirlpool_update_vector_64 (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { if (len == 0) return; @@ -2283,7 +2283,7 @@ DECLSPEC void whirlpool_update_vector_64 (whirlpool_ctx_vector_t *ctx, u32x *w0, } } -DECLSPEC void whirlpool_update_vector (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void whirlpool_update_vector (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2335,7 +2335,7 @@ DECLSPEC void whirlpool_update_vector (whirlpool_ctx_vector_t *ctx, const u32x * whirlpool_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void whirlpool_update_vector_swap (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void whirlpool_update_vector_swap (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2421,7 +2421,7 @@ DECLSPEC void whirlpool_update_vector_swap (whirlpool_ctx_vector_t *ctx, const u whirlpool_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -DECLSPEC void whirlpool_update_vector_utf16le (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void whirlpool_update_vector_utf16le (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2463,7 +2463,7 @@ DECLSPEC void whirlpool_update_vector_utf16le (whirlpool_ctx_vector_t *ctx, cons whirlpool_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void whirlpool_update_vector_utf16le_swap (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void whirlpool_update_vector_utf16le_swap (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2539,7 +2539,7 @@ DECLSPEC void whirlpool_update_vector_utf16le_swap (whirlpool_ctx_vector_t *ctx, whirlpool_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -DECLSPEC void whirlpool_final_vector (whirlpool_ctx_vector_t *ctx) +DECLSPEC void whirlpool_final_vector (PRIVATE_AS whirlpool_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -2575,7 +2575,7 @@ DECLSPEC void whirlpool_final_vector (whirlpool_ctx_vector_t *ctx) // HMAC + Vector -DECLSPEC void whirlpool_hmac_init_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_hmac_init_vector_64 (PRIVATE_AS whirlpool_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { u32x a0[4]; u32x a1[4]; @@ -2634,7 +2634,7 @@ DECLSPEC void whirlpool_hmac_init_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, c whirlpool_update_vector_64 (&ctx->opad, b0, b1, b2, b3, 64); } -DECLSPEC void whirlpool_hmac_init_vector (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_hmac_init_vector (PRIVATE_AS whirlpool_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { u32x w0[4]; u32x w1[4]; @@ -2691,17 +2691,17 @@ DECLSPEC void whirlpool_hmac_init_vector (whirlpool_hmac_ctx_vector_t *ctx, cons whirlpool_hmac_init_vector_64 (ctx, w0, w1, w2, w3, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } -DECLSPEC void whirlpool_hmac_update_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void whirlpool_hmac_update_vector_64 (PRIVATE_AS whirlpool_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { whirlpool_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -DECLSPEC void whirlpool_hmac_update_vector (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void whirlpool_hmac_update_vector (PRIVATE_AS whirlpool_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { whirlpool_update_vector (&ctx->ipad, w, len); } -DECLSPEC void whirlpool_hmac_final_vector (whirlpool_hmac_ctx_vector_t *ctx) +DECLSPEC void whirlpool_hmac_final_vector (PRIVATE_AS whirlpool_hmac_ctx_vector_t *ctx) { whirlpool_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_whirlpool.h b/OpenCL/inc_hash_whirlpool.h index e13ec9960..2cc65e7f9 100644 --- a/OpenCL/inc_hash_whirlpool.h +++ b/OpenCL/inc_hash_whirlpool.h @@ -84,46 +84,46 @@ typedef struct whirlpool_hmac_ctx_vector } whirlpool_hmac_ctx_vector_t; -DECLSPEC void whirlpool_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); -DECLSPEC void whirlpool_init (whirlpool_ctx_t *ctx, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); -DECLSPEC void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void whirlpool_update (whirlpool_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void whirlpool_update_swap (whirlpool_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void whirlpool_update_utf16le (whirlpool_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void whirlpool_update_utf16le_swap (whirlpool_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void whirlpool_update_global (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void whirlpool_update_global_swap (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void whirlpool_update_global_utf16le (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void whirlpool_update_global_utf16le_swap (whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void whirlpool_final (whirlpool_ctx_t *ctx); -DECLSPEC void whirlpool_hmac_init_64 (whirlpool_hmac_ctx_t *ctx, const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); -DECLSPEC void whirlpool_hmac_init (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); -DECLSPEC void whirlpool_hmac_init_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); -DECLSPEC void whirlpool_hmac_init_global (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); -DECLSPEC void whirlpool_hmac_init_global_swap (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); -DECLSPEC void whirlpool_hmac_update_64 (whirlpool_hmac_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len); -DECLSPEC void whirlpool_hmac_update (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_update_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_update_utf16le (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_update_utf16le_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_update_global (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_update_global_swap (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_update_global_utf16le (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_update_global_utf16le_swap (whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); -DECLSPEC void whirlpool_hmac_final (whirlpool_hmac_ctx_t *ctx); -DECLSPEC void whirlpool_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); -DECLSPEC void whirlpool_init_vector (whirlpool_ctx_vector_t *ctx, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); -DECLSPEC void whirlpool_init_vector_from_scalar (whirlpool_ctx_vector_t *ctx, whirlpool_ctx_t *ctx0); -DECLSPEC void whirlpool_update_vector_64 (whirlpool_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void whirlpool_update_vector (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void whirlpool_update_vector_swap (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void whirlpool_update_vector_utf16le (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void whirlpool_update_vector_utf16le_swap (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void whirlpool_final_vector (whirlpool_ctx_vector_t *ctx); -DECLSPEC void whirlpool_hmac_init_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); -DECLSPEC void whirlpool_hmac_init_vector (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); -DECLSPEC void whirlpool_hmac_update_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len); -DECLSPEC void whirlpool_hmac_update_vector (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w, const int len); -DECLSPEC void whirlpool_hmac_final_vector (whirlpool_hmac_ctx_vector_t *ctx); +DECLSPEC void whirlpool_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); +DECLSPEC void whirlpool_init (PRIVATE_AS whirlpool_ctx_t *ctx, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); +DECLSPEC void whirlpool_update_64 (PRIVATE_AS whirlpool_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void whirlpool_update (PRIVATE_AS whirlpool_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void whirlpool_update_swap (PRIVATE_AS whirlpool_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void whirlpool_update_utf16le (PRIVATE_AS whirlpool_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void whirlpool_update_utf16le_swap (PRIVATE_AS whirlpool_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void whirlpool_update_global (PRIVATE_AS whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void whirlpool_update_global_swap (PRIVATE_AS whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void whirlpool_update_global_utf16le (PRIVATE_AS whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void whirlpool_update_global_utf16le_swap (PRIVATE_AS whirlpool_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void whirlpool_final (PRIVATE_AS whirlpool_ctx_t *ctx); +DECLSPEC void whirlpool_hmac_init_64 (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); +DECLSPEC void whirlpool_hmac_init (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); +DECLSPEC void whirlpool_hmac_init_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); +DECLSPEC void whirlpool_hmac_init_global (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); +DECLSPEC void whirlpool_hmac_init_global_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); +DECLSPEC void whirlpool_hmac_update_64 (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len); +DECLSPEC void whirlpool_hmac_update (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void whirlpool_hmac_update_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void whirlpool_hmac_update_utf16le (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void whirlpool_hmac_update_utf16le_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len); +DECLSPEC void whirlpool_hmac_update_global (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void whirlpool_hmac_update_global_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void whirlpool_hmac_update_global_utf16le (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void whirlpool_hmac_update_global_utf16le_swap (PRIVATE_AS whirlpool_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len); +DECLSPEC void whirlpool_hmac_final (PRIVATE_AS whirlpool_hmac_ctx_t *ctx); +DECLSPEC void whirlpool_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); +DECLSPEC void whirlpool_init_vector (PRIVATE_AS whirlpool_ctx_vector_t *ctx, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); +DECLSPEC void whirlpool_init_vector_from_scalar (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS whirlpool_ctx_t *ctx0); +DECLSPEC void whirlpool_update_vector_64 (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void whirlpool_update_vector (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void whirlpool_update_vector_swap (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void whirlpool_update_vector_utf16le (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void whirlpool_update_vector_utf16le_swap (PRIVATE_AS whirlpool_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void whirlpool_final_vector (PRIVATE_AS whirlpool_ctx_vector_t *ctx); +DECLSPEC void whirlpool_hmac_init_vector_64 (PRIVATE_AS whirlpool_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); +DECLSPEC void whirlpool_hmac_init_vector (PRIVATE_AS whirlpool_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7); +DECLSPEC void whirlpool_hmac_update_vector_64 (PRIVATE_AS whirlpool_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len); +DECLSPEC void whirlpool_hmac_update_vector (PRIVATE_AS whirlpool_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); +DECLSPEC void whirlpool_hmac_final_vector (PRIVATE_AS whirlpool_hmac_ctx_vector_t *ctx); #endif // _INC_HASH_WHIRLPOOL_H diff --git a/OpenCL/inc_luks_aes.cl b/OpenCL/inc_luks_aes.cl index 8406ec1eb..9ba6bbc30 100644 --- a/OpenCL/inc_luks_aes.cl +++ b/OpenCL/inc_luks_aes.cl @@ -15,7 +15,7 @@ // cbc-essiv -DECLSPEC void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes128_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { aes128_decrypt (ks1, in, out, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -30,7 +30,7 @@ DECLSPEC void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 * essiv[3] = in[3]; } -DECLSPEC void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes256_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { aes256_decrypt (ks1, in, out, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -45,7 +45,7 @@ DECLSPEC void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 * essiv[3] = in[3]; } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -79,7 +79,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128 (GLOBAL_AS const u32 *in, u32 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -116,7 +116,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -176,7 +176,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1_final (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -213,7 +213,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -273,7 +273,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -310,7 +310,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -370,7 +370,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -407,7 +407,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -467,7 +467,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -501,7 +501,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256 (GLOBAL_AS const u32 *in, u32 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -538,7 +538,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -598,7 +598,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1_final (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -635,7 +635,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -695,7 +695,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -732,7 +732,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -792,7 +792,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -829,7 +829,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -891,7 +891,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS // cbc-plain -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -921,7 +921,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain128 (GLOBAL_AS const u32 *in, u32 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -954,7 +954,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1010,7 +1010,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha1_final (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1043,7 +1043,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha256 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1099,7 +1099,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha256_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1132,7 +1132,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha512 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1188,7 +1188,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha512_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1221,7 +1221,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1277,7 +1277,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1307,7 +1307,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain256 (GLOBAL_AS const u32 *in, u32 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1340,7 +1340,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1396,7 +1396,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha1_final (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1429,7 +1429,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha256 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1485,7 +1485,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha256_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1518,7 +1518,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha512 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1574,7 +1574,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha512_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1607,7 +1607,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1665,7 +1665,7 @@ DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160_final (GLOBAL_AS // xts-plain -DECLSPEC void aes128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes128_decrypt_xts (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { out[0] = in[0]; out[1] = in[1]; @@ -1687,7 +1687,7 @@ DECLSPEC void aes128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 * xts_mul2 (T, T); } -DECLSPEC void aes256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes256_decrypt_xts (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { out[0] = in[0]; out[1] = in[1]; @@ -1709,7 +1709,7 @@ DECLSPEC void aes256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 * xts_mul2 (T, T); } -DECLSPEC void luks_decrypt_sector_aes_xts_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1743,7 +1743,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain256 (GLOBAL_AS const u32 *in, u32 } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1780,7 +1780,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha1 (GLOBAL_AS const u32 } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1840,7 +1840,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha1_final (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1877,7 +1877,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha256 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1937,7 +1937,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha256_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1974,7 +1974,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha512 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2034,7 +2034,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha512_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2071,7 +2071,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2131,7 +2131,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain512 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2165,7 +2165,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain512 (GLOBAL_AS const u32 *in, u32 } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2202,7 +2202,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha1 (GLOBAL_AS const u32 } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2262,7 +2262,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha1_final (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2299,7 +2299,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha256 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2359,7 +2359,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha256_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2396,7 +2396,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha512 (GLOBAL_AS const u3 } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2456,7 +2456,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha512_final (GLOBAL_AS co } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2493,7 +2493,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2555,7 +2555,7 @@ DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160_final (GLOBAL_AS // luks helper -DECLSPEC void luks_af_sha1_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_af_sha1_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -2946,7 +2946,7 @@ DECLSPEC void luks_af_sha1_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, } } -DECLSPEC void luks_af_sha256_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_af_sha256_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3305,7 +3305,7 @@ DECLSPEC void luks_af_sha256_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs } } -DECLSPEC void luks_af_sha512_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_af_sha512_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3683,7 +3683,7 @@ DECLSPEC void luks_af_sha512_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs } } -DECLSPEC void luks_af_ripemd160_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void luks_af_ripemd160_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; diff --git a/OpenCL/inc_luks_aes.h b/OpenCL/inc_luks_aes.h index 2806b46a8..29de5bd0c 100644 --- a/OpenCL/inc_luks_aes.h +++ b/OpenCL/inc_luks_aes.h @@ -6,68 +6,68 @@ #ifndef _INC_LUKS_AES_H #define _INC_LUKS_AES_H -DECLSPEC void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void aes128_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void aes256_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void aes128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void aes256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain512 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_af_sha1_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_af_sha256_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_af_sha512_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void luks_af_ripemd160_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void aes128_decrypt_xts (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void aes256_decrypt_xts (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_af_sha1_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_af_sha256_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_af_sha512_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void luks_af_ripemd160_then_aes_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); #endif // _INC_LUKS_AES_H diff --git a/OpenCL/inc_luks_af.cl b/OpenCL/inc_luks_af.cl index 53a03e8cf..91ee3666d 100644 --- a/OpenCL/inc_luks_af.cl +++ b/OpenCL/inc_luks_af.cl @@ -15,7 +15,7 @@ // diffuse functions -DECLSPEC void AF_sha1_diffuse16 (u32 *out) +DECLSPEC void AF_sha1_diffuse16 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; @@ -57,7 +57,7 @@ DECLSPEC void AF_sha1_diffuse16 (u32 *out) out[3] = hc_swap32_S (digest[3]); } -DECLSPEC void AF_sha1_diffuse32 (u32 *out) +DECLSPEC void AF_sha1_diffuse32 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; @@ -131,7 +131,7 @@ DECLSPEC void AF_sha1_diffuse32 (u32 *out) out[7] = hc_swap32_S (digest[2]); } -DECLSPEC void AF_sha1_diffuse64 (u32 *out) +DECLSPEC void AF_sha1_diffuse64 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; @@ -269,7 +269,7 @@ DECLSPEC void AF_sha1_diffuse64 (u32 *out) out[15] = hc_swap32_S (digest[0]); } -DECLSPEC void AF_sha256_diffuse16 (u32 *out) +DECLSPEC void AF_sha256_diffuse16 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; @@ -314,7 +314,7 @@ DECLSPEC void AF_sha256_diffuse16 (u32 *out) out[3] = hc_swap32_S (digest[3]); } -DECLSPEC void AF_sha256_diffuse32 (u32 *out) +DECLSPEC void AF_sha256_diffuse32 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; @@ -363,7 +363,7 @@ DECLSPEC void AF_sha256_diffuse32 (u32 *out) out[7] = hc_swap32_S (digest[7]); } -DECLSPEC void AF_sha256_diffuse64 (u32 *out) +DECLSPEC void AF_sha256_diffuse64 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; @@ -451,7 +451,7 @@ DECLSPEC void AF_sha256_diffuse64 (u32 *out) out[15] = hc_swap32_S (digest[7]); } -DECLSPEC void AF_sha512_diffuse16 (u32 *out) +DECLSPEC void AF_sha512_diffuse16 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; @@ -516,7 +516,7 @@ DECLSPEC void AF_sha512_diffuse16 (u32 *out) out[3] = hc_swap32_S (l32_from_64_S (digest[1])); } -DECLSPEC void AF_sha512_diffuse32 (u32 *out) +DECLSPEC void AF_sha512_diffuse32 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; @@ -585,7 +585,7 @@ DECLSPEC void AF_sha512_diffuse32 (u32 *out) out[7] = hc_swap32_S (l32_from_64_S (digest[3])); } -DECLSPEC void AF_sha512_diffuse64 (u32 *out) +DECLSPEC void AF_sha512_diffuse64 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; @@ -662,7 +662,7 @@ DECLSPEC void AF_sha512_diffuse64 (u32 *out) out[15] = hc_swap32_S (l32_from_64_S (digest[7])); } -DECLSPEC void AF_ripemd160_diffuse16 (u32 *out) +DECLSPEC void AF_ripemd160_diffuse16 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; @@ -704,7 +704,7 @@ DECLSPEC void AF_ripemd160_diffuse16 (u32 *out) out[3] = digest[3]; } -DECLSPEC void AF_ripemd160_diffuse32 (u32 *out) +DECLSPEC void AF_ripemd160_diffuse32 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; @@ -778,7 +778,7 @@ DECLSPEC void AF_ripemd160_diffuse32 (u32 *out) out[7] = digest[2]; } -DECLSPEC void AF_ripemd160_diffuse64 (u32 *out) +DECLSPEC void AF_ripemd160_diffuse64 (PRIVATE_AS u32 *out) { u32 w0[4]; u32 w1[4]; diff --git a/OpenCL/inc_luks_af.h b/OpenCL/inc_luks_af.h index e59a7e3e9..76b4d6a30 100644 --- a/OpenCL/inc_luks_af.h +++ b/OpenCL/inc_luks_af.h @@ -6,17 +6,17 @@ #ifndef _INC_LUKS_AF_H #define _INC_LUKS_AF_H -DECLSPEC void AF_sha1_diffuse16 (u32 *out); -DECLSPEC void AF_sha1_diffuse32 (u32 *out); -DECLSPEC void AF_sha1_diffuse64 (u32 *out); -DECLSPEC void AF_sha256_diffuse16 (u32 *out); -DECLSPEC void AF_sha256_diffuse32 (u32 *out); -DECLSPEC void AF_sha256_diffuse64 (u32 *out); -DECLSPEC void AF_sha512_diffuse16 (u32 *out); -DECLSPEC void AF_sha512_diffuse32 (u32 *out); -DECLSPEC void AF_sha512_diffuse64 (u32 *out); -DECLSPEC void AF_ripemd160_diffuse16 (u32 *out); -DECLSPEC void AF_ripemd160_diffuse32 (u32 *out); -DECLSPEC void AF_ripemd160_diffuse64 (u32 *out); +DECLSPEC void AF_sha1_diffuse16 (PRIVATE_AS u32 *out); +DECLSPEC void AF_sha1_diffuse32 (PRIVATE_AS u32 *out); +DECLSPEC void AF_sha1_diffuse64 (PRIVATE_AS u32 *out); +DECLSPEC void AF_sha256_diffuse16 (PRIVATE_AS u32 *out); +DECLSPEC void AF_sha256_diffuse32 (PRIVATE_AS u32 *out); +DECLSPEC void AF_sha256_diffuse64 (PRIVATE_AS u32 *out); +DECLSPEC void AF_sha512_diffuse16 (PRIVATE_AS u32 *out); +DECLSPEC void AF_sha512_diffuse32 (PRIVATE_AS u32 *out); +DECLSPEC void AF_sha512_diffuse64 (PRIVATE_AS u32 *out); +DECLSPEC void AF_ripemd160_diffuse16 (PRIVATE_AS u32 *out); +DECLSPEC void AF_ripemd160_diffuse32 (PRIVATE_AS u32 *out); +DECLSPEC void AF_ripemd160_diffuse64 (PRIVATE_AS u32 *out); #endif // _INC_LUKS_AF_H diff --git a/OpenCL/inc_luks_essiv.cl b/OpenCL/inc_luks_essiv.cl index 151284bd0..92c8ed954 100644 --- a/OpenCL/inc_luks_essiv.cl +++ b/OpenCL/inc_luks_essiv.cl @@ -10,7 +10,7 @@ #include "inc_hash_sha256.h" #include "inc_luks_essiv.h" -DECLSPEC void ESSIV_sha256_init128 (u32 *key, u32 *essivhash) +DECLSPEC void ESSIV_sha256_init128 (PRIVATE_AS u32 *key, PRIVATE_AS u32 *essivhash) { essivhash[0] = SHA256M_A; essivhash[1] = SHA256M_B; @@ -55,7 +55,7 @@ DECLSPEC void ESSIV_sha256_init128 (u32 *key, u32 *essivhash) essivhash[7] = hc_swap32_S (essivhash[7]); } -DECLSPEC void ESSIV_sha256_init256 (u32 *key, u32 *essivhash) +DECLSPEC void ESSIV_sha256_init256 (PRIVATE_AS u32 *key, PRIVATE_AS u32 *essivhash) { essivhash[0] = SHA256M_A; essivhash[1] = SHA256M_B; diff --git a/OpenCL/inc_luks_essiv.h b/OpenCL/inc_luks_essiv.h index 3fb566f9e..e7e2fce16 100644 --- a/OpenCL/inc_luks_essiv.h +++ b/OpenCL/inc_luks_essiv.h @@ -6,8 +6,8 @@ #ifndef _INC_LUKS_ESSIV_H #define _INC_LUKS_ESSIV_H -DECLSPEC void ESSIV_sha256_transform_S (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest); -DECLSPEC void ESSIV_sha256_init128 (u32 *key, u32 *essivhash); -DECLSPEC void ESSIV_sha256_init256 (u32 *key, u32 *essivhash); +DECLSPEC void ESSIV_sha256_transform_S (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest); +DECLSPEC void ESSIV_sha256_init128 (PRIVATE_AS u32 *key, PRIVATE_AS u32 *essivhash); +DECLSPEC void ESSIV_sha256_init256 (PRIVATE_AS u32 *key, PRIVATE_AS u32 *essivhash); #endif // _INC_LUKS_ESSIV_H diff --git a/OpenCL/inc_luks_serpent.cl b/OpenCL/inc_luks_serpent.cl index 1f75fc6a7..fc1c02616 100644 --- a/OpenCL/inc_luks_serpent.cl +++ b/OpenCL/inc_luks_serpent.cl @@ -11,7 +11,7 @@ // cbc-essiv -DECLSPEC void serpent128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv) +DECLSPEC void serpent128_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv) { serpent128_decrypt (ks1, in, out); @@ -26,7 +26,7 @@ DECLSPEC void serpent128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u essiv[3] = in[3]; } -DECLSPEC void serpent256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv) +DECLSPEC void serpent256_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv) { serpent256_decrypt (ks1, in, out); @@ -41,7 +41,7 @@ DECLSPEC void serpent256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u essiv[3] = in[3]; } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -75,7 +75,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -112,7 +112,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -172,7 +172,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -209,7 +209,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -269,7 +269,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -306,7 +306,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -366,7 +366,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -403,7 +403,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -463,7 +463,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160_final (GLOBA } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -497,7 +497,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -534,7 +534,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -594,7 +594,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -631,7 +631,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -691,7 +691,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -728,7 +728,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -788,7 +788,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -825,7 +825,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -887,7 +887,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160_final (GLOBA // cbc-plain -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -917,7 +917,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -950,7 +950,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1006,7 +1006,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1039,7 +1039,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1095,7 +1095,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1128,7 +1128,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1184,7 +1184,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1217,7 +1217,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1273,7 +1273,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160_final (GLOBA } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1303,7 +1303,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1336,7 +1336,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1392,7 +1392,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1425,7 +1425,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1481,7 +1481,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1514,7 +1514,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1570,7 +1570,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1603,7 +1603,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1661,7 +1661,7 @@ DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160_final (GLOBA // xts-plain -DECLSPEC void serpent128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T) +DECLSPEC void serpent128_decrypt_xts (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T) { out[0] = in[0]; out[1] = in[1]; @@ -1683,7 +1683,7 @@ DECLSPEC void serpent128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u xts_mul2 (T, T); } -DECLSPEC void serpent256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T) +DECLSPEC void serpent256_decrypt_xts (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T) { out[0] = in[0]; out[1] = in[1]; @@ -1705,7 +1705,7 @@ DECLSPEC void serpent256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u xts_mul2 (T, T); } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1739,7 +1739,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain256 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1776,7 +1776,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1836,7 +1836,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1873,7 +1873,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1933,7 +1933,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1970,7 +1970,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2030,7 +2030,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2067,7 +2067,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2127,7 +2127,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160_final (GLOBA } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2161,7 +2161,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain512 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2198,7 +2198,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2258,7 +2258,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2295,7 +2295,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2355,7 +2355,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2392,7 +2392,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2452,7 +2452,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2489,7 +2489,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector) +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2551,7 +2551,7 @@ DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160_final (GLOBA // luks helper -DECLSPEC void luks_af_sha1_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf) +DECLSPEC void luks_af_sha1_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -2910,7 +2910,7 @@ DECLSPEC void luks_af_sha1_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bu } } -DECLSPEC void luks_af_sha256_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf) +DECLSPEC void luks_af_sha256_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3269,7 +3269,7 @@ DECLSPEC void luks_af_sha256_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_ } } -DECLSPEC void luks_af_sha512_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf) +DECLSPEC void luks_af_sha512_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3647,7 +3647,7 @@ DECLSPEC void luks_af_sha512_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_ } } -DECLSPEC void luks_af_ripemd160_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf) +DECLSPEC void luks_af_ripemd160_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; diff --git a/OpenCL/inc_luks_serpent.h b/OpenCL/inc_luks_serpent.h index ecf1e4db5..d6fff7543 100644 --- a/OpenCL/inc_luks_serpent.h +++ b/OpenCL/inc_luks_serpent.h @@ -6,68 +6,68 @@ #ifndef _INC_LUKS_SERPENT_H #define _INC_LUKS_SERPENT_H -DECLSPEC void serpent128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv); -DECLSPEC void serpent256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 sector); +DECLSPEC void serpent128_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv); +DECLSPEC void serpent256_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, const u32 sector); -DECLSPEC void serpent128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T); -DECLSPEC void serpent256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512 (GLOBAL_AS const u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector); -DECLSPEC void luks_af_sha1_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf); -DECLSPEC void luks_af_sha256_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf); -DECLSPEC void luks_af_sha512_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf); -DECLSPEC void luks_af_ripemd160_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf); +DECLSPEC void serpent128_decrypt_xts (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T); +DECLSPEC void serpent256_decrypt_xts (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *ks2, const u32 sector); +DECLSPEC void luks_af_sha1_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf); +DECLSPEC void luks_af_sha256_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf); +DECLSPEC void luks_af_sha512_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf); +DECLSPEC void luks_af_ripemd160_then_serpent_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf); #endif // _INC_LUKS_SERPENT_H diff --git a/OpenCL/inc_luks_twofish.cl b/OpenCL/inc_luks_twofish.cl index 2d2d7d34c..2eed728a8 100644 --- a/OpenCL/inc_luks_twofish.cl +++ b/OpenCL/inc_luks_twofish.cl @@ -11,7 +11,7 @@ // cbc-essiv -DECLSPEC void twofish128_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *essiv) +DECLSPEC void twofish128_decrypt_cbc (PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv) { twofish128_decrypt (sk1, lk1, in, out); @@ -26,7 +26,7 @@ DECLSPEC void twofish128_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 essiv[3] = in[3]; } -DECLSPEC void twofish256_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *essiv) +DECLSPEC void twofish256_decrypt_cbc (PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv) { twofish256_decrypt (sk1, lk1, in, out); @@ -41,7 +41,7 @@ DECLSPEC void twofish256_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 essiv[3] = in[3]; } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -75,7 +75,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -112,7 +112,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -172,7 +172,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -209,7 +209,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -269,7 +269,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -306,7 +306,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -366,7 +366,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -403,7 +403,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -463,7 +463,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160_final (GLOBA } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -497,7 +497,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -534,7 +534,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -594,7 +594,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -631,7 +631,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -691,7 +691,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -728,7 +728,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -788,7 +788,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -825,7 +825,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -887,7 +887,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160_final (GLOBA // cbc-plain -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -917,7 +917,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -950,7 +950,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1006,7 +1006,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1039,7 +1039,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1095,7 +1095,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1128,7 +1128,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1184,7 +1184,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1217,7 +1217,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1273,7 +1273,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160_final (GLOBA } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1303,7 +1303,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1336,7 +1336,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1392,7 +1392,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1425,7 +1425,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1481,7 +1481,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1514,7 +1514,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1570,7 +1570,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1603,7 +1603,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1661,7 +1661,7 @@ DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160_final (GLOBA // xts-plain -DECLSPEC void twofish128_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *T) +DECLSPEC void twofish128_decrypt_xts (PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T) { out[0] = in[0]; out[1] = in[1]; @@ -1683,7 +1683,7 @@ DECLSPEC void twofish128_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 xts_mul2 (T, T); } -DECLSPEC void twofish256_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *T) +DECLSPEC void twofish256_decrypt_xts (PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T) { out[0] = in[0]; out[1] = in[1]; @@ -1705,7 +1705,7 @@ DECLSPEC void twofish256_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 xts_mul2 (T, T); } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1739,7 +1739,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain256 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1776,7 +1776,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1836,7 +1836,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1873,7 +1873,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1933,7 +1933,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1970,7 +1970,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2030,7 +2030,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2067,7 +2067,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2127,7 +2127,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160_final (GLOBA } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2161,7 +2161,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain512 (GLOBAL_AS const u32 *in, } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2198,7 +2198,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha1 (GLOBAL_AS const } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2258,7 +2258,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha1_final (GLOBAL_AS } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2295,7 +2295,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha256 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2355,7 +2355,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha256_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2392,7 +2392,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha512 (GLOBAL_AS cons } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2452,7 +2452,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha512_final (GLOBAL_A } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2489,7 +2489,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160 (GLOBAL_AS c } } -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2551,7 +2551,7 @@ DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160_final (GLOBA // luks helper -DECLSPEC void luks_af_sha1_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf) +DECLSPEC void luks_af_sha1_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -2910,7 +2910,7 @@ DECLSPEC void luks_af_sha1_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bu } } -DECLSPEC void luks_af_sha256_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf) +DECLSPEC void luks_af_sha256_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3269,7 +3269,7 @@ DECLSPEC void luks_af_sha256_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_ } } -DECLSPEC void luks_af_sha512_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf) +DECLSPEC void luks_af_sha512_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3647,7 +3647,7 @@ DECLSPEC void luks_af_sha512_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_ } } -DECLSPEC void luks_af_ripemd160_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf) +DECLSPEC void luks_af_ripemd160_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; diff --git a/OpenCL/inc_luks_twofish.h b/OpenCL/inc_luks_twofish.h index d2c8e172f..45a67c6ed 100644 --- a/OpenCL/inc_luks_twofish.h +++ b/OpenCL/inc_luks_twofish.h @@ -6,68 +6,68 @@ #ifndef _INC_LUKS_TWOFISH_H #define _INC_LUKS_TWOFISH_H -DECLSPEC void twofish128_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *essiv); -DECLSPEC void twofish256_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *essiv); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector); +DECLSPEC void twofish128_decrypt_cbc (PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv); +DECLSPEC void twofish256_decrypt_cbc (PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, const u32 sector); -DECLSPEC void twofish128_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *T); -DECLSPEC void twofish256_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *T); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512 (GLOBAL_AS const u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector); -DECLSPEC void luks_af_sha1_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf); -DECLSPEC void luks_af_sha256_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf); -DECLSPEC void luks_af_sha512_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf); -DECLSPEC void luks_af_ripemd160_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, u32 *pt_buf); +DECLSPEC void twofish128_decrypt_xts (PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T); +DECLSPEC void twofish256_decrypt_xts (PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha1 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha1_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha256 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha256_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha512 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_sha512_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160 (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160_final (GLOBAL_AS const u32 *in, PRIVATE_AS u32 *mk, PRIVATE_AS const u32 *sk1, PRIVATE_AS const u32 *lk1, PRIVATE_AS const u32 *sk2, PRIVATE_AS const u32 *lk2, const u32 sector); +DECLSPEC void luks_af_sha1_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf); +DECLSPEC void luks_af_sha256_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf); +DECLSPEC void luks_af_sha512_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf); +DECLSPEC void luks_af_ripemd160_then_twofish_decrypt (GLOBAL_AS const luks_t *luks_bufs, GLOBAL_AS luks_tmp_t *tmps, PRIVATE_AS u32 *pt_buf); #endif // _INC_LUKS_TWOFISH_H diff --git a/OpenCL/inc_luks_xts.cl b/OpenCL/inc_luks_xts.cl index a3b87abcc..b39ca0cf9 100644 --- a/OpenCL/inc_luks_xts.cl +++ b/OpenCL/inc_luks_xts.cl @@ -9,7 +9,7 @@ #include "inc_common.h" #include "inc_luks_xts.h" -DECLSPEC void xts_mul2 (u32 *in, u32 *out) +DECLSPEC void xts_mul2 (PRIVATE_AS u32 *in, PRIVATE_AS u32 *out) { const u32 c = in[3] >> 31; diff --git a/OpenCL/inc_luks_xts.h b/OpenCL/inc_luks_xts.h index 45aa467ce..20dfbfa88 100644 --- a/OpenCL/inc_luks_xts.h +++ b/OpenCL/inc_luks_xts.h @@ -6,6 +6,6 @@ #ifndef _INC_LUKS_XTS_H #define _INC_LUKS_XTS_H -DECLSPEC void xts_mul2 (u32 *in, u32 *out); +DECLSPEC void xts_mul2 (PRIVATE_AS u32 *in, PRIVATE_AS u32 *out); #endif // _INC_LUKS_XTS_H diff --git a/OpenCL/inc_markov.h b/OpenCL/inc_markov.h new file mode 100644 index 000000000..9d8b73d90 --- /dev/null +++ b/OpenCL/inc_markov.h @@ -0,0 +1,87 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#ifndef _INC_MARKOV_H +#define _INC_MARKOV_H + +#ifdef IS_METAL + +#define KERN_ATTR_L_MARKOV \ + GLOBAL_AS pw_t *pws_buf_l, \ + GLOBAL_AS const cs_t *root_css_buf, \ + GLOBAL_AS const cs_t *markov_css_buf, \ + CONSTANT_AS const u64 &off, \ + CONSTANT_AS const u32 &pw_l_len, \ + CONSTANT_AS const u32 &pw_r_len, \ + CONSTANT_AS const u32 &mask80, \ + CONSTANT_AS const u32 &bits14, \ + CONSTANT_AS const u32 &bits15, \ + CONSTANT_AS const u64 &gid_max, \ + uint hc_gid [[ thread_position_in_grid ]] + +#define KERN_ATTR_R_MARKOV \ + GLOBAL_AS bf_t *pws_buf_r, \ + GLOBAL_AS const cs_t *root_css_buf, \ + GLOBAL_AS const cs_t *markov_css_buf, \ + CONSTANT_AS const u64 &off, \ + CONSTANT_AS const u32 &pw_r_len, \ + CONSTANT_AS const u32 &mask80, \ + CONSTANT_AS const u32 &bits14, \ + CONSTANT_AS const u32 &bits15, \ + CONSTANT_AS const u64 &gid_max, \ + uint hc_gid [[ thread_position_in_grid ]] + +#define KERN_ATTR_C_MARKOV \ + GLOBAL_AS pw_t *pws_buf, \ + GLOBAL_AS const cs_t *root_css_buf, \ + GLOBAL_AS const cs_t *markov_css_buf, \ + CONSTANT_AS const u64 &off, \ + CONSTANT_AS const u32 &pw_len, \ + CONSTANT_AS const u32 &mask80, \ + CONSTANT_AS const u32 &bits14, \ + CONSTANT_AS const u32 &bits15, \ + CONSTANT_AS const u64 &gid_max, \ + uint hc_gid [[ thread_position_in_grid ]] + +#else // CUDA, HIP, OpenCL + +#define KERN_ATTR_L_MARKOV \ + GLOBAL_AS pw_t *pws_buf_l, \ + GLOBAL_AS const cs_t *root_css_buf, \ + GLOBAL_AS const cs_t *markov_css_buf, \ + const u64 off, \ + const u32 pw_l_len, \ + const u32 pw_r_len, \ + const u32 mask80, \ + const u32 bits14, \ + const u32 bits15, \ + const u64 gid_max + +#define KERN_ATTR_R_MARKOV \ + GLOBAL_AS bf_t *pws_buf_r, \ + GLOBAL_AS const cs_t *root_css_buf, \ + GLOBAL_AS const cs_t *markov_css_buf, \ + const u64 off, \ + const u32 pw_r_len, \ + const u32 mask80, \ + const u32 bits14, \ + const u32 bits15, \ + const u64 gid_max + +#define KERN_ATTR_C_MARKOV \ + GLOBAL_AS pw_t *pws_buf, \ + GLOBAL_AS const cs_t *root_css_buf, \ + GLOBAL_AS const cs_t *markov_css_buf, \ + const u64 off, \ + const u32 pw_len, \ + const u32 mask80, \ + const u32 bits14, \ + const u32 bits15, \ + const u64 gid_max + +#endif // IS_METAL + +#endif // _INC_MARKOV_H + diff --git a/OpenCL/inc_platform.cl b/OpenCL/inc_platform.cl index 8ccb034aa..a3fdd392b 100644 --- a/OpenCL/inc_platform.cl +++ b/OpenCL/inc_platform.cl @@ -58,7 +58,7 @@ DECLSPEC u64 rotr64_S (const u64 a, const int n) return out.v64; } -#endif +#endif // IS_AMD #if defined IS_CUDA @@ -81,9 +81,9 @@ CONSTANT_VK u32 generic_constant[8192]; // 32k #define bfs_buf ((const bf_t *) generic_constant) #define words_buf_s ((const bs_word_t *) generic_constant) #define words_buf_r ((const u32x *) generic_constant) -#endif +#endif // ATTACK_KERN -#endif +#endif // ATTACK_EXEC DECLSPEC u32 hc_atomic_dec (GLOBAL_AS u32 *p) { @@ -162,7 +162,7 @@ DECLSPEC u64 rotr64_S (const u64 a, const int n) #define FIXED_THREAD_COUNT(n) __launch_bounds__((n), 0) #define SYNC_THREADS() __syncthreads () -#endif +#endif // IS_CUDA #if defined IS_HIP @@ -185,9 +185,9 @@ CONSTANT_VK u32 generic_constant[8192] __attribute__((used)); // 32k #define bfs_buf ((const bf_t *) generic_constant) #define words_buf_s ((const bs_word_t *) generic_constant) #define words_buf_r ((const u32x *) generic_constant) -#endif +#endif // ATTACK_KERN -#endif +#endif // ATTACK_EXEC DECLSPEC u32 hc_atomic_dec (GLOBAL_AS u32 *p) { @@ -299,7 +299,76 @@ DECLSPEC u64 rotr64_S (const u64 a, const int n) #define FIXED_THREAD_COUNT(n) __launch_bounds__((n), 0) #define SYNC_THREADS() __syncthreads () -#endif +#endif // IS_HIP + +#ifdef IS_METAL + +DECLSPEC u32 hc_atomic_dec (volatile GLOBAL_AS u32 *p) +{ + volatile const u32 val = 1; + volatile GLOBAL_AS atomic_int *pd = (volatile GLOBAL_AS atomic_int *) p; + + return atomic_fetch_sub_explicit (pd, val, memory_order_relaxed); +} + +DECLSPEC u32 hc_atomic_inc (volatile GLOBAL_AS u32 *p) +{ + volatile const u32 val = 1; + volatile GLOBAL_AS atomic_int *pd = (volatile GLOBAL_AS atomic_int *) p; + + return atomic_fetch_add_explicit (pd, val, memory_order_relaxed); +} + +DECLSPEC u32 hc_atomic_or (volatile GLOBAL_AS u32 *p, volatile const u32 val) +{ + volatile GLOBAL_AS atomic_int *pd = (volatile GLOBAL_AS atomic_int *) p; + + return atomic_fetch_or_explicit (pd, val, memory_order_relaxed); +} + +DECLSPEC u32x rotl32 (const u32x a, const int n) +{ + return ((a << n) | ((a >> (32 - n)))); +} + +DECLSPEC u32x rotr32 (const u32x a, const int n) +{ + return ((a >> n) | ((a << (32 - n)))); +} + +DECLSPEC u32 rotl32_S (const u32 a, const int n) +{ + return ((a << n) | ((a >> (32 - n)))); +} + +DECLSPEC u32 rotr32_S (const u32 a, const int n) +{ + return ((a >> n) | ((a << (32 - n)))); +} + +DECLSPEC u64x rotl64 (const u64x a, const int n) +{ + return ((a << n) | ((a >> (64 - n)))); +} + +DECLSPEC u64x rotr64 (const u64x a, const int n) +{ + return ((a >> n) | ((a << (64 - n)))); +} + +DECLSPEC u64 rotl64_S (const u64 a, const int n) +{ + return ((a << n) | ((a >> (64 - n)))); +} + +DECLSPEC u64 rotr64_S (const u64 a, const int n) +{ + return ((a >> n) | ((a << (64 - n)))); +} + +#define FIXED_THREAD_COUNT(n) +#define SYNC_THREADS() threadgroup_barrier (mem_flags::mem_threadgroup) +#endif // IS_METAL #ifdef IS_OPENCL @@ -324,4 +393,4 @@ DECLSPEC u32 hc_atomic_or (volatile GLOBAL_AS u32 *p, volatile const u32 val) #define FIXED_THREAD_COUNT(n) __attribute__((reqd_work_group_size((n), 1, 1))) #define SYNC_THREADS() barrier (CLK_LOCAL_MEM_FENCE) -#endif +#endif // IS_OPENCL diff --git a/OpenCL/inc_platform.h b/OpenCL/inc_platform.h index 916af055a..fef30a15a 100644 --- a/OpenCL/inc_platform.h +++ b/OpenCL/inc_platform.h @@ -19,7 +19,7 @@ DECLSPEC u64x rotl64 (const u64x a, const int n); DECLSPEC u64x rotr64 (const u64x a, const int n); DECLSPEC u64 rotl64_S (const u64 a, const int n); DECLSPEC u64 rotr64_S (const u64 a, const int n); -#endif +#endif // IS_AMD #ifdef IS_CUDA DECLSPEC u32 hc_atomic_dec (volatile GLOBAL_AS u32 *p); @@ -41,7 +41,7 @@ DECLSPEC u64 rotr64_S (const u64 a, const int n); //#define rotate(a,n) (((a) << (n)) | ((a) >> (32 - (n)))) #define bitselect(a,b,c) ((a) ^ ((c) & ((b) ^ (a)))) -#endif +#endif // IS_CUDA #ifdef IS_HIP DECLSPEC u32 hc_atomic_dec (volatile GLOBAL_AS u32 *p); @@ -63,6 +63,28 @@ DECLSPEC u64 rotr64_S (const u64 a, const int n); //#define rotate(a,n) (((a) << (n)) | ((a) >> (32 - (n)))) #define bitselect(a,b,c) ((a) ^ ((c) & ((b) ^ (a)))) -#endif +#endif // IS_HIP + +#ifdef IS_METAL + +DECLSPEC u32 hc_atomic_dec (volatile GLOBAL_AS u32 *p); +DECLSPEC u32 hc_atomic_inc (volatile GLOBAL_AS u32 *p); +DECLSPEC u32 hc_atomic_or (volatile GLOBAL_AS u32 *p, volatile const u32 val); + +#define get_global_id(param) hc_gid +#define get_local_id(param) hc_lid +#define get_local_size(param) hc_lsz + +DECLSPEC u32x rotl32 (const u32x a, const int n); +DECLSPEC u32x rotr32 (const u32x a, const int n); +DECLSPEC u32 rotl32_S (const u32 a, const int n); +DECLSPEC u32 rotr32_S (const u32 a, const int n); +DECLSPEC u64x rotl64 (const u64x a, const int n); +DECLSPEC u64x rotr64 (const u64x a, const int n); +DECLSPEC u64 rotl64_S (const u64 a, const int n); +DECLSPEC u64 rotr64_S (const u64 a, const int n); + +#define bitselect(a,b,c) ((a) ^ ((c) & ((b) ^ (a)))) +#endif // IS_METAL #endif // _INC_PLATFORM_H diff --git a/OpenCL/inc_rp.cl b/OpenCL/inc_rp.cl index 8ad61b27f..0893a272f 100644 --- a/OpenCL/inc_rp.cl +++ b/OpenCL/inc_rp.cl @@ -39,7 +39,7 @@ DECLSPEC u32 generate_cmask (const u32 value) return rmask & ~hmask & lmask; } -DECLSPEC void append_four_byte (const u32 *buf_src, const int off_src, u32 *buf_dst, const int off_dst) +DECLSPEC void append_four_byte (PRIVATE_AS const u32 *buf_src, const int off_src, PRIVATE_AS u32 *buf_dst, const int off_dst) { const int sd = off_src / 4; const int sm = off_src & 3; @@ -62,7 +62,7 @@ DECLSPEC void append_four_byte (const u32 *buf_src, const int off_src, u32 *buf_ buf_dst[dd + 1] |= t1; } -DECLSPEC void append_three_byte (const u32 *buf_src, const int off_src, u32 *buf_dst, const int off_dst) +DECLSPEC void append_three_byte (PRIVATE_AS const u32 *buf_src, const int off_src, PRIVATE_AS u32 *buf_dst, const int off_dst) { const int sd = off_src / 4; const int sm = off_src & 3; @@ -85,7 +85,7 @@ DECLSPEC void append_three_byte (const u32 *buf_src, const int off_src, u32 *buf buf_dst[dd + 1] |= t1; } -DECLSPEC void append_two_byte (const u32 *buf_src, const int off_src, u32 *buf_dst, const int off_dst) +DECLSPEC void append_two_byte (PRIVATE_AS const u32 *buf_src, const int off_src, PRIVATE_AS u32 *buf_dst, const int off_dst) { const int sd = off_src / 4; const int sm = off_src & 3; @@ -108,7 +108,7 @@ DECLSPEC void append_two_byte (const u32 *buf_src, const int off_src, u32 *buf_d buf_dst[dd + 1] |= t1; } -DECLSPEC void append_one_byte (const u32 *buf_src, const int off_src, u32 *buf_dst, const int off_dst) +DECLSPEC void append_one_byte (PRIVATE_AS const u32 *buf_src, const int off_src, PRIVATE_AS u32 *buf_dst, const int off_dst) { const int sd = off_src / 4; const int sm = off_src & 3; @@ -127,7 +127,7 @@ DECLSPEC void append_one_byte (const u32 *buf_src, const int off_src, u32 *buf_d buf_dst[dd] |= t; } -DECLSPEC void append_block (const u32 *buf_src, const int off_src, u32 *buf_dst, const int off_dst, const int len) +DECLSPEC void append_block (PRIVATE_AS const u32 *buf_src, const int off_src, PRIVATE_AS u32 *buf_dst, const int off_dst, const int len) { int i; @@ -146,9 +146,9 @@ DECLSPEC void append_block (const u32 *buf_src, const int off_src, u32 *buf_dst, } } -DECLSPEC void exchange_byte (u32 *buf, const int off_src, const int off_dst) +DECLSPEC void exchange_byte (PRIVATE_AS u32 *buf, const int off_src, const int off_dst) { - u8 *ptr = (u8 *) buf; + PRIVATE_AS u8 *ptr = (PRIVATE_AS u8 *) buf; const u8 tmp = ptr[off_src]; @@ -185,7 +185,7 @@ DECLSPEC void exchange_byte (u32 *buf, const int off_src, const int off_dst) */ } -DECLSPEC int mangle_lrest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_lrest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { for (int i = 0, idx = 0; i < len; i += 4, idx += 1) { @@ -197,7 +197,7 @@ DECLSPEC int mangle_lrest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u return (len); } -DECLSPEC int mangle_lrest_ufirst (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_lrest_ufirst (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { for (int i = 0, idx = 0; i < len; i += 4, idx += 1) { @@ -213,7 +213,7 @@ DECLSPEC int mangle_lrest_ufirst (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u return (len); } -DECLSPEC int mangle_urest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_urest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { for (int i = 0, idx = 0; i < len; i += 4, idx += 1) { @@ -225,7 +225,7 @@ DECLSPEC int mangle_urest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u return (len); } -DECLSPEC int mangle_urest_lfirst (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_urest_lfirst (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { for (int i = 0, idx = 0; i < len; i += 4, idx += 1) { @@ -241,7 +241,7 @@ DECLSPEC int mangle_urest_lfirst (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u return (len); } -DECLSPEC int mangle_trest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_trest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { for (int i = 0, idx = 0; i < len; i += 4, idx += 1) { @@ -253,7 +253,7 @@ DECLSPEC int mangle_trest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u return (len); } -DECLSPEC int mangle_toggle_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_toggle_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { if (p0 >= len) return (len); @@ -269,7 +269,7 @@ DECLSPEC int mangle_toggle_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p return (len); } -DECLSPEC int mangle_toggle_at_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_toggle_at_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { if (len >= RP_PASSWORD_SIZE) return (len); @@ -298,7 +298,7 @@ DECLSPEC int mangle_toggle_at_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const return (len); } -DECLSPEC int mangle_reverse (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_reverse (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { for (int l = 0; l < len / 2; l++) { @@ -310,7 +310,7 @@ DECLSPEC int mangle_reverse (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, return (len); } -DECLSPEC int mangle_dupeword (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_dupeword (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { const int out_len = len * 2; @@ -321,7 +321,7 @@ DECLSPEC int mangle_dupeword (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1 return (out_len); } -DECLSPEC int mangle_dupeword_times (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_dupeword_times (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { const int out_len = (len * p0) + len; @@ -342,7 +342,7 @@ DECLSPEC int mangle_dupeword_times (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const return (out_len); } -DECLSPEC int mangle_reflect (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_reflect (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { const int out_len = len * 2; @@ -360,7 +360,7 @@ DECLSPEC int mangle_reflect (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, return out_len; } -DECLSPEC int mangle_append (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_append (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { const int out_len = len + 1; @@ -371,7 +371,7 @@ DECLSPEC int mangle_append (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, return (out_len); } -DECLSPEC int mangle_prepend (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_prepend (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { const int out_len = len + 1; @@ -387,7 +387,7 @@ DECLSPEC int mangle_prepend (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, return (out_len); } -DECLSPEC int mangle_rotate_left (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_rotate_left (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { for (int l = 0, r = len - 1; r > l; r--) { @@ -397,7 +397,7 @@ DECLSPEC int mangle_rotate_left (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 return (len); } -DECLSPEC int mangle_rotate_right (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_rotate_right (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { for (int l = 0, r = len - 1; l < r; l++) { @@ -407,7 +407,7 @@ DECLSPEC int mangle_rotate_right (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u return (len); } -DECLSPEC int mangle_delete_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_delete_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 >= len) return (len); @@ -421,19 +421,19 @@ DECLSPEC int mangle_delete_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p return (len - 1); } -DECLSPEC int mangle_delete_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_delete_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { return mangle_delete_at (0, p1, buf, len); } -DECLSPEC int mangle_delete_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_delete_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (len == 0) return 0; return mangle_delete_at (len - 1, p1, buf, len); } -DECLSPEC int mangle_extract (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_extract (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 >= len) return (len); @@ -452,7 +452,7 @@ DECLSPEC int mangle_extract (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, return (p1); } -DECLSPEC int mangle_omit (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_omit (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 >= len) return (len); @@ -471,7 +471,7 @@ DECLSPEC int mangle_omit (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 return (len - p1); } -DECLSPEC int mangle_insert (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_insert (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 >= len + 1) return (len); @@ -489,7 +489,7 @@ DECLSPEC int mangle_insert (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, return (out_len); } -DECLSPEC int mangle_overstrike (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_overstrike (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 >= len) return (len); @@ -498,7 +498,7 @@ DECLSPEC int mangle_overstrike (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 return (len); } -DECLSPEC int mangle_truncate_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_truncate_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 >= len) return (len); @@ -510,7 +510,7 @@ DECLSPEC int mangle_truncate_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 return (p0); } -DECLSPEC int mangle_replace (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_replace (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { for (int pos = 0; pos < len; pos++) { @@ -522,7 +522,7 @@ DECLSPEC int mangle_replace (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, return (len); } -DECLSPEC int mangle_purgechar (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_purgechar (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { int out_len = 0; @@ -543,7 +543,7 @@ DECLSPEC int mangle_purgechar (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p return (out_len); } -DECLSPEC int mangle_dupechar_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_dupechar_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { const int out_len = len + p0; @@ -560,7 +560,7 @@ DECLSPEC int mangle_dupechar_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const return (out_len); } -DECLSPEC int mangle_dupechar_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_dupechar_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { const int out_len = len + p0; @@ -577,7 +577,7 @@ DECLSPEC int mangle_dupechar_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const return (out_len); } -DECLSPEC int mangle_dupechar_all (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_dupechar_all (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { const int out_len = len + len; @@ -595,7 +595,7 @@ DECLSPEC int mangle_dupechar_all (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u return (out_len); } -DECLSPEC int mangle_switch_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_switch_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { if (len < 2) return (len); @@ -604,7 +604,7 @@ DECLSPEC int mangle_switch_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u return (len); } -DECLSPEC int mangle_switch_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_switch_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { if (len < 2) return (len); @@ -613,7 +613,7 @@ DECLSPEC int mangle_switch_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 return (len); } -DECLSPEC int mangle_switch_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_switch_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { if (p0 >= len) return (len); if (p1 >= len) return (len); @@ -623,7 +623,7 @@ DECLSPEC int mangle_switch_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p return (len); } -DECLSPEC int mangle_chr_shiftl (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_chr_shiftl (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 >= len) return (len); @@ -632,7 +632,7 @@ DECLSPEC int mangle_chr_shiftl (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 return (len); } -DECLSPEC int mangle_chr_shiftr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_chr_shiftr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 >= len) return (len); @@ -641,7 +641,7 @@ DECLSPEC int mangle_chr_shiftr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 return (len); } -DECLSPEC int mangle_chr_incr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_chr_incr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 >= len) return (len); @@ -650,7 +650,7 @@ DECLSPEC int mangle_chr_incr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1 return (len); } -DECLSPEC int mangle_chr_decr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_chr_decr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 >= len) return (len); @@ -659,7 +659,7 @@ DECLSPEC int mangle_chr_decr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1 return (len); } -DECLSPEC int mangle_replace_np1 (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_replace_np1 (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if ((p0 + 1) >= len) return (len); @@ -668,7 +668,7 @@ DECLSPEC int mangle_replace_np1 (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 return (len); } -DECLSPEC int mangle_replace_nm1 (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_replace_nm1 (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 == 0) return (len); @@ -679,7 +679,7 @@ DECLSPEC int mangle_replace_nm1 (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 return (len); } -DECLSPEC int mangle_dupeblock_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_dupeblock_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 > len) return (len); @@ -697,7 +697,7 @@ DECLSPEC int mangle_dupeblock_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED cons return (out_len); } -DECLSPEC int mangle_dupeblock_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len) +DECLSPEC int mangle_dupeblock_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len) { if (p0 > len) return (len); @@ -715,7 +715,7 @@ DECLSPEC int mangle_dupeblock_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const return (out_len); } -DECLSPEC int mangle_title_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len) +DECLSPEC int mangle_title_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len) { if (len >= RP_PASSWORD_SIZE) return (len); @@ -742,7 +742,7 @@ DECLSPEC int mangle_title_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p return (len); } -DECLSPEC int apply_rule (const u32 name, MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int in_len) +DECLSPEC int apply_rule (const u32 name, MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int in_len) { int out_len = in_len; @@ -757,36 +757,36 @@ DECLSPEC int apply_rule (const u32 name, MAYBE_UNUSED const u8 p0, MAYBE_UNUSED case RULE_OP_MANGLE_TOGGLE_AT_SEP: out_len = mangle_toggle_at_sep (p0, p1, buf, out_len); break; case RULE_OP_MANGLE_REVERSE: out_len = mangle_reverse (p0, p1, buf, out_len); break; case RULE_OP_MANGLE_DUPEWORD: out_len = mangle_dupeword (p0, p1, buf, out_len); break; - case RULE_OP_MANGLE_DUPEWORD_TIMES: out_len = mangle_dupeword_times (p0, p1, (u8 *) buf, out_len); break; + case RULE_OP_MANGLE_DUPEWORD_TIMES: out_len = mangle_dupeword_times (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; case RULE_OP_MANGLE_REFLECT: out_len = mangle_reflect (p0, p1, buf, out_len); break; - case RULE_OP_MANGLE_APPEND: out_len = mangle_append (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_PREPEND: out_len = mangle_prepend (p0, p1, (u8 *) buf, out_len); break; + case RULE_OP_MANGLE_APPEND: out_len = mangle_append (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_PREPEND: out_len = mangle_prepend (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; case RULE_OP_MANGLE_ROTATE_LEFT: out_len = mangle_rotate_left (p0, p1, buf, out_len); break; case RULE_OP_MANGLE_ROTATE_RIGHT: out_len = mangle_rotate_right (p0, p1, buf, out_len); break; - case RULE_OP_MANGLE_DELETE_FIRST: out_len = mangle_delete_first (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_DELETE_LAST: out_len = mangle_delete_last (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_DELETE_AT: out_len = mangle_delete_at (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_EXTRACT: out_len = mangle_extract (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_OMIT: out_len = mangle_omit (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_INSERT: out_len = mangle_insert (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_OVERSTRIKE: out_len = mangle_overstrike (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_TRUNCATE_AT: out_len = mangle_truncate_at (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_REPLACE: out_len = mangle_replace (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_PURGECHAR: out_len = mangle_purgechar (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_DUPECHAR_FIRST: out_len = mangle_dupechar_first (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_DUPECHAR_LAST: out_len = mangle_dupechar_last (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_DUPECHAR_ALL: out_len = mangle_dupechar_all (p0, p1, (u8 *) buf, out_len); break; + case RULE_OP_MANGLE_DELETE_FIRST: out_len = mangle_delete_first (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_DELETE_LAST: out_len = mangle_delete_last (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_DELETE_AT: out_len = mangle_delete_at (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_EXTRACT: out_len = mangle_extract (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_OMIT: out_len = mangle_omit (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_INSERT: out_len = mangle_insert (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_OVERSTRIKE: out_len = mangle_overstrike (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_TRUNCATE_AT: out_len = mangle_truncate_at (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_REPLACE: out_len = mangle_replace (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_PURGECHAR: out_len = mangle_purgechar (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_DUPECHAR_FIRST: out_len = mangle_dupechar_first (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_DUPECHAR_LAST: out_len = mangle_dupechar_last (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_DUPECHAR_ALL: out_len = mangle_dupechar_all (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; case RULE_OP_MANGLE_SWITCH_FIRST: out_len = mangle_switch_first (p0, p1, buf, out_len); break; case RULE_OP_MANGLE_SWITCH_LAST: out_len = mangle_switch_last (p0, p1, buf, out_len); break; case RULE_OP_MANGLE_SWITCH_AT: out_len = mangle_switch_at (p0, p1, buf, out_len); break; - case RULE_OP_MANGLE_CHR_SHIFTL: out_len = mangle_chr_shiftl (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_CHR_SHIFTR: out_len = mangle_chr_shiftr (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_CHR_INCR: out_len = mangle_chr_incr (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_CHR_DECR: out_len = mangle_chr_decr (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_REPLACE_NP1: out_len = mangle_replace_np1 (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_REPLACE_NM1: out_len = mangle_replace_nm1 (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_DUPEBLOCK_FIRST: out_len = mangle_dupeblock_first (p0, p1, (u8 *) buf, out_len); break; - case RULE_OP_MANGLE_DUPEBLOCK_LAST: out_len = mangle_dupeblock_last (p0, p1, (u8 *) buf, out_len); break; + case RULE_OP_MANGLE_CHR_SHIFTL: out_len = mangle_chr_shiftl (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_CHR_SHIFTR: out_len = mangle_chr_shiftr (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_CHR_INCR: out_len = mangle_chr_incr (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_CHR_DECR: out_len = mangle_chr_decr (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_REPLACE_NP1: out_len = mangle_replace_np1 (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_REPLACE_NM1: out_len = mangle_replace_nm1 (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_DUPEBLOCK_FIRST: out_len = mangle_dupeblock_first (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; + case RULE_OP_MANGLE_DUPEBLOCK_LAST: out_len = mangle_dupeblock_last (p0, p1, (PRIVATE_AS u8 *) buf, out_len); break; case RULE_OP_MANGLE_TITLE_SEP: out_len = mangle_title_sep (p0, p1, buf, out_len); break; case RULE_OP_MANGLE_TITLE: out_len = mangle_title_sep (' ', p1, buf, out_len); break; } @@ -794,7 +794,7 @@ DECLSPEC int apply_rule (const u32 name, MAYBE_UNUSED const u8 p0, MAYBE_UNUSED return out_len; } -DECLSPEC int apply_rules (CONSTANT_AS const u32 *cmds, u32 *buf, const int in_len) +DECLSPEC int apply_rules (CONSTANT_AS const u32 *cmds, PRIVATE_AS u32 *buf, const int in_len) { int out_len = in_len; diff --git a/OpenCL/inc_rp.h b/OpenCL/inc_rp.h index 3b91ff9da..cf804f387 100644 --- a/OpenCL/inc_rp.h +++ b/OpenCL/inc_rp.h @@ -72,53 +72,53 @@ #define RP_PASSWORD_SIZE 256 DECLSPEC u32 generate_cmask (const u32 value); -DECLSPEC void append_four_byte (const u32 *buf_src, const int off_src, u32 *buf_dst, const int off_dst); -DECLSPEC void append_three_byte (const u32 *buf_src, const int off_src, u32 *buf_dst, const int off_dst); -DECLSPEC void append_two_byte (const u32 *buf_src, const int off_src, u32 *buf_dst, const int off_dst); -DECLSPEC void append_one_byte (const u32 *buf_src, const int off_src, u32 *buf_dst, const int off_dst); -DECLSPEC void append_block (const u32 *buf_src, const int off_src, u32 *buf_dst, const int off_dst, const int len); -DECLSPEC void exchange_byte (u32 *buf, const int off_src, const int off_dst); -DECLSPEC int mangle_lrest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_lrest_ufirst (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_urest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_urest_lfirst (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_trest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_toggle_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_toggle_at_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_reverse (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_dupeword (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_dupeword_times (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_reflect (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_append (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_prepend (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_rotate_left (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_rotate_right (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_delete_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_delete_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_delete_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_extract (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_omit (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_insert (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_overstrike (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_truncate_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_replace (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_purgechar (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_dupechar_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_dupechar_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_dupechar_all (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_switch_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_switch_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_switch_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int mangle_chr_shiftl (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_chr_shiftr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_chr_incr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_chr_decr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_replace_np1 (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_replace_nm1 (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_dupeblock_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_dupeblock_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); -DECLSPEC int mangle_title_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); -DECLSPEC int apply_rule (const u32 name, MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int in_len); -DECLSPEC int apply_rules (CONSTANT_AS const u32 *cmds, u32 *buf, const int in_len); +DECLSPEC void append_four_byte (PRIVATE_AS const u32 *buf_src, const int off_src, PRIVATE_AS u32 *buf_dst, const int off_dst); +DECLSPEC void append_three_byte (PRIVATE_AS const u32 *buf_src, const int off_src, PRIVATE_AS u32 *buf_dst, const int off_dst); +DECLSPEC void append_two_byte (PRIVATE_AS const u32 *buf_src, const int off_src, PRIVATE_AS u32 *buf_dst, const int off_dst); +DECLSPEC void append_one_byte (PRIVATE_AS const u32 *buf_src, const int off_src, PRIVATE_AS u32 *buf_dst, const int off_dst); +DECLSPEC void append_block (PRIVATE_AS const u32 *buf_src, const int off_src, PRIVATE_AS u32 *buf_dst, const int off_dst, const int len); +DECLSPEC void exchange_byte (PRIVATE_AS u32 *buf, const int off_src, const int off_dst); +DECLSPEC int mangle_lrest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_lrest_ufirst (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_urest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_urest_lfirst (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_trest (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_toggle_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_toggle_at_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_reverse (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_dupeword (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_dupeword_times (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_reflect (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_append (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_prepend (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_rotate_left (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_rotate_right (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_delete_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_delete_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_delete_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_extract (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_omit (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_insert (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_overstrike (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_truncate_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_replace (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_purgechar (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_dupechar_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_dupechar_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_dupechar_all (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_switch_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_switch_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_switch_at (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int mangle_chr_shiftl (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_chr_shiftr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_chr_incr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_chr_decr (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_replace_np1 (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_replace_nm1 (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_dupeblock_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_dupeblock_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u8 *buf, const int len); +DECLSPEC int mangle_title_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int len); +DECLSPEC int apply_rule (const u32 name, MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, PRIVATE_AS u32 *buf, const int in_len); +DECLSPEC int apply_rules (CONSTANT_AS const u32 *cmds, PRIVATE_AS u32 *buf, const int in_len); #endif // _INC_RP_H diff --git a/OpenCL/inc_rp_optimized.cl b/OpenCL/inc_rp_optimized.cl index 8ebe588ea..d5628b652 100644 --- a/OpenCL/inc_rp_optimized.cl +++ b/OpenCL/inc_rp_optimized.cl @@ -24,7 +24,7 @@ DECLSPEC u32 generate_cmask_optimized (const u32 value) return rmask & ~hmask & lmask; } -DECLSPEC void truncate_right_optimized (u32 *buf0, u32 *buf1, const u32 offset) +DECLSPEC void truncate_right_optimized (PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, const u32 offset) { const u32 tmp = (1u << ((offset & 3u) * 8u)) - 1u; @@ -79,7 +79,7 @@ DECLSPEC void truncate_right_optimized (u32 *buf0, u32 *buf1, const u32 offset) } } -DECLSPEC void truncate_left_optimized (u32 *buf0, u32 *buf1, const u32 offset) +DECLSPEC void truncate_left_optimized (PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, const u32 offset) { const u32 tmp = ~((1u << ((offset & 3u) * 8u)) - 1u); @@ -134,7 +134,7 @@ DECLSPEC void truncate_left_optimized (u32 *buf0, u32 *buf1, const u32 offset) } } -DECLSPEC void lshift_block_optimized (const u32 *in0, const u32 *in1, u32 *out0, u32 *out1) +DECLSPEC void lshift_block_optimized (PRIVATE_AS const u32 *in0, PRIVATE_AS const u32 *in1, PRIVATE_AS u32 *out0, PRIVATE_AS u32 *out1) { out0[0] = hc_bytealign_S (in0[0], in0[1], 3); out0[1] = hc_bytealign_S (in0[1], in0[2], 3); @@ -146,7 +146,7 @@ DECLSPEC void lshift_block_optimized (const u32 *in0, const u32 *in1, u32 *out0, out1[3] = hc_bytealign_S (in1[3], 0, 3); } -DECLSPEC void rshift_block_optimized (const u32 *in0, const u32 *in1, u32 *out0, u32 *out1) +DECLSPEC void rshift_block_optimized (PRIVATE_AS const u32 *in0, PRIVATE_AS const u32 *in1, PRIVATE_AS u32 *out0, PRIVATE_AS u32 *out1) { out1[3] = hc_bytealign_S (in1[2], in1[3], 1); out1[2] = hc_bytealign_S (in1[1], in1[2], 1); @@ -158,7 +158,7 @@ DECLSPEC void rshift_block_optimized (const u32 *in0, const u32 *in1, u32 *out0, out0[0] = hc_bytealign_S ( 0, in0[0], 1); } -DECLSPEC void lshift_block_optimized_N (const u32 *in0, const u32 *in1, u32 *out0, u32 *out1, const u32 num) +DECLSPEC void lshift_block_optimized_N (PRIVATE_AS const u32 *in0, PRIVATE_AS const u32 *in1, PRIVATE_AS u32 *out0, PRIVATE_AS u32 *out1, const u32 num) { switch (num) { @@ -453,7 +453,7 @@ DECLSPEC void lshift_block_optimized_N (const u32 *in0, const u32 *in1, u32 *out } } -DECLSPEC void rshift_block_optimized_N (const u32 *in0, const u32 *in1, u32 *out0, u32 *out1, const u32 num) +DECLSPEC void rshift_block_optimized_N (PRIVATE_AS const u32 *in0, PRIVATE_AS const u32 *in1, PRIVATE_AS u32 *out0, PRIVATE_AS u32 *out1, const u32 num) { switch (num) { @@ -748,7 +748,7 @@ DECLSPEC void rshift_block_optimized_N (const u32 *in0, const u32 *in1, u32 *out } } -DECLSPEC void append_block1_optimized (const u32 offset, u32 *buf0, u32 *buf1, const u32 src_r0) +DECLSPEC void append_block1_optimized (const u32 offset, PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, const u32 src_r0) { // this version works with 1 byte append only const u32 value = src_r0 & 0xff; @@ -768,7 +768,7 @@ DECLSPEC void append_block1_optimized (const u32 offset, u32 *buf0, u32 *buf1, c append_helper_1x4_S (buf1, ((offset16 == 1) ? tmp : 0), v); } -DECLSPEC void append_block8_optimized (const u32 offset, u32 *buf0, u32 *buf1, const u32 *src_l0, const u32 *src_l1, const u32 *src_r0, const u32 *src_r1) +DECLSPEC void append_block8_optimized (const u32 offset, PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, PRIVATE_AS const u32 *src_l0, PRIVATE_AS const u32 *src_l1, PRIVATE_AS const u32 *src_r0, PRIVATE_AS const u32 *src_r1) { u32 s0 = 0; u32 s1 = 0; @@ -1010,7 +1010,7 @@ DECLSPEC void append_block8_optimized (const u32 offset, u32 *buf0, u32 *buf1, c buf1[3] = src_l1[3] | s7; } -DECLSPEC void reverse_block_optimized (u32 *in0, u32 *in1, u32 *out0, u32 *out1, const u32 len) +DECLSPEC void reverse_block_optimized (PRIVATE_AS u32 *in0, PRIVATE_AS u32 *in1, PRIVATE_AS u32 *out0, PRIVATE_AS u32 *out1, const u32 len) { rshift_block_optimized_N (in0, in1, out0, out1, 32 - len); @@ -1036,9 +1036,9 @@ DECLSPEC void reverse_block_optimized (u32 *in0, u32 *in1, u32 *out0, u32 *out1, out1[3] = hc_swap32_S (tib41[3]); } -DECLSPEC void exchange_byte_optimized (u32 *buf, const int off_src, const int off_dst) +DECLSPEC void exchange_byte_optimized (PRIVATE_AS u32 *buf, const int off_src, const int off_dst) { - u8 *ptr = (u8 *) buf; + PRIVATE_AS u8 *ptr = (PRIVATE_AS u8 *) buf; const u8 tmp = ptr[off_src]; @@ -1046,7 +1046,7 @@ DECLSPEC void exchange_byte_optimized (u32 *buf, const int off_src, const int of ptr[off_dst] = tmp; } -DECLSPEC HC_INLINE u32 rule_op_mangle_lrest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_lrest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { u32 t; @@ -1062,7 +1062,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_lrest (MAYBE_UNUSED const u32 p0, MAYBE_UN return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_urest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_urest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { u32 t; @@ -1078,7 +1078,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_urest (MAYBE_UNUSED const u32 p0, MAYBE_UN return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_lrest_ufirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_lrest_ufirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { u32 t; @@ -1096,7 +1096,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_lrest_ufirst (MAYBE_UNUSED const u32 p0, M return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_urest_lfirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_urest_lfirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { u32 t; @@ -1114,7 +1114,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_urest_lfirst (MAYBE_UNUSED const u32 p0, M return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_trest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_trest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { u32 t; @@ -1130,7 +1130,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_trest (MAYBE_UNUSED const u32 p0, MAYBE_UN return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 >= in_len) return in_len; @@ -1163,7 +1163,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at (MAYBE_UNUSED const u32 p0, MAYB return (in_len); } -DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (in_len == 0) return in_len; @@ -1239,14 +1239,14 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at_sep (MAYBE_UNUSED const u32 p0, return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_reverse (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_reverse (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { reverse_block_optimized (buf0, buf1, buf0, buf1, in_len); return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if ((in_len + in_len) >= 32) return in_len; @@ -1259,7 +1259,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword (MAYBE_UNUSED const u32 p0, MAYBE return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword_times (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword_times (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (((in_len * p0) + in_len) >= 32) return in_len; @@ -1287,7 +1287,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword_times (MAYBE_UNUSED const u32 p0, return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_reflect (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_reflect (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if ((in_len + in_len) >= 32) return in_len; @@ -1305,7 +1305,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_reflect (MAYBE_UNUSED const u32 p0, MAYBE_ return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_append (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_append (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if ((in_len + 1) >= 32) return in_len; @@ -1318,7 +1318,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_append (MAYBE_UNUSED const u32 p0, MAYBE_U return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_prepend (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_prepend (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if ((in_len + 1) >= 32) return in_len; @@ -1333,7 +1333,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_prepend (MAYBE_UNUSED const u32 p0, MAYBE_ return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_left (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_left (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (in_len == 0) return in_len; @@ -1348,7 +1348,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_left (MAYBE_UNUSED const u32 p0, MA return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_right (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_right (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (in_len == 0) return in_len; @@ -1390,7 +1390,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_right (MAYBE_UNUSED const u32 p0, M return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_delete_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_delete_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (in_len == 0) return in_len; @@ -1401,7 +1401,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_delete_first (MAYBE_UNUSED const u32 p0, M return in_len1; } -DECLSPEC HC_INLINE u32 rule_op_mangle_delete_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_delete_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (in_len == 0) return in_len; @@ -1421,7 +1421,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_delete_last (MAYBE_UNUSED const u32 p0, MA return in_len1; } -DECLSPEC HC_INLINE u32 rule_op_mangle_delete_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_delete_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 >= in_len) return in_len; @@ -1498,7 +1498,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_delete_at (MAYBE_UNUSED const u32 p0, MAYB return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_extract (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_extract (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 >= in_len) return in_len; @@ -1513,7 +1513,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_extract (MAYBE_UNUSED const u32 p0, MAYBE_ return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_omit (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_omit (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 >= in_len) return in_len; @@ -1601,7 +1601,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_omit (MAYBE_UNUSED const u32 p0, MAYBE_UNU return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_insert (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_insert (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 > in_len) return in_len; @@ -1675,7 +1675,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_insert (MAYBE_UNUSED const u32 p0, MAYBE_U return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_overstrike (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_overstrike (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 >= in_len) return in_len; @@ -1710,7 +1710,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_overstrike (MAYBE_UNUSED const u32 p0, MAY return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_truncate_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_truncate_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 >= in_len) return in_len; @@ -1743,7 +1743,7 @@ DECLSPEC u32 replace_on_register (const u32 in, const u32 r, const u32 p1) return out; } -DECLSPEC HC_INLINE u32 rule_op_mangle_replace (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_replace (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { const u32 r0 = search_on_register (buf0[0], p0); const u32 r1 = search_on_register (buf0[1], p0); @@ -1770,7 +1770,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_replace (MAYBE_UNUSED const u32 p0, MAYBE_ return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_purgechar (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_purgechar (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { const u32 r0 = search_on_register (buf0[0], p0); const u32 r1 = search_on_register (buf0[1], p0); @@ -1800,8 +1800,8 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_purgechar (MAYBE_UNUSED const u32 p0, MAYB u32 buf_out[8] = { 0 }; - u8 *in = (u8 *) buf_in; - u8 *out = (u8 *) buf_out; + PRIVATE_AS u8 *in = (PRIVATE_AS u8 *) buf_in; + PRIVATE_AS u8 *out = (PRIVATE_AS u8 *) buf_out; for (u32 pos = 0; pos < in_len; pos++) { @@ -1824,7 +1824,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_purgechar (MAYBE_UNUSED const u32 p0, MAYB return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if ( in_len == 0) return in_len; if ((in_len + p0) >= 32) return in_len; @@ -1859,7 +1859,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_first (MAYBE_UNUSED const u32 p0, return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if ( in_len == 0) return in_len; if ((in_len + p0) >= 32) return in_len; @@ -1905,7 +1905,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_last (MAYBE_UNUSED const u32 p0, return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_all (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_all (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if ( in_len == 0) return in_len; if ((in_len + in_len) >= 32) return in_len; @@ -1938,7 +1938,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_all (MAYBE_UNUSED const u32 p0, M return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_switch_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_switch_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (in_len < 2) return in_len; @@ -1947,7 +1947,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_switch_first (MAYBE_UNUSED const u32 p0, M return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_switch_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_switch_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (in_len < 2) return in_len; @@ -1976,7 +1976,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_switch_last (MAYBE_UNUSED const u32 p0, MA return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_switch_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_switch_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 >= in_len) return in_len; if (p1 >= in_len) return in_len; @@ -2006,7 +2006,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_switch_at (MAYBE_UNUSED const u32 p0, MAYB return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftl (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftl (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 >= in_len) return in_len; @@ -2040,7 +2040,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftl (MAYBE_UNUSED const u32 p0, MAY return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 >= in_len) return in_len; @@ -2074,7 +2074,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftr (MAYBE_UNUSED const u32 p0, MAY return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_chr_incr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_chr_incr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 >= in_len) return in_len; @@ -2110,7 +2110,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_chr_incr (MAYBE_UNUSED const u32 p0, MAYBE return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_chr_decr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_chr_decr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 >= in_len) return in_len; @@ -2146,7 +2146,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_chr_decr (MAYBE_UNUSED const u32 p0, MAYBE return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_replace_np1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_replace_np1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if ((p0 + 1) >= in_len) return in_len; @@ -2186,7 +2186,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_replace_np1 (MAYBE_UNUSED const u32 p0, MA return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_replace_nm1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_replace_nm1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 == 0) return in_len; @@ -2228,7 +2228,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_replace_nm1 (MAYBE_UNUSED const u32 p0, MA return in_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 > in_len) return in_len; @@ -2266,7 +2266,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_first (MAYBE_UNUSED const u32 p0 return out_len; } -DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (p0 > in_len) return in_len; @@ -2309,7 +2309,7 @@ DECLSPEC u32 toggle_on_register (const u32 in, const u32 r) return out; } -DECLSPEC HC_INLINE u32 rule_op_mangle_title_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len) +DECLSPEC HC_INLINE u32 rule_op_mangle_title_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len) { if (in_len == 0) return in_len; @@ -2349,7 +2349,7 @@ DECLSPEC HC_INLINE u32 rule_op_mangle_title_sep (MAYBE_UNUSED const u32 p0, MAYB return in_len; } -DECLSPEC u32 apply_rule_optimized (const u32 name, const u32 p0, const u32 p1, u32 *buf0, u32 *buf1, const u32 in_len) +DECLSPEC u32 apply_rule_optimized (const u32 name, const u32 p0, const u32 p1, PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, const u32 in_len) { u32 out_len = in_len; @@ -2402,7 +2402,7 @@ DECLSPEC u32 apply_rule_optimized (const u32 name, const u32 p0, const u32 p1, u return out_len; } -DECLSPEC u32 apply_rules_optimized (CONSTANT_AS const u32 *cmds, u32 *buf0, u32 *buf1, const u32 len) +DECLSPEC u32 apply_rules_optimized (CONSTANT_AS const u32 *cmds, PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, const u32 len) { u32 out_len = len; @@ -2421,7 +2421,7 @@ DECLSPEC u32 apply_rules_optimized (CONSTANT_AS const u32 *cmds, u32 *buf0, u32 return out_len; } -DECLSPEC u32x apply_rules_vect_optimized (const u32 *pw_buf0, const u32 *pw_buf1, const u32 pw_len, CONSTANT_AS const kernel_rule_t *kernel_rules, const u32 il_pos, u32x *buf0, u32x *buf1) +DECLSPEC u32x apply_rules_vect_optimized (PRIVATE_AS const u32 *pw_buf0, PRIVATE_AS const u32 *pw_buf1, const u32 pw_len, CONSTANT_AS const kernel_rule_t *kernel_rules, const u32 il_pos, PRIVATE_AS u32x *buf0, PRIVATE_AS u32x *buf1) { #if VECT_SIZE == 1 diff --git a/OpenCL/inc_rp_optimized.h b/OpenCL/inc_rp_optimized.h index 3df2bf8d2..63b4d6e9b 100644 --- a/OpenCL/inc_rp_optimized.h +++ b/OpenCL/inc_rp_optimized.h @@ -76,61 +76,61 @@ #define RULE_OP_MANGLE_TITLE 'E' DECLSPEC u32 generate_cmask_optimized (const u32 value); -DECLSPEC void truncate_right_optimized (u32 *buf0, u32 *buf1, const u32 offset); -DECLSPEC void truncate_left_optimized (u32 *buf0, u32 *buf1, const u32 offset); -DECLSPEC void lshift_block_optimized (const u32 *in0, const u32 *in1, u32 *out0, u32 *out1); -DECLSPEC void rshift_block_optimized (const u32 *in0, const u32 *in1, u32 *out0, u32 *out1); -DECLSPEC void lshift_block_optimized_N (const u32 *in0, const u32 *in1, u32 *out0, u32 *out1, const u32 num); -DECLSPEC void rshift_block_optimized_N (const u32 *in0, const u32 *in1, u32 *out0, u32 *out1, const u32 num); -DECLSPEC void append_block1_optimized (const u32 offset, u32 *buf0, u32 *buf1, const u32 src_r0); -DECLSPEC void append_block8_optimized (const u32 offset, u32 *buf0, u32 *buf1, const u32 *src_l0, const u32 *src_l1, const u32 *src_r0, const u32 *src_r1); -DECLSPEC void reverse_block_optimized (u32 *in0, u32 *in1, u32 *out0, u32 *out1, const u32 len); -DECLSPEC void exchange_byte_optimized (u32 *buf, const int off_src, const int off_dst); -DECLSPEC HC_INLINE u32 rule_op_mangle_lrest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_urest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_lrest_ufirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_urest_lfirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_trest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_reverse (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword_times (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_reflect (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_append (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_prepend (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_left (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_right (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_delete_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_delete_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_delete_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_extract (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_omit (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_insert (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_overstrike (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_truncate_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); +DECLSPEC void truncate_right_optimized (PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, const u32 offset); +DECLSPEC void truncate_left_optimized (PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, const u32 offset); +DECLSPEC void lshift_block_optimized (PRIVATE_AS const u32 *in0, PRIVATE_AS const u32 *in1, PRIVATE_AS u32 *out0, PRIVATE_AS u32 *out1); +DECLSPEC void rshift_block_optimized (PRIVATE_AS const u32 *in0, PRIVATE_AS const u32 *in1, PRIVATE_AS u32 *out0, PRIVATE_AS u32 *out1); +DECLSPEC void lshift_block_optimized_N (PRIVATE_AS const u32 *in0, PRIVATE_AS const u32 *in1, PRIVATE_AS u32 *out0, PRIVATE_AS u32 *out1, const u32 num); +DECLSPEC void rshift_block_optimized_N (PRIVATE_AS const u32 *in0, PRIVATE_AS const u32 *in1, PRIVATE_AS u32 *out0, PRIVATE_AS u32 *out1, const u32 num); +DECLSPEC void append_block1_optimized (const u32 offset, PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, const u32 src_r0); +DECLSPEC void append_block8_optimized (const u32 offset, PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, PRIVATE_AS const u32 *src_l0, PRIVATE_AS const u32 *src_l1, PRIVATE_AS const u32 *src_r0, PRIVATE_AS const u32 *src_r1); +DECLSPEC void reverse_block_optimized (PRIVATE_AS u32 *in0, PRIVATE_AS u32 *in1, PRIVATE_AS u32 *out0, PRIVATE_AS u32 *out1, const u32 len); +DECLSPEC void exchange_byte_optimized (PRIVATE_AS u32 *buf, const int off_src, const int off_dst); +DECLSPEC HC_INLINE u32 rule_op_mangle_lrest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_urest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_lrest_ufirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_urest_lfirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_trest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_reverse (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword_times (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_reflect (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_append (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_prepend (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_left (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_right (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_delete_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_delete_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_delete_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_extract (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_omit (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_insert (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_overstrike (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_truncate_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); DECLSPEC u32 search_on_register (const u32 in, const u32 p0); DECLSPEC u32 replace_on_register (const u32 in, const u32 r, const u32 p1); -DECLSPEC HC_INLINE u32 rule_op_mangle_replace (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_purgechar (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_all (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_switch_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_switch_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_switch_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftl (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_chr_incr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_chr_decr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_replace_np1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_replace_nm1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_replace (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_purgechar (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_all (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_switch_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_switch_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_switch_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftl (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_chr_incr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_chr_decr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_replace_np1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_replace_nm1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); DECLSPEC u32 toggle_on_register (const u32 in, const u32 r); -DECLSPEC HC_INLINE u32 rule_op_mangle_title_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); -DECLSPEC u32 apply_rule_optimized (const u32 name, const u32 p0, const u32 p1, u32 *buf0, u32 *buf1, const u32 in_len); -DECLSPEC u32 apply_rules_optimized (CONSTANT_AS const u32 *cmds, u32 *buf0, u32 *buf1, const u32 len); -DECLSPEC u32x apply_rules_vect_optimized (const u32 *pw_buf0, const u32 *pw_buf1, const u32 pw_len, CONSTANT_AS const kernel_rule_t *kernel_rules, const u32 il_pos, u32x *buf0, u32x *buf1); +DECLSPEC HC_INLINE u32 rule_op_mangle_title_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED PRIVATE_AS u32 *buf0, MAYBE_UNUSED PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC u32 apply_rule_optimized (const u32 name, const u32 p0, const u32 p1, PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, const u32 in_len); +DECLSPEC u32 apply_rules_optimized (CONSTANT_AS const u32 *cmds, PRIVATE_AS u32 *buf0, PRIVATE_AS u32 *buf1, const u32 len); +DECLSPEC u32x apply_rules_vect_optimized (PRIVATE_AS const u32 *pw_buf0, PRIVATE_AS const u32 *pw_buf1, const u32 pw_len, CONSTANT_AS const kernel_rule_t *kernel_rules, const u32 il_pos, PRIVATE_AS u32x *buf0, PRIVATE_AS u32x *buf1); #endif // _INC_RP_OPTIMIZED_H diff --git a/OpenCL/inc_shared.h b/OpenCL/inc_shared.h new file mode 100644 index 000000000..e8cd826ed --- /dev/null +++ b/OpenCL/inc_shared.h @@ -0,0 +1,66 @@ +/** + * Author......: See docs/credits.txt + * License.....: MIT + */ + +#ifndef _INC_SHARED_H +#define _INC_SHARED_H + +#ifdef IS_METAL + +#define KERN_ATTR_GPU_DECOMPRESS \ + GLOBAL_AS pw_idx_t *pws_idx, \ + GLOBAL_AS u32 *pws_comp, \ + GLOBAL_AS pw_t *pws_buf, \ + CONSTANT_AS const u64 &gid_max, \ + uint hc_gid [[ thread_position_in_grid ]] + +#define KERN_ATTR_GPU_MEMSET \ + GLOBAL_AS uint4 *buf, \ + CONSTANT_AS const u32 &value, \ + CONSTANT_AS const u64 &gid_max, \ + uint hc_gid [[ thread_position_in_grid ]] + +#define KERN_ATTR_GPU_BZERO \ + GLOBAL_AS uint4 *buf, \ + CONSTANT_AS const u64 &gid_max, \ + uint hc_gid [[ thread_position_in_grid ]] + +#define KERN_ATTR_GPU_ATINIT \ + GLOBAL_AS pw_t *buf, \ + CONSTANT_AS const u64 &gid_max, \ + uint hc_gid [[ thread_position_in_grid ]] + +#define KERN_ATTR_GPU_UTF8_TO_UTF16 \ + GLOBAL_AS pw_t *pws_buf, \ + CONSTANT_AS const u64 &gid_max, \ + uint hc_gid [[ thread_position_in_grid ]] + +#else // CUDA, HIP, OpenCL + +#define KERN_ATTR_GPU_DECOMPRESS \ + GLOBAL_AS pw_idx_t *pws_idx, \ + GLOBAL_AS u32 *pws_comp, \ + GLOBAL_AS pw_t *pws_buf, \ + const u64 gid_max + +#define KERN_ATTR_GPU_MEMSET \ + GLOBAL_AS uint4 *buf, \ + const u32 value, \ + const u64 gid_max + +#define KERN_ATTR_GPU_BZERO \ + GLOBAL_AS uint4 *buf, \ + const u64 gid_max + +#define KERN_ATTR_GPU_ATINIT \ + GLOBAL_AS pw_t *buf, \ + const u64 gid_max + +#define KERN_ATTR_GPU_UTF8_TO_UTF16 \ + GLOBAL_AS pw_t *pws_buf, \ + const u64 gid_max + +#endif // IS_METAL + +#endif // _INC_SHARED_H diff --git a/OpenCL/inc_truecrypt_keyfile.cl b/OpenCL/inc_truecrypt_keyfile.cl index 667aa15fd..1fe324ee9 100644 --- a/OpenCL/inc_truecrypt_keyfile.cl +++ b/OpenCL/inc_truecrypt_keyfile.cl @@ -34,7 +34,7 @@ DECLSPEC u32 u8add (const u32 a, const u32 b) return r; } -DECLSPEC u32 hc_apply_keyfile_tc (u32 *w, const int pw_len, const GLOBAL_AS tc_t *tc) +DECLSPEC u32 hc_apply_keyfile_tc (PRIVATE_AS u32 *w, const int pw_len, const GLOBAL_AS tc_t *tc) { if (tc->keyfile_enabled == 0) return pw_len; diff --git a/OpenCL/inc_truecrypt_keyfile.h b/OpenCL/inc_truecrypt_keyfile.h index 1530b0920..93aaa04d8 100644 --- a/OpenCL/inc_truecrypt_keyfile.h +++ b/OpenCL/inc_truecrypt_keyfile.h @@ -7,6 +7,6 @@ #define _INC_TRUECRYPT_KEYFILE_H DECLSPEC u32 u8add (const u32 a, const u32 b); -DECLSPEC u32 hc_apply_keyfile_tc (u32 *w, const int pw_len, const GLOBAL_AS tc_t *tc); +DECLSPEC u32 hc_apply_keyfile_tc (PRIVATE_AS u32 *w, const int pw_len, const GLOBAL_AS tc_t *tc); #endif // _INC_TRUECRYPT_KEYFILE_H diff --git a/OpenCL/inc_truecrypt_xts.cl b/OpenCL/inc_truecrypt_xts.cl index ceeff8842..c77f43b50 100644 --- a/OpenCL/inc_truecrypt_xts.cl +++ b/OpenCL/inc_truecrypt_xts.cl @@ -13,7 +13,7 @@ #include "inc_truecrypt_crc32.h" #include "inc_truecrypt_xts.h" -DECLSPEC void xts_mul2 (u32 *in, u32 *out) +DECLSPEC void xts_mul2 (PRIVATE_AS u32 *in, PRIVATE_AS u32 *out) { const u32 c = in[3] >> 31; @@ -25,7 +25,7 @@ DECLSPEC void xts_mul2 (u32 *in, u32 *out) out[0] ^= c * 0x87; } -DECLSPEC void aes256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes256_decrypt_xts_first (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { out[0] = in[0]; out[1] = in[1]; @@ -49,7 +49,7 @@ DECLSPEC void aes256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, cons out[3] ^= T[3]; } -DECLSPEC void aes256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes256_decrypt_xts_next (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { out[0] = in[0]; out[1] = in[1]; @@ -71,7 +71,7 @@ DECLSPEC void aes256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks, out[3] ^= T[3]; } -DECLSPEC void serpent256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks) +DECLSPEC void serpent256_decrypt_xts_first (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks) { out[0] = in[0]; out[1] = in[1]; @@ -95,7 +95,7 @@ DECLSPEC void serpent256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, out[3] ^= T[3]; } -DECLSPEC void serpent256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks) +DECLSPEC void serpent256_decrypt_xts_next (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks) { out[0] = in[0]; out[1] = in[1]; @@ -117,7 +117,7 @@ DECLSPEC void serpent256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 out[3] ^= T[3]; } -DECLSPEC void twofish256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *sk, u32 *lk) +DECLSPEC void twofish256_decrypt_xts_first (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk) { out[0] = in[0]; out[1] = in[1]; @@ -141,7 +141,7 @@ DECLSPEC void twofish256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, out[3] ^= T[3]; } -DECLSPEC void twofish256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *sk, u32 *lk) +DECLSPEC void twofish256_decrypt_xts_next (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk) { out[0] = in[0]; out[1] = in[1]; @@ -165,7 +165,7 @@ DECLSPEC void twofish256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 // 512 bit -DECLSPEC int verify_header_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int verify_header_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_aes[60]; @@ -219,7 +219,7 @@ DECLSPEC int verify_header_aes (GLOBAL_AS const u32 *data_buf, const u32 signatu return 1; } -DECLSPEC int verify_header_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2) +DECLSPEC int verify_header_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2) { u32 ks_serpent[140]; @@ -273,7 +273,7 @@ DECLSPEC int verify_header_serpent (GLOBAL_AS const u32 *data_buf, const u32 sig return 1; } -DECLSPEC int verify_header_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2) +DECLSPEC int verify_header_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2) { u32 sk_twofish[4]; u32 lk_twofish[40]; @@ -330,7 +330,7 @@ DECLSPEC int verify_header_twofish (GLOBAL_AS const u32 *data_buf, const u32 sig // 1024 bit -DECLSPEC int verify_header_aes_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int verify_header_aes_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_aes[60]; @@ -391,7 +391,7 @@ DECLSPEC int verify_header_aes_twofish (GLOBAL_AS const u32 *data_buf, const u32 return 1; } -DECLSPEC int verify_header_serpent_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int verify_header_serpent_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_serpent[140]; u32 ks_aes[60]; @@ -450,7 +450,7 @@ DECLSPEC int verify_header_serpent_aes (GLOBAL_AS const u32 *data_buf, const u32 return 1; } -DECLSPEC int verify_header_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4) +DECLSPEC int verify_header_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4) { u32 sk_twofish[4]; u32 lk_twofish[40]; @@ -513,7 +513,7 @@ DECLSPEC int verify_header_twofish_serpent (GLOBAL_AS const u32 *data_buf, const // 1536 bit -DECLSPEC int verify_header_aes_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int verify_header_aes_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, PRIVATE_AS const u32 *ukey5, PRIVATE_AS const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_aes[60]; @@ -580,7 +580,7 @@ DECLSPEC int verify_header_aes_twofish_serpent (GLOBAL_AS const u32 *data_buf, c return 1; } -DECLSPEC int verify_header_serpent_twofish_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int verify_header_serpent_twofish_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, PRIVATE_AS const u32 *ukey5, PRIVATE_AS const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_serpent[140]; diff --git a/OpenCL/inc_truecrypt_xts.h b/OpenCL/inc_truecrypt_xts.h index d820b7d02..8938dba4e 100644 --- a/OpenCL/inc_truecrypt_xts.h +++ b/OpenCL/inc_truecrypt_xts.h @@ -6,20 +6,20 @@ #ifndef _INC_TRUECRYPT_XTS_H #define _INC_TRUECRYPT_XTS_H -DECLSPEC void xts_mul2 (u32 *in, u32 *out); -DECLSPEC void aes256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void aes256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC void serpent256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks); -DECLSPEC void serpent256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks); -DECLSPEC void twofish256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *sk, u32 *lk); -DECLSPEC void twofish256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *sk, u32 *lk); -DECLSPEC int verify_header_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC int verify_header_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2); -DECLSPEC int verify_header_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2); -DECLSPEC int verify_header_aes_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC int verify_header_serpent_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC int verify_header_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4); -DECLSPEC int verify_header_aes_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC int verify_header_serpent_twofish_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void xts_mul2 (PRIVATE_AS u32 *in, PRIVATE_AS u32 *out); +DECLSPEC void aes256_decrypt_xts_first (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void aes256_decrypt_xts_next (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC void serpent256_decrypt_xts_first (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks); +DECLSPEC void serpent256_decrypt_xts_next (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks); +DECLSPEC void twofish256_decrypt_xts_first (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk); +DECLSPEC void twofish256_decrypt_xts_next (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, PRIVATE_AS u32 *sk, PRIVATE_AS u32 *lk); +DECLSPEC int verify_header_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC int verify_header_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2); +DECLSPEC int verify_header_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2); +DECLSPEC int verify_header_aes_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC int verify_header_serpent_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC int verify_header_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4); +DECLSPEC int verify_header_aes_twofish_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, PRIVATE_AS const u32 *ukey5, PRIVATE_AS const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC int verify_header_serpent_twofish_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, PRIVATE_AS const u32 *ukey5, PRIVATE_AS const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); #endif // _INC_TRUECRYPT_XTS_H diff --git a/OpenCL/inc_types.h b/OpenCL/inc_types.h index ef76cf8ab..918e3a7f9 100644 --- a/OpenCL/inc_types.h +++ b/OpenCL/inc_types.h @@ -45,6 +45,14 @@ typedef unsigned long ulong; typedef unsigned long long ullong; #endif +#ifdef IS_METAL +typedef unsigned char uchar; +typedef unsigned short ushort; +typedef unsigned int uint; +typedef unsigned long ulong; +#define ullong ulong +#endif + #ifdef IS_OPENCL typedef ulong ullong; typedef ulong2 ullong2; @@ -57,7 +65,11 @@ typedef ulong16 ullong16; typedef uchar u8; typedef ushort u16; typedef uint u32; +#ifdef IS_METAL +typedef ulong u64; +#else typedef ullong u64; +#endif #else typedef uint8_t u8; typedef uint16_t u16; diff --git a/OpenCL/inc_vendor.h b/OpenCL/inc_vendor.h index 989e1c756..ac13a7c23 100644 --- a/OpenCL/inc_vendor.h +++ b/OpenCL/inc_vendor.h @@ -12,16 +12,25 @@ #define IS_CUDA #elif defined __HIPCC__ #define IS_HIP +#elif defined __METAL_MACOS__ +#define IS_METAL #else #define IS_OPENCL #endif +#if defined IS_METAL +#include + +using namespace metal; +#endif + #if defined IS_NATIVE #define CONSTANT_VK #define CONSTANT_AS #define GLOBAL_AS #define LOCAL_VK #define LOCAL_AS +#define PRIVATE_AS #define KERNEL_FQ #elif defined IS_CUDA #define CONSTANT_VK __constant__ @@ -29,6 +38,7 @@ #define GLOBAL_AS #define LOCAL_VK __shared__ #define LOCAL_AS +#define PRIVATE_AS #define KERNEL_FQ extern "C" __global__ #elif defined IS_HIP #define CONSTANT_VK __constant__ @@ -36,13 +46,23 @@ #define GLOBAL_AS #define LOCAL_VK __shared__ #define LOCAL_AS +#define PRIVATE_AS #define KERNEL_FQ extern "C" __global__ +#elif defined IS_METAL +#define CONSTANT_VK constant +#define CONSTANT_AS constant +#define GLOBAL_AS device +#define LOCAL_VK threadgroup +#define LOCAL_AS threadgroup +#define PRIVATE_AS thread +#define KERNEL_FQ kernel #elif defined IS_OPENCL #define CONSTANT_VK __constant #define CONSTANT_AS __constant #define GLOBAL_AS __global #define LOCAL_VK __local #define LOCAL_AS __local +#define PRIVATE_AS #define KERNEL_FQ __kernel #endif diff --git a/OpenCL/inc_veracrypt_keyfile.cl b/OpenCL/inc_veracrypt_keyfile.cl index c76d4bf2b..31414fcb3 100644 --- a/OpenCL/inc_veracrypt_keyfile.cl +++ b/OpenCL/inc_veracrypt_keyfile.cl @@ -34,7 +34,7 @@ DECLSPEC u32 u8add (const u32 a, const u32 b) return r; } -DECLSPEC u32 hc_apply_keyfile_vc (u32 *w, const int pw_len, const GLOBAL_AS vc_t *vc) +DECLSPEC u32 hc_apply_keyfile_vc (PRIVATE_AS u32 *w, const int pw_len, const GLOBAL_AS vc_t *vc) { if (vc->keyfile_enabled == 0) return pw_len; diff --git a/OpenCL/inc_veracrypt_keyfile.h b/OpenCL/inc_veracrypt_keyfile.h index 331b36c68..69197726f 100644 --- a/OpenCL/inc_veracrypt_keyfile.h +++ b/OpenCL/inc_veracrypt_keyfile.h @@ -7,6 +7,6 @@ #define _INC_VERACRYPT_KEYFILE_H DECLSPEC u32 u8add (const u32 a, const u32 b); -DECLSPEC u32 hc_apply_keyfile_vc (u32 *w, const int pw_len, const GLOBAL_AS vc_t *vc); +DECLSPEC u32 hc_apply_keyfile_vc (PRIVATE_AS u32 *w, const int pw_len, const GLOBAL_AS vc_t *vc); #endif // _INC_VERACRYPT_KEYFILE_H diff --git a/OpenCL/inc_veracrypt_xts.cl b/OpenCL/inc_veracrypt_xts.cl index ba3b7eef5..2c4c3256d 100644 --- a/OpenCL/inc_veracrypt_xts.cl +++ b/OpenCL/inc_veracrypt_xts.cl @@ -16,7 +16,7 @@ #include "inc_truecrypt_xts.h" #include "inc_veracrypt_xts.h" -DECLSPEC void camellia256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks) +DECLSPEC void camellia256_decrypt_xts_first (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks) { out[0] = in[0]; out[1] = in[1]; @@ -40,7 +40,7 @@ DECLSPEC void camellia256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, out[3] ^= T[3]; } -DECLSPEC void camellia256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks) +DECLSPEC void camellia256_decrypt_xts_next (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks) { out[0] = in[0]; out[1] = in[1]; @@ -62,7 +62,7 @@ DECLSPEC void camellia256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 out[3] ^= T[3]; } -DECLSPEC void kuznyechik_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks) +DECLSPEC void kuznyechik_decrypt_xts_first (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks) { out[0] = in[0]; out[1] = in[1]; @@ -86,7 +86,7 @@ DECLSPEC void kuznyechik_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, out[3] ^= T[3]; } -DECLSPEC void kuznyechik_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks) +DECLSPEC void kuznyechik_decrypt_xts_next (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks) { out[0] = in[0]; out[1] = in[1]; @@ -110,7 +110,7 @@ DECLSPEC void kuznyechik_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 // 512 bit -DECLSPEC int verify_header_camellia (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2) +DECLSPEC int verify_header_camellia (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2) { u32 ks_camellia[68]; @@ -164,7 +164,7 @@ DECLSPEC int verify_header_camellia (GLOBAL_AS const u32 *data_buf, const u32 si return 1; } -DECLSPEC int verify_header_kuznyechik (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2) +DECLSPEC int verify_header_kuznyechik (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2) { u32 ks_kuznyechik[40]; @@ -220,7 +220,7 @@ DECLSPEC int verify_header_kuznyechik (GLOBAL_AS const u32 *data_buf, const u32 // 1024 bit -DECLSPEC int verify_header_camellia_kuznyechik (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4) +DECLSPEC int verify_header_camellia_kuznyechik (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4) { u32 ks_camellia[68]; u32 ks_kuznyechik[40]; @@ -279,7 +279,7 @@ DECLSPEC int verify_header_camellia_kuznyechik (GLOBAL_AS const u32 *data_buf, c return 1; } -DECLSPEC int verify_header_camellia_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4) +DECLSPEC int verify_header_camellia_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4) { u32 ks_camellia[68]; u32 ks_serpent[140]; @@ -338,7 +338,7 @@ DECLSPEC int verify_header_camellia_serpent (GLOBAL_AS const u32 *data_buf, cons return 1; } -DECLSPEC int verify_header_kuznyechik_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int verify_header_kuznyechik_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_kuznyechik[40]; u32 ks_aes[60]; @@ -397,7 +397,7 @@ DECLSPEC int verify_header_kuznyechik_aes (GLOBAL_AS const u32 *data_buf, const return 1; } -DECLSPEC int verify_header_kuznyechik_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4) +DECLSPEC int verify_header_kuznyechik_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4) { u32 ks_kuznyechik[40]; @@ -460,7 +460,7 @@ DECLSPEC int verify_header_kuznyechik_twofish (GLOBAL_AS const u32 *data_buf, co // 1536 bit -DECLSPEC int verify_header_kuznyechik_serpent_camellia (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6) +DECLSPEC int verify_header_kuznyechik_serpent_camellia (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, PRIVATE_AS const u32 *ukey5, PRIVATE_AS const u32 *ukey6) { u32 ks_kuznyechik[40]; u32 ks_serpent[140]; diff --git a/OpenCL/inc_veracrypt_xts.h b/OpenCL/inc_veracrypt_xts.h index e0177579e..16f554efe 100644 --- a/OpenCL/inc_veracrypt_xts.h +++ b/OpenCL/inc_veracrypt_xts.h @@ -6,16 +6,16 @@ #ifndef _INC_HASH_VERACRYPT_XTS_H #define _INC_HASH_VERACRYPT_XTS_H -DECLSPEC void camellia256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks); -DECLSPEC void camellia256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks); -DECLSPEC void kuznyechik_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks); -DECLSPEC void kuznyechik_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks); -DECLSPEC int verify_header_camellia (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2); -DECLSPEC int verify_header_kuznyechik (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2); -DECLSPEC int verify_header_camellia_kuznyechik (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4); -DECLSPEC int verify_header_camellia_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4); -DECLSPEC int verify_header_kuznyechik_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); -DECLSPEC int verify_header_kuznyechik_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4); -DECLSPEC int verify_header_kuznyechik_serpent_camellia (GLOBAL_AS const u32 *data_buf, const u32 signature, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6); +DECLSPEC void camellia256_decrypt_xts_first (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks); +DECLSPEC void camellia256_decrypt_xts_next (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks); +DECLSPEC void kuznyechik_decrypt_xts_first (PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *S, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks); +DECLSPEC void kuznyechik_decrypt_xts_next (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *T, PRIVATE_AS u32 *ks); +DECLSPEC int verify_header_camellia (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2); +DECLSPEC int verify_header_kuznyechik (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2); +DECLSPEC int verify_header_camellia_kuznyechik (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4); +DECLSPEC int verify_header_camellia_serpent (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4); +DECLSPEC int verify_header_kuznyechik_aes (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4); +DECLSPEC int verify_header_kuznyechik_twofish (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4); +DECLSPEC int verify_header_kuznyechik_serpent_camellia (GLOBAL_AS const u32 *data_buf, const u32 signature, PRIVATE_AS const u32 *ukey1, PRIVATE_AS const u32 *ukey2, PRIVATE_AS const u32 *ukey3, PRIVATE_AS const u32 *ukey4, PRIVATE_AS const u32 *ukey5, PRIVATE_AS const u32 *ukey6); #endif // _INC_HASH_VERACRYPT_XTS_H diff --git a/OpenCL/m00000_a3-optimized.cl b/OpenCL/m00000_a3-optimized.cl index 4f47ba4e2..886ca9cd5 100644 --- a/OpenCL/m00000_a3-optimized.cl +++ b/OpenCL/m00000_a3-optimized.cl @@ -34,15 +34,12 @@ a -= t; \ } -DECLSPEC void m00000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00000m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -206,15 +203,12 @@ DECLSPEC void m00000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m00000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00000s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -438,7 +432,9 @@ KERNEL_FQ void m00000_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -467,7 +463,7 @@ KERNEL_FQ void m00000_m04 (KERN_ATTR_VECTOR ()) * main */ - m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00000_m08 (KERN_ATTR_VECTOR ()) @@ -476,7 +472,9 @@ KERNEL_FQ void m00000_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +503,7 @@ KERNEL_FQ void m00000_m08 (KERN_ATTR_VECTOR ()) * main */ - m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00000_m16 (KERN_ATTR_VECTOR ()) @@ -514,7 +512,9 @@ KERNEL_FQ void m00000_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -543,7 +543,7 @@ KERNEL_FQ void m00000_m16 (KERN_ATTR_VECTOR ()) * main */ - m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00000_s04 (KERN_ATTR_VECTOR ()) @@ -552,7 +552,9 @@ KERNEL_FQ void m00000_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -581,7 +583,7 @@ KERNEL_FQ void m00000_s04 (KERN_ATTR_VECTOR ()) * main */ - m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00000_s08 (KERN_ATTR_VECTOR ()) @@ -590,7 +592,9 @@ KERNEL_FQ void m00000_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -619,7 +623,7 @@ KERNEL_FQ void m00000_s08 (KERN_ATTR_VECTOR ()) * main */ - m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00000_s16 (KERN_ATTR_VECTOR ()) @@ -628,7 +632,9 @@ KERNEL_FQ void m00000_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -657,5 +663,5 @@ KERNEL_FQ void m00000_s16 (KERN_ATTR_VECTOR ()) * main */ - m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00010_a3-optimized.cl b/OpenCL/m00010_a3-optimized.cl index 74afb7fda..561c3b702 100644 --- a/OpenCL/m00010_a3-optimized.cl +++ b/OpenCL/m00010_a3-optimized.cl @@ -34,15 +34,12 @@ a -= t; \ } -DECLSPEC void m00010m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00010m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -255,15 +252,12 @@ DECLSPEC void m00010m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m00010s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00010s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -487,7 +481,9 @@ KERNEL_FQ void m00010_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -516,7 +512,7 @@ KERNEL_FQ void m00010_m04 (KERN_ATTR_VECTOR ()) * main */ - m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00010_m08 (KERN_ATTR_VECTOR ()) @@ -525,7 +521,9 @@ KERNEL_FQ void m00010_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -554,7 +552,7 @@ KERNEL_FQ void m00010_m08 (KERN_ATTR_VECTOR ()) * main */ - m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00010_m16 (KERN_ATTR_VECTOR ()) @@ -563,7 +561,9 @@ KERNEL_FQ void m00010_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -592,7 +592,7 @@ KERNEL_FQ void m00010_m16 (KERN_ATTR_VECTOR ()) * main */ - m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00010_s04 (KERN_ATTR_VECTOR ()) @@ -601,7 +601,9 @@ KERNEL_FQ void m00010_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -630,7 +632,7 @@ KERNEL_FQ void m00010_s04 (KERN_ATTR_VECTOR ()) * main */ - m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00010_s08 (KERN_ATTR_VECTOR ()) @@ -639,7 +641,9 @@ KERNEL_FQ void m00010_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -668,7 +672,7 @@ KERNEL_FQ void m00010_s08 (KERN_ATTR_VECTOR ()) * main */ - m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00010_s16 (KERN_ATTR_VECTOR ()) @@ -677,7 +681,9 @@ KERNEL_FQ void m00010_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -706,5 +712,5 @@ KERNEL_FQ void m00010_s16 (KERN_ATTR_VECTOR ()) * main */ - m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00020_a3-optimized.cl b/OpenCL/m00020_a3-optimized.cl index e4ec31f51..10f7e221c 100644 --- a/OpenCL/m00020_a3-optimized.cl +++ b/OpenCL/m00020_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void m00020m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00020m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -192,15 +189,12 @@ DECLSPEC void m00020m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m00020s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00020s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -388,7 +382,9 @@ KERNEL_FQ void m00020_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -426,7 +422,7 @@ KERNEL_FQ void m00020_m04 (KERN_ATTR_BASIC ()) * main */ - m00020m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00020m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00020_m08 (KERN_ATTR_BASIC ()) @@ -435,7 +431,9 @@ KERNEL_FQ void m00020_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -473,7 +471,7 @@ KERNEL_FQ void m00020_m08 (KERN_ATTR_BASIC ()) * main */ - m00020m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00020m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00020_m16 (KERN_ATTR_BASIC ()) @@ -482,7 +480,9 @@ KERNEL_FQ void m00020_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -520,7 +520,7 @@ KERNEL_FQ void m00020_m16 (KERN_ATTR_BASIC ()) * main */ - m00020m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00020m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00020_s04 (KERN_ATTR_BASIC ()) @@ -529,7 +529,9 @@ KERNEL_FQ void m00020_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -567,7 +569,7 @@ KERNEL_FQ void m00020_s04 (KERN_ATTR_BASIC ()) * main */ - m00020s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00020s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00020_s08 (KERN_ATTR_BASIC ()) @@ -576,7 +578,9 @@ KERNEL_FQ void m00020_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -614,7 +618,7 @@ KERNEL_FQ void m00020_s08 (KERN_ATTR_BASIC ()) * main */ - m00020s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00020s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00020_s16 (KERN_ATTR_BASIC ()) @@ -623,7 +627,9 @@ KERNEL_FQ void m00020_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -661,5 +667,5 @@ KERNEL_FQ void m00020_s16 (KERN_ATTR_BASIC ()) * main */ - m00020s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00020s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00030_a3-optimized.cl b/OpenCL/m00030_a3-optimized.cl index 0bed0dd92..87353b952 100644 --- a/OpenCL/m00030_a3-optimized.cl +++ b/OpenCL/m00030_a3-optimized.cl @@ -34,15 +34,12 @@ a -= t; \ } -DECLSPEC void m00030m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00030m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -255,15 +252,12 @@ DECLSPEC void m00030m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m00030s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00030s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -487,7 +481,9 @@ KERNEL_FQ void m00030_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -516,7 +512,7 @@ KERNEL_FQ void m00030_m04 (KERN_ATTR_VECTOR ()) * main */ - m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00030_m08 (KERN_ATTR_VECTOR ()) @@ -525,7 +521,9 @@ KERNEL_FQ void m00030_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -554,7 +552,7 @@ KERNEL_FQ void m00030_m08 (KERN_ATTR_VECTOR ()) * main */ - m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00030_m16 (KERN_ATTR_VECTOR ()) @@ -563,7 +561,9 @@ KERNEL_FQ void m00030_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -592,7 +592,7 @@ KERNEL_FQ void m00030_m16 (KERN_ATTR_VECTOR ()) * main */ - m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00030m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00030_s04 (KERN_ATTR_VECTOR ()) @@ -601,7 +601,9 @@ KERNEL_FQ void m00030_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -630,7 +632,7 @@ KERNEL_FQ void m00030_s04 (KERN_ATTR_VECTOR ()) * main */ - m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00030_s08 (KERN_ATTR_VECTOR ()) @@ -639,7 +641,9 @@ KERNEL_FQ void m00030_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -668,7 +672,7 @@ KERNEL_FQ void m00030_s08 (KERN_ATTR_VECTOR ()) * main */ - m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00030_s16 (KERN_ATTR_VECTOR ()) @@ -677,7 +681,9 @@ KERNEL_FQ void m00030_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -706,5 +712,5 @@ KERNEL_FQ void m00030_s16 (KERN_ATTR_VECTOR ()) * main */ - m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00030s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00040_a3-optimized.cl b/OpenCL/m00040_a3-optimized.cl index 00ad1a3cd..b57856613 100644 --- a/OpenCL/m00040_a3-optimized.cl +++ b/OpenCL/m00040_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void m00040m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00040m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -192,15 +189,12 @@ DECLSPEC void m00040m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m00040s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00040s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -388,7 +382,9 @@ KERNEL_FQ void m00040_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -426,7 +422,7 @@ KERNEL_FQ void m00040_m04 (KERN_ATTR_BASIC ()) * main */ - m00040m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00040m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00040_m08 (KERN_ATTR_BASIC ()) @@ -435,7 +431,9 @@ KERNEL_FQ void m00040_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -473,7 +471,7 @@ KERNEL_FQ void m00040_m08 (KERN_ATTR_BASIC ()) * main */ - m00040m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00040m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00040_m16 (KERN_ATTR_BASIC ()) @@ -482,7 +480,9 @@ KERNEL_FQ void m00040_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -520,7 +520,7 @@ KERNEL_FQ void m00040_m16 (KERN_ATTR_BASIC ()) * main */ - m00040m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00040m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00040_s04 (KERN_ATTR_BASIC ()) @@ -529,7 +529,9 @@ KERNEL_FQ void m00040_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -567,7 +569,7 @@ KERNEL_FQ void m00040_s04 (KERN_ATTR_BASIC ()) * main */ - m00040s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00040s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00040_s08 (KERN_ATTR_BASIC ()) @@ -576,7 +578,9 @@ KERNEL_FQ void m00040_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -614,7 +618,7 @@ KERNEL_FQ void m00040_s08 (KERN_ATTR_BASIC ()) * main */ - m00040s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00040s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00040_s16 (KERN_ATTR_BASIC ()) @@ -623,7 +627,9 @@ KERNEL_FQ void m00040_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -661,5 +667,5 @@ KERNEL_FQ void m00040_s16 (KERN_ATTR_BASIC ()) * main */ - m00040s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00040s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00050_a0-optimized.cl b/OpenCL/m00050_a0-optimized.cl index 1c791e1af..3cb7d8cad 100644 --- a/OpenCL/m00050_a0-optimized.cl +++ b/OpenCL/m00050_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -70,7 +70,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00050_a1-optimized.cl b/OpenCL/m00050_a1-optimized.cl index eb9b9d5b9..ee8bd8ef4 100644 --- a/OpenCL/m00050_a1-optimized.cl +++ b/OpenCL/m00050_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -68,7 +68,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00050_a3-optimized.cl b/OpenCL/m00050_a3-optimized.cl index eb9162428..374642fae 100644 --- a/OpenCL/m00050_a3-optimized.cl +++ b/OpenCL/m00050_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -68,7 +68,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -102,15 +102,12 @@ DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void m00050m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00050m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -207,15 +204,12 @@ DECLSPEC void m00050m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m00050s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00050s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -330,7 +324,9 @@ KERNEL_FQ void m00050_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -368,7 +364,7 @@ KERNEL_FQ void m00050_m04 (KERN_ATTR_BASIC ()) * main */ - m00050m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00050m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00050_m08 (KERN_ATTR_BASIC ()) @@ -377,7 +373,9 @@ KERNEL_FQ void m00050_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -415,7 +413,7 @@ KERNEL_FQ void m00050_m08 (KERN_ATTR_BASIC ()) * main */ - m00050m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00050m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00050_m16 (KERN_ATTR_BASIC ()) @@ -424,7 +422,9 @@ KERNEL_FQ void m00050_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -462,7 +462,7 @@ KERNEL_FQ void m00050_m16 (KERN_ATTR_BASIC ()) * main */ - m00050m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00050m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00050_s04 (KERN_ATTR_BASIC ()) @@ -471,7 +471,9 @@ KERNEL_FQ void m00050_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -509,7 +511,7 @@ KERNEL_FQ void m00050_s04 (KERN_ATTR_BASIC ()) * main */ - m00050s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00050s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00050_s08 (KERN_ATTR_BASIC ()) @@ -518,7 +520,9 @@ KERNEL_FQ void m00050_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -556,7 +560,7 @@ KERNEL_FQ void m00050_s08 (KERN_ATTR_BASIC ()) * main */ - m00050s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00050s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00050_s16 (KERN_ATTR_BASIC ()) @@ -565,7 +569,9 @@ KERNEL_FQ void m00050_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -603,5 +609,5 @@ KERNEL_FQ void m00050_s16 (KERN_ATTR_BASIC ()) * main */ - m00050s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00050s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00060_a0-optimized.cl b/OpenCL/m00060_a0-optimized.cl index 1c2f054fd..c4730d55c 100644 --- a/OpenCL/m00060_a0-optimized.cl +++ b/OpenCL/m00060_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -70,7 +70,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00060_a1-optimized.cl b/OpenCL/m00060_a1-optimized.cl index 3b74a89c1..45ac31263 100644 --- a/OpenCL/m00060_a1-optimized.cl +++ b/OpenCL/m00060_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -68,7 +68,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00060_a3-optimized.cl b/OpenCL/m00060_a3-optimized.cl index c561cc336..8257fe225 100644 --- a/OpenCL/m00060_a3-optimized.cl +++ b/OpenCL/m00060_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -68,7 +68,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -102,15 +102,12 @@ DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void m00060m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00060m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -205,15 +202,12 @@ DECLSPEC void m00060m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m00060s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00060s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -326,7 +320,9 @@ KERNEL_FQ void m00060_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -364,7 +360,7 @@ KERNEL_FQ void m00060_m04 (KERN_ATTR_BASIC ()) * main */ - m00060m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00060m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00060_m08 (KERN_ATTR_BASIC ()) @@ -373,7 +369,9 @@ KERNEL_FQ void m00060_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -411,7 +409,7 @@ KERNEL_FQ void m00060_m08 (KERN_ATTR_BASIC ()) * main */ - m00060m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00060m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00060_m16 (KERN_ATTR_BASIC ()) @@ -420,7 +418,9 @@ KERNEL_FQ void m00060_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -458,7 +458,7 @@ KERNEL_FQ void m00060_m16 (KERN_ATTR_BASIC ()) * main */ - m00060m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00060m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00060_s04 (KERN_ATTR_BASIC ()) @@ -467,7 +467,9 @@ KERNEL_FQ void m00060_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +507,7 @@ KERNEL_FQ void m00060_s04 (KERN_ATTR_BASIC ()) * main */ - m00060s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00060s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00060_s08 (KERN_ATTR_BASIC ()) @@ -514,7 +516,9 @@ KERNEL_FQ void m00060_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -552,7 +556,7 @@ KERNEL_FQ void m00060_s08 (KERN_ATTR_BASIC ()) * main */ - m00060s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00060s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00060_s16 (KERN_ATTR_BASIC ()) @@ -561,7 +565,9 @@ KERNEL_FQ void m00060_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -599,5 +605,5 @@ KERNEL_FQ void m00060_s16 (KERN_ATTR_BASIC ()) * main */ - m00060s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00060s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00070_a3-optimized.cl b/OpenCL/m00070_a3-optimized.cl index db150d92d..99d703333 100644 --- a/OpenCL/m00070_a3-optimized.cl +++ b/OpenCL/m00070_a3-optimized.cl @@ -34,15 +34,12 @@ a -= t; \ } -DECLSPEC void m00070m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00070m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - w[14] = pw_len * 8; w[15] = 0; @@ -209,15 +206,12 @@ DECLSPEC void m00070m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m00070s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00070s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -441,7 +435,9 @@ KERNEL_FQ void m00070_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -470,7 +466,7 @@ KERNEL_FQ void m00070_m04 (KERN_ATTR_VECTOR ()) * main */ - m00070m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00070m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00070_m08 (KERN_ATTR_VECTOR ()) @@ -479,7 +475,9 @@ KERNEL_FQ void m00070_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -508,7 +506,7 @@ KERNEL_FQ void m00070_m08 (KERN_ATTR_VECTOR ()) * main */ - m00070m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00070m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00070_m16 (KERN_ATTR_VECTOR ()) @@ -517,7 +515,9 @@ KERNEL_FQ void m00070_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -546,7 +546,7 @@ KERNEL_FQ void m00070_m16 (KERN_ATTR_VECTOR ()) * main */ - m00070m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00070m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00070_s04 (KERN_ATTR_VECTOR ()) @@ -555,7 +555,9 @@ KERNEL_FQ void m00070_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -584,7 +586,7 @@ KERNEL_FQ void m00070_s04 (KERN_ATTR_VECTOR ()) * main */ - m00070s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00070s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00070_s08 (KERN_ATTR_VECTOR ()) @@ -593,7 +595,9 @@ KERNEL_FQ void m00070_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -622,7 +626,7 @@ KERNEL_FQ void m00070_s08 (KERN_ATTR_VECTOR ()) * main */ - m00070s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00070s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00070_s16 (KERN_ATTR_VECTOR ()) @@ -631,7 +635,9 @@ KERNEL_FQ void m00070_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -660,5 +666,5 @@ KERNEL_FQ void m00070_s16 (KERN_ATTR_VECTOR ()) * main */ - m00070s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00070s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00100_a3-optimized.cl b/OpenCL/m00100_a3-optimized.cl index 8766fe8c7..6b8e48435 100644 --- a/OpenCL/m00100_a3-optimized.cl +++ b/OpenCL/m00100_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m00100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00100m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -261,15 +258,12 @@ DECLSPEC void m00100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m00100s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00100s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -531,7 +525,9 @@ KERNEL_FQ void m00100_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -560,7 +556,7 @@ KERNEL_FQ void m00100_m04 (KERN_ATTR_VECTOR ()) * main */ - m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00100_m08 (KERN_ATTR_VECTOR ()) @@ -569,7 +565,9 @@ KERNEL_FQ void m00100_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -598,7 +596,7 @@ KERNEL_FQ void m00100_m08 (KERN_ATTR_VECTOR ()) * main */ - m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00100_m16 (KERN_ATTR_VECTOR ()) @@ -607,7 +605,9 @@ KERNEL_FQ void m00100_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -636,7 +636,7 @@ KERNEL_FQ void m00100_m16 (KERN_ATTR_VECTOR ()) * main */ - m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00100_s04 (KERN_ATTR_VECTOR ()) @@ -645,7 +645,9 @@ KERNEL_FQ void m00100_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -674,7 +676,7 @@ KERNEL_FQ void m00100_s04 (KERN_ATTR_VECTOR ()) * main */ - m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00100_s08 (KERN_ATTR_VECTOR ()) @@ -683,7 +685,9 @@ KERNEL_FQ void m00100_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -712,7 +716,7 @@ KERNEL_FQ void m00100_s08 (KERN_ATTR_VECTOR ()) * main */ - m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00100_s16 (KERN_ATTR_VECTOR ()) @@ -721,7 +725,9 @@ KERNEL_FQ void m00100_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -750,5 +756,5 @@ KERNEL_FQ void m00100_s16 (KERN_ATTR_VECTOR ()) * main */ - m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00110_a3-optimized.cl b/OpenCL/m00110_a3-optimized.cl index 66ae5f07f..212628b0c 100644 --- a/OpenCL/m00110_a3-optimized.cl +++ b/OpenCL/m00110_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m00110m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00110m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -309,15 +306,12 @@ DECLSPEC void m00110m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m00110s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00110s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -579,7 +573,9 @@ KERNEL_FQ void m00110_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -608,7 +604,7 @@ KERNEL_FQ void m00110_m04 (KERN_ATTR_VECTOR ()) * main */ - m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00110_m08 (KERN_ATTR_VECTOR ()) @@ -617,7 +613,9 @@ KERNEL_FQ void m00110_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -646,7 +644,7 @@ KERNEL_FQ void m00110_m08 (KERN_ATTR_VECTOR ()) * main */ - m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00110_m16 (KERN_ATTR_VECTOR ()) @@ -655,7 +653,9 @@ KERNEL_FQ void m00110_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -684,7 +684,7 @@ KERNEL_FQ void m00110_m16 (KERN_ATTR_VECTOR ()) * main */ - m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00110m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00110_s04 (KERN_ATTR_VECTOR ()) @@ -693,7 +693,9 @@ KERNEL_FQ void m00110_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -722,7 +724,7 @@ KERNEL_FQ void m00110_s04 (KERN_ATTR_VECTOR ()) * main */ - m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00110_s08 (KERN_ATTR_VECTOR ()) @@ -731,7 +733,9 @@ KERNEL_FQ void m00110_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -760,7 +764,7 @@ KERNEL_FQ void m00110_s08 (KERN_ATTR_VECTOR ()) * main */ - m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00110_s16 (KERN_ATTR_VECTOR ()) @@ -769,7 +773,9 @@ KERNEL_FQ void m00110_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -798,5 +804,5 @@ KERNEL_FQ void m00110_s16 (KERN_ATTR_VECTOR ()) * main */ - m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00110s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00120_a3-optimized.cl b/OpenCL/m00120_a3-optimized.cl index d5cdd887e..9a893ce72 100644 --- a/OpenCL/m00120_a3-optimized.cl +++ b/OpenCL/m00120_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m00120m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00120m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -236,15 +233,12 @@ DECLSPEC void m00120m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m00120s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00120s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -482,7 +476,9 @@ KERNEL_FQ void m00120_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -520,7 +516,7 @@ KERNEL_FQ void m00120_m04 (KERN_ATTR_BASIC ()) * main */ - m00120m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00120m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00120_m08 (KERN_ATTR_BASIC ()) @@ -529,7 +525,9 @@ KERNEL_FQ void m00120_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -567,7 +565,7 @@ KERNEL_FQ void m00120_m08 (KERN_ATTR_BASIC ()) * main */ - m00120m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00120m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00120_m16 (KERN_ATTR_BASIC ()) @@ -576,7 +574,9 @@ KERNEL_FQ void m00120_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -614,7 +614,7 @@ KERNEL_FQ void m00120_m16 (KERN_ATTR_BASIC ()) * main */ - m00120m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00120m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00120_s04 (KERN_ATTR_BASIC ()) @@ -623,7 +623,9 @@ KERNEL_FQ void m00120_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -661,7 +663,7 @@ KERNEL_FQ void m00120_s04 (KERN_ATTR_BASIC ()) * main */ - m00120s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00120s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00120_s08 (KERN_ATTR_BASIC ()) @@ -670,7 +672,9 @@ KERNEL_FQ void m00120_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -708,7 +712,7 @@ KERNEL_FQ void m00120_s08 (KERN_ATTR_BASIC ()) * main */ - m00120s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00120s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00120_s16 (KERN_ATTR_BASIC ()) @@ -717,7 +721,9 @@ KERNEL_FQ void m00120_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -755,5 +761,5 @@ KERNEL_FQ void m00120_s16 (KERN_ATTR_BASIC ()) * main */ - m00120s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00120s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00130_a3-optimized.cl b/OpenCL/m00130_a3-optimized.cl index 51db60160..167738537 100644 --- a/OpenCL/m00130_a3-optimized.cl +++ b/OpenCL/m00130_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m00130m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00130m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -309,15 +306,12 @@ DECLSPEC void m00130m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m00130s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00130s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -579,7 +573,9 @@ KERNEL_FQ void m00130_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -608,7 +604,7 @@ KERNEL_FQ void m00130_m04 (KERN_ATTR_VECTOR ()) * main */ - m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00130_m08 (KERN_ATTR_VECTOR ()) @@ -617,7 +613,9 @@ KERNEL_FQ void m00130_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -646,7 +644,7 @@ KERNEL_FQ void m00130_m08 (KERN_ATTR_VECTOR ()) * main */ - m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00130_m16 (KERN_ATTR_VECTOR ()) @@ -655,7 +653,9 @@ KERNEL_FQ void m00130_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -684,7 +684,7 @@ KERNEL_FQ void m00130_m16 (KERN_ATTR_VECTOR ()) * main */ - m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00130m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00130_s04 (KERN_ATTR_VECTOR ()) @@ -693,7 +693,9 @@ KERNEL_FQ void m00130_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -722,7 +724,7 @@ KERNEL_FQ void m00130_s04 (KERN_ATTR_VECTOR ()) * main */ - m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00130_s08 (KERN_ATTR_VECTOR ()) @@ -731,7 +733,9 @@ KERNEL_FQ void m00130_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -760,7 +764,7 @@ KERNEL_FQ void m00130_s08 (KERN_ATTR_VECTOR ()) * main */ - m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00130_s16 (KERN_ATTR_VECTOR ()) @@ -769,7 +773,9 @@ KERNEL_FQ void m00130_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -798,5 +804,5 @@ KERNEL_FQ void m00130_s16 (KERN_ATTR_VECTOR ()) * main */ - m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00130s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00140_a3-optimized.cl b/OpenCL/m00140_a3-optimized.cl index e7a530143..0c316fe14 100644 --- a/OpenCL/m00140_a3-optimized.cl +++ b/OpenCL/m00140_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m00140m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00140m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -236,15 +233,12 @@ DECLSPEC void m00140m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m00140s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00140s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -482,7 +476,9 @@ KERNEL_FQ void m00140_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -520,7 +516,7 @@ KERNEL_FQ void m00140_m04 (KERN_ATTR_BASIC ()) * main */ - m00140m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00140m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00140_m08 (KERN_ATTR_BASIC ()) @@ -529,7 +525,9 @@ KERNEL_FQ void m00140_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -567,7 +565,7 @@ KERNEL_FQ void m00140_m08 (KERN_ATTR_BASIC ()) * main */ - m00140m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00140m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00140_m16 (KERN_ATTR_BASIC ()) @@ -576,7 +574,9 @@ KERNEL_FQ void m00140_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -614,7 +614,7 @@ KERNEL_FQ void m00140_m16 (KERN_ATTR_BASIC ()) * main */ - m00140m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00140m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00140_s04 (KERN_ATTR_BASIC ()) @@ -623,7 +623,9 @@ KERNEL_FQ void m00140_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -661,7 +663,7 @@ KERNEL_FQ void m00140_s04 (KERN_ATTR_BASIC ()) * main */ - m00140s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00140s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00140_s08 (KERN_ATTR_BASIC ()) @@ -670,7 +672,9 @@ KERNEL_FQ void m00140_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -708,7 +712,7 @@ KERNEL_FQ void m00140_s08 (KERN_ATTR_BASIC ()) * main */ - m00140s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00140s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00140_s16 (KERN_ATTR_BASIC ()) @@ -717,7 +721,9 @@ KERNEL_FQ void m00140_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -755,5 +761,5 @@ KERNEL_FQ void m00140_s16 (KERN_ATTR_BASIC ()) * main */ - m00140s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00140s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00150_a0-optimized.cl b/OpenCL/m00150_a0-optimized.cl index cf30bdbf3..cf72a428c 100644 --- a/OpenCL/m00150_a0-optimized.cl +++ b/OpenCL/m00150_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -72,7 +72,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00150_a1-optimized.cl b/OpenCL/m00150_a1-optimized.cl index cedf0079f..959eaf5c0 100644 --- a/OpenCL/m00150_a1-optimized.cl +++ b/OpenCL/m00150_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -70,7 +70,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00150_a3-optimized.cl b/OpenCL/m00150_a3-optimized.cl index 57f95ec91..9f8b06dc8 100644 --- a/OpenCL/m00150_a3-optimized.cl +++ b/OpenCL/m00150_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -70,7 +70,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -106,15 +106,12 @@ DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void m00150m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00150m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -211,15 +208,12 @@ DECLSPEC void m00150m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m00150s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00150s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -334,7 +328,9 @@ KERNEL_FQ void m00150_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -372,7 +368,7 @@ KERNEL_FQ void m00150_m04 (KERN_ATTR_BASIC ()) * main */ - m00150m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00150m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00150_m08 (KERN_ATTR_BASIC ()) @@ -381,7 +377,9 @@ KERNEL_FQ void m00150_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -419,7 +417,7 @@ KERNEL_FQ void m00150_m08 (KERN_ATTR_BASIC ()) * main */ - m00150m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00150m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00150_m16 (KERN_ATTR_BASIC ()) @@ -428,7 +426,9 @@ KERNEL_FQ void m00150_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -466,7 +466,7 @@ KERNEL_FQ void m00150_m16 (KERN_ATTR_BASIC ()) * main */ - m00150m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00150m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00150_s04 (KERN_ATTR_BASIC ()) @@ -475,7 +475,9 @@ KERNEL_FQ void m00150_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -513,7 +515,7 @@ KERNEL_FQ void m00150_s04 (KERN_ATTR_BASIC ()) * main */ - m00150s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00150s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00150_s08 (KERN_ATTR_BASIC ()) @@ -522,7 +524,9 @@ KERNEL_FQ void m00150_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -560,7 +564,7 @@ KERNEL_FQ void m00150_s08 (KERN_ATTR_BASIC ()) * main */ - m00150s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00150s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00150_s16 (KERN_ATTR_BASIC ()) @@ -569,7 +573,9 @@ KERNEL_FQ void m00150_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -607,5 +613,5 @@ KERNEL_FQ void m00150_s16 (KERN_ATTR_BASIC ()) * main */ - m00150s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00150s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00160_a0-optimized.cl b/OpenCL/m00160_a0-optimized.cl index d5e768b31..0ac5443f3 100644 --- a/OpenCL/m00160_a0-optimized.cl +++ b/OpenCL/m00160_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -72,7 +72,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00160_a1-optimized.cl b/OpenCL/m00160_a1-optimized.cl index cb9ea6217..e0a017dc8 100644 --- a/OpenCL/m00160_a1-optimized.cl +++ b/OpenCL/m00160_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -70,7 +70,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00160_a3-optimized.cl b/OpenCL/m00160_a3-optimized.cl index 15bfa422a..aa34d3e1c 100644 --- a/OpenCL/m00160_a3-optimized.cl +++ b/OpenCL/m00160_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -70,7 +70,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -106,15 +106,12 @@ DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void m00160m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00160m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -209,15 +206,12 @@ DECLSPEC void m00160m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m00160s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00160s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -330,7 +324,9 @@ KERNEL_FQ void m00160_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -368,7 +364,7 @@ KERNEL_FQ void m00160_m04 (KERN_ATTR_BASIC ()) * main */ - m00160m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00160m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00160_m08 (KERN_ATTR_BASIC ()) @@ -377,7 +373,9 @@ KERNEL_FQ void m00160_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -415,7 +413,7 @@ KERNEL_FQ void m00160_m08 (KERN_ATTR_BASIC ()) * main */ - m00160m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00160m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00160_m16 (KERN_ATTR_BASIC ()) @@ -424,7 +422,9 @@ KERNEL_FQ void m00160_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -462,7 +462,7 @@ KERNEL_FQ void m00160_m16 (KERN_ATTR_BASIC ()) * main */ - m00160m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00160m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00160_s04 (KERN_ATTR_BASIC ()) @@ -471,7 +471,9 @@ KERNEL_FQ void m00160_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -509,7 +511,7 @@ KERNEL_FQ void m00160_s04 (KERN_ATTR_BASIC ()) * main */ - m00160s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00160s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00160_s08 (KERN_ATTR_BASIC ()) @@ -518,7 +520,9 @@ KERNEL_FQ void m00160_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -556,7 +560,7 @@ KERNEL_FQ void m00160_s08 (KERN_ATTR_BASIC ()) * main */ - m00160s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00160s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00160_s16 (KERN_ATTR_BASIC ()) @@ -565,7 +569,9 @@ KERNEL_FQ void m00160_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -603,5 +609,5 @@ KERNEL_FQ void m00160_s16 (KERN_ATTR_BASIC ()) * main */ - m00160s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00160s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00170_a3-optimized.cl b/OpenCL/m00170_a3-optimized.cl index 61cc28a62..45e40a950 100644 --- a/OpenCL/m00170_a3-optimized.cl +++ b/OpenCL/m00170_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m00170m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00170m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -258,15 +255,12 @@ DECLSPEC void m00170m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m00170s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00170s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -528,7 +522,9 @@ KERNEL_FQ void m00170_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -557,7 +553,7 @@ KERNEL_FQ void m00170_m04 (KERN_ATTR_VECTOR ()) * main */ - m00170m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00170m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00170_m08 (KERN_ATTR_VECTOR ()) @@ -566,7 +562,9 @@ KERNEL_FQ void m00170_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -595,7 +593,7 @@ KERNEL_FQ void m00170_m08 (KERN_ATTR_VECTOR ()) * main */ - m00170m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00170m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00170_m16 (KERN_ATTR_VECTOR ()) @@ -604,7 +602,9 @@ KERNEL_FQ void m00170_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -633,7 +633,7 @@ KERNEL_FQ void m00170_m16 (KERN_ATTR_VECTOR ()) * main */ - m00170m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00170m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00170_s04 (KERN_ATTR_VECTOR ()) @@ -642,7 +642,9 @@ KERNEL_FQ void m00170_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -671,7 +673,7 @@ KERNEL_FQ void m00170_s04 (KERN_ATTR_VECTOR ()) * main */ - m00170s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00170s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00170_s08 (KERN_ATTR_VECTOR ()) @@ -680,7 +682,9 @@ KERNEL_FQ void m00170_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -709,7 +713,7 @@ KERNEL_FQ void m00170_s08 (KERN_ATTR_VECTOR ()) * main */ - m00170s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00170s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00170_s16 (KERN_ATTR_VECTOR ()) @@ -718,7 +722,9 @@ KERNEL_FQ void m00170_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -747,5 +753,5 @@ KERNEL_FQ void m00170_s16 (KERN_ATTR_VECTOR ()) * main */ - m00170s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00170s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00200_a3-optimized.cl b/OpenCL/m00200_a3-optimized.cl index adfd62e7b..b666a1d98 100644 --- a/OpenCL/m00200_a3-optimized.cl +++ b/OpenCL/m00200_a3-optimized.cl @@ -93,15 +93,12 @@ } \ } -DECLSPEC void m00200m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00200m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -221,15 +218,12 @@ DECLSPEC void m00200m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) CODE_POST_M; } -DECLSPEC void m00200s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00200s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -355,7 +349,9 @@ KERNEL_FQ void m00200_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -384,7 +380,7 @@ KERNEL_FQ void m00200_m04 (KERN_ATTR_VECTOR ()) * main */ - m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00200_m08 (KERN_ATTR_VECTOR ()) @@ -393,7 +389,9 @@ KERNEL_FQ void m00200_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -422,7 +420,7 @@ KERNEL_FQ void m00200_m08 (KERN_ATTR_VECTOR ()) * main */ - m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00200_m16 (KERN_ATTR_VECTOR ()) @@ -431,7 +429,9 @@ KERNEL_FQ void m00200_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -460,7 +460,7 @@ KERNEL_FQ void m00200_m16 (KERN_ATTR_VECTOR ()) * main */ - m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00200m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00200_s04 (KERN_ATTR_VECTOR ()) @@ -469,7 +469,9 @@ KERNEL_FQ void m00200_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -498,7 +500,7 @@ KERNEL_FQ void m00200_s04 (KERN_ATTR_VECTOR ()) * main */ - m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00200_s08 (KERN_ATTR_VECTOR ()) @@ -507,7 +509,9 @@ KERNEL_FQ void m00200_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -536,7 +540,7 @@ KERNEL_FQ void m00200_s08 (KERN_ATTR_VECTOR ()) * main */ - m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00200_s16 (KERN_ATTR_VECTOR ()) @@ -545,7 +549,9 @@ KERNEL_FQ void m00200_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -574,5 +580,5 @@ KERNEL_FQ void m00200_s16 (KERN_ATTR_VECTOR ()) * main */ - m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00200s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00300_a3-optimized.cl b/OpenCL/m00300_a3-optimized.cl index d1849d724..eef0bdd6a 100644 --- a/OpenCL/m00300_a3-optimized.cl +++ b/OpenCL/m00300_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m00300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00300m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -386,15 +383,12 @@ DECLSPEC void m00300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m00300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00300s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -782,7 +776,9 @@ KERNEL_FQ void m00300_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -811,7 +807,7 @@ KERNEL_FQ void m00300_m04 (KERN_ATTR_VECTOR ()) * main */ - m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00300_m08 (KERN_ATTR_VECTOR ()) @@ -820,7 +816,9 @@ KERNEL_FQ void m00300_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -849,7 +847,7 @@ KERNEL_FQ void m00300_m08 (KERN_ATTR_VECTOR ()) * main */ - m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00300_m16 (KERN_ATTR_VECTOR ()) @@ -858,7 +856,9 @@ KERNEL_FQ void m00300_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -887,7 +887,7 @@ KERNEL_FQ void m00300_m16 (KERN_ATTR_VECTOR ()) * main */ - m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00300_s04 (KERN_ATTR_VECTOR ()) @@ -896,7 +896,9 @@ KERNEL_FQ void m00300_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -925,7 +927,7 @@ KERNEL_FQ void m00300_s04 (KERN_ATTR_VECTOR ()) * main */ - m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00300_s08 (KERN_ATTR_VECTOR ()) @@ -934,7 +936,9 @@ KERNEL_FQ void m00300_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -963,7 +967,7 @@ KERNEL_FQ void m00300_s08 (KERN_ATTR_VECTOR ()) * main */ - m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00300_s16 (KERN_ATTR_VECTOR ()) @@ -972,7 +976,9 @@ KERNEL_FQ void m00300_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -1001,5 +1007,5 @@ KERNEL_FQ void m00300_s16 (KERN_ATTR_VECTOR ()) * main */ - m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00500-optimized.cl b/OpenCL/m00500-optimized.cl index d59725ef6..86316dca2 100644 --- a/OpenCL/m00500-optimized.cl +++ b/OpenCL/m00500-optimized.cl @@ -27,7 +27,7 @@ typedef struct md5crypt_tmp #define md5crypt_magic 0x00243124u -DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16 (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 offset, PRIVATE_AS const u32 *append) { u32 tmp0; u32 tmp1; @@ -140,7 +140,7 @@ DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, cons } } -DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16_x80 (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 offset, PRIVATE_AS const u32 *append) { u32 tmp0; u32 tmp1; @@ -255,7 +255,7 @@ DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, } } -DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat8 (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 offset, PRIVATE_AS const u32 *append) { u32 tmp0; u32 tmp1; @@ -346,7 +346,7 @@ DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const } } -DECLSPEC void append_sign (u32 *block0, u32 *block1, const u32 block_len) +DECLSPEC void append_sign (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, const u32 block_len) { switch (block_len) { @@ -428,7 +428,7 @@ DECLSPEC void append_sign (u32 *block0, u32 *block1, const u32 block_len) } } -DECLSPEC void append_1st (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 block_len, const u32 append) +DECLSPEC void append_1st (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 block_len, const u32 append) { switch (block_len) { diff --git a/OpenCL/m00600_a3-optimized.cl b/OpenCL/m00600_a3-optimized.cl index d6ba1bf93..237475f51 100644 --- a/OpenCL/m00600_a3-optimized.cl +++ b/OpenCL/m00600_a3-optimized.cl @@ -17,14 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_blake2b.cl) #endif -DECLSPEC void m00600m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00600m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * loop */ @@ -99,14 +97,12 @@ DECLSPEC void m00600m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m00600s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00600s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * digest */ @@ -199,7 +195,9 @@ KERNEL_FQ void m00600_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -228,7 +226,7 @@ KERNEL_FQ void m00600_m04 (KERN_ATTR_VECTOR ()) * main */ - m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00600_m08 (KERN_ATTR_VECTOR ()) @@ -237,7 +235,9 @@ KERNEL_FQ void m00600_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -266,7 +266,7 @@ KERNEL_FQ void m00600_m08 (KERN_ATTR_VECTOR ()) * main */ - m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00600_m16 (KERN_ATTR_VECTOR ()) @@ -275,7 +275,9 @@ KERNEL_FQ void m00600_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -304,7 +306,7 @@ KERNEL_FQ void m00600_m16 (KERN_ATTR_VECTOR ()) * main */ - m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00600m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00600_s04 (KERN_ATTR_VECTOR ()) @@ -313,7 +315,9 @@ KERNEL_FQ void m00600_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -342,7 +346,7 @@ KERNEL_FQ void m00600_s04 (KERN_ATTR_VECTOR ()) * main */ - m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00600_s08 (KERN_ATTR_VECTOR ()) @@ -351,7 +355,9 @@ KERNEL_FQ void m00600_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -380,7 +386,7 @@ KERNEL_FQ void m00600_s08 (KERN_ATTR_VECTOR ()) * main */ - m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00600_s16 (KERN_ATTR_VECTOR ()) @@ -389,7 +395,9 @@ KERNEL_FQ void m00600_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -418,5 +426,5 @@ KERNEL_FQ void m00600_s16 (KERN_ATTR_VECTOR ()) * main */ - m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00600s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m00900_a3-optimized.cl b/OpenCL/m00900_a3-optimized.cl index ccb887e17..e0a9ca20c 100644 --- a/OpenCL/m00900_a3-optimized.cl +++ b/OpenCL/m00900_a3-optimized.cl @@ -32,15 +32,12 @@ a -= t; \ } -DECLSPEC void m00900m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00900m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -168,15 +165,12 @@ DECLSPEC void m00900m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m00900s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00900s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -362,7 +356,9 @@ KERNEL_FQ void m00900_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -391,7 +387,7 @@ KERNEL_FQ void m00900_m04 (KERN_ATTR_VECTOR ()) * main */ - m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00900_m08 (KERN_ATTR_VECTOR ()) @@ -400,7 +396,9 @@ KERNEL_FQ void m00900_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -429,7 +427,7 @@ KERNEL_FQ void m00900_m08 (KERN_ATTR_VECTOR ()) * main */ - m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00900_m16 (KERN_ATTR_VECTOR ()) @@ -438,7 +436,9 @@ KERNEL_FQ void m00900_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -467,7 +467,7 @@ KERNEL_FQ void m00900_m16 (KERN_ATTR_VECTOR ()) * main */ - m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00900_s04 (KERN_ATTR_VECTOR ()) @@ -476,7 +476,9 @@ KERNEL_FQ void m00900_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +507,7 @@ KERNEL_FQ void m00900_s04 (KERN_ATTR_VECTOR ()) * main */ - m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00900_s08 (KERN_ATTR_VECTOR ()) @@ -514,7 +516,9 @@ KERNEL_FQ void m00900_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -543,7 +547,7 @@ KERNEL_FQ void m00900_s08 (KERN_ATTR_VECTOR ()) * main */ - m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m00900_s16 (KERN_ATTR_VECTOR ()) @@ -552,7 +556,9 @@ KERNEL_FQ void m00900_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -581,5 +587,5 @@ KERNEL_FQ void m00900_s16 (KERN_ATTR_VECTOR ()) * main */ - m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m00900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01000_a3-optimized.cl b/OpenCL/m01000_a3-optimized.cl index ae2d65803..ad1c28ada 100644 --- a/OpenCL/m01000_a3-optimized.cl +++ b/OpenCL/m01000_a3-optimized.cl @@ -32,15 +32,12 @@ a -= t; \ } -DECLSPEC void m01000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01000m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -168,15 +165,12 @@ DECLSPEC void m01000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m01000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01000s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -362,7 +356,9 @@ KERNEL_FQ void m01000_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -391,7 +387,7 @@ KERNEL_FQ void m01000_m04 (KERN_ATTR_VECTOR ()) * main */ - m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01000_m08 (KERN_ATTR_VECTOR ()) @@ -400,7 +396,9 @@ KERNEL_FQ void m01000_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -429,7 +427,7 @@ KERNEL_FQ void m01000_m08 (KERN_ATTR_VECTOR ()) * main */ - m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01000_m16 (KERN_ATTR_VECTOR ()) @@ -438,7 +436,9 @@ KERNEL_FQ void m01000_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -467,7 +467,7 @@ KERNEL_FQ void m01000_m16 (KERN_ATTR_VECTOR ()) * main */ - m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01000_s04 (KERN_ATTR_VECTOR ()) @@ -476,7 +476,9 @@ KERNEL_FQ void m01000_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +507,7 @@ KERNEL_FQ void m01000_s04 (KERN_ATTR_VECTOR ()) * main */ - m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01000_s08 (KERN_ATTR_VECTOR ()) @@ -514,7 +516,9 @@ KERNEL_FQ void m01000_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -543,7 +547,7 @@ KERNEL_FQ void m01000_s08 (KERN_ATTR_VECTOR ()) * main */ - m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01000_s16 (KERN_ATTR_VECTOR ()) @@ -552,7 +556,9 @@ KERNEL_FQ void m01000_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -581,5 +587,5 @@ KERNEL_FQ void m01000_s16 (KERN_ATTR_VECTOR ()) * main */ - m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01100_a3-optimized.cl b/OpenCL/m01100_a3-optimized.cl index 1656abb54..8f01c9473 100644 --- a/OpenCL/m01100_a3-optimized.cl +++ b/OpenCL/m01100_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md4.cl) #endif -DECLSPEC void m01100m (LOCAL_AS salt_t *s_salt_buf, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01100m (LOCAL_AS salt_t *s_salt_buf, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -252,15 +249,12 @@ DECLSPEC void m01100m (LOCAL_AS salt_t *s_salt_buf, u32 *w, const u32 pw_len, KE } } -DECLSPEC void m01100s (LOCAL_AS salt_t *s_salt_buf, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01100s (LOCAL_AS salt_t *s_salt_buf, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -508,8 +502,9 @@ KERNEL_FQ void m01100_m04 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -553,7 +548,7 @@ KERNEL_FQ void m01100_m04 (KERN_ATTR_VECTOR ()) * main */ - m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01100_m08 (KERN_ATTR_VECTOR ()) @@ -562,8 +557,9 @@ KERNEL_FQ void m01100_m08 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -607,7 +603,7 @@ KERNEL_FQ void m01100_m08 (KERN_ATTR_VECTOR ()) * main */ - m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01100_m16 (KERN_ATTR_VECTOR ()) @@ -616,8 +612,9 @@ KERNEL_FQ void m01100_m16 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -661,7 +658,7 @@ KERNEL_FQ void m01100_m16 (KERN_ATTR_VECTOR ()) * main */ - m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01100m (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01100_s04 (KERN_ATTR_VECTOR ()) @@ -670,8 +667,9 @@ KERNEL_FQ void m01100_s04 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -715,7 +713,7 @@ KERNEL_FQ void m01100_s04 (KERN_ATTR_VECTOR ()) * main */ - m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01100_s08 (KERN_ATTR_VECTOR ()) @@ -724,8 +722,9 @@ KERNEL_FQ void m01100_s08 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -769,7 +768,7 @@ KERNEL_FQ void m01100_s08 (KERN_ATTR_VECTOR ()) * main */ - m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01100_s16 (KERN_ATTR_VECTOR ()) @@ -778,8 +777,9 @@ KERNEL_FQ void m01100_s16 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -823,5 +823,5 @@ KERNEL_FQ void m01100_s16 (KERN_ATTR_VECTOR ()) * main */ - m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01100s (s_salt_buf, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01300_a3-optimized.cl b/OpenCL/m01300_a3-optimized.cl index 17d61a198..f8ae1ada4 100644 --- a/OpenCL/m01300_a3-optimized.cl +++ b/OpenCL/m01300_a3-optimized.cl @@ -30,15 +30,12 @@ g = 0; \ } -DECLSPEC void m01300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01300m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -149,15 +146,12 @@ DECLSPEC void m01300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m01300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01300s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -305,7 +299,9 @@ KERNEL_FQ void m01300_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -334,7 +330,7 @@ KERNEL_FQ void m01300_m04 (KERN_ATTR_VECTOR ()) * main */ - m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01300_m08 (KERN_ATTR_VECTOR ()) @@ -343,7 +339,9 @@ KERNEL_FQ void m01300_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -372,7 +370,7 @@ KERNEL_FQ void m01300_m08 (KERN_ATTR_VECTOR ()) * main */ - m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01300_m16 (KERN_ATTR_VECTOR ()) @@ -381,7 +379,9 @@ KERNEL_FQ void m01300_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -410,7 +410,7 @@ KERNEL_FQ void m01300_m16 (KERN_ATTR_VECTOR ()) * main */ - m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01300_s04 (KERN_ATTR_VECTOR ()) @@ -419,7 +419,9 @@ KERNEL_FQ void m01300_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -448,7 +450,7 @@ KERNEL_FQ void m01300_s04 (KERN_ATTR_VECTOR ()) * main */ - m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01300_s08 (KERN_ATTR_VECTOR ()) @@ -457,7 +459,9 @@ KERNEL_FQ void m01300_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -486,7 +490,7 @@ KERNEL_FQ void m01300_s08 (KERN_ATTR_VECTOR ()) * main */ - m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01300_s16 (KERN_ATTR_VECTOR ()) @@ -495,7 +499,9 @@ KERNEL_FQ void m01300_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -524,5 +530,5 @@ KERNEL_FQ void m01300_s16 (KERN_ATTR_VECTOR ()) * main */ - m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01400_a3-optimized.cl b/OpenCL/m01400_a3-optimized.cl index 4b7c77b72..b1697134d 100644 --- a/OpenCL/m01400_a3-optimized.cl +++ b/OpenCL/m01400_a3-optimized.cl @@ -31,15 +31,12 @@ h = 0; \ } -DECLSPEC void m01400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01400m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -150,15 +147,12 @@ DECLSPEC void m01400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m01400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01400s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -308,7 +302,9 @@ KERNEL_FQ void m01400_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -337,7 +333,7 @@ KERNEL_FQ void m01400_m04 (KERN_ATTR_VECTOR ()) * main */ - m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01400_m08 (KERN_ATTR_VECTOR ()) @@ -346,7 +342,9 @@ KERNEL_FQ void m01400_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -375,7 +373,7 @@ KERNEL_FQ void m01400_m08 (KERN_ATTR_VECTOR ()) * main */ - m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01400_m16 (KERN_ATTR_VECTOR ()) @@ -384,7 +382,9 @@ KERNEL_FQ void m01400_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -413,7 +413,7 @@ KERNEL_FQ void m01400_m16 (KERN_ATTR_VECTOR ()) * main */ - m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01400_s04 (KERN_ATTR_VECTOR ()) @@ -422,7 +422,9 @@ KERNEL_FQ void m01400_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -451,7 +453,7 @@ KERNEL_FQ void m01400_s04 (KERN_ATTR_VECTOR ()) * main */ - m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01400_s08 (KERN_ATTR_VECTOR ()) @@ -460,7 +462,9 @@ KERNEL_FQ void m01400_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -489,7 +493,7 @@ KERNEL_FQ void m01400_s08 (KERN_ATTR_VECTOR ()) * main */ - m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01400_s16 (KERN_ATTR_VECTOR ()) @@ -498,7 +502,9 @@ KERNEL_FQ void m01400_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -527,5 +533,5 @@ KERNEL_FQ void m01400_s16 (KERN_ATTR_VECTOR ()) * main */ - m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01410_a3-optimized.cl b/OpenCL/m01410_a3-optimized.cl index eec0a7423..60b441760 100644 --- a/OpenCL/m01410_a3-optimized.cl +++ b/OpenCL/m01410_a3-optimized.cl @@ -31,15 +31,12 @@ h = 0; \ } -DECLSPEC void m01410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01410m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -201,15 +198,12 @@ DECLSPEC void m01410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m01410s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01410s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -359,7 +353,9 @@ KERNEL_FQ void m01410_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -388,7 +384,7 @@ KERNEL_FQ void m01410_m04 (KERN_ATTR_VECTOR ()) * main */ - m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01410_m08 (KERN_ATTR_VECTOR ()) @@ -397,7 +393,9 @@ KERNEL_FQ void m01410_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -426,7 +424,7 @@ KERNEL_FQ void m01410_m08 (KERN_ATTR_VECTOR ()) * main */ - m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01410_m16 (KERN_ATTR_VECTOR ()) @@ -435,7 +433,9 @@ KERNEL_FQ void m01410_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -464,7 +464,7 @@ KERNEL_FQ void m01410_m16 (KERN_ATTR_VECTOR ()) * main */ - m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01410_s04 (KERN_ATTR_VECTOR ()) @@ -473,7 +473,9 @@ KERNEL_FQ void m01410_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -502,7 +504,7 @@ KERNEL_FQ void m01410_s04 (KERN_ATTR_VECTOR ()) * main */ - m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01410_s08 (KERN_ATTR_VECTOR ()) @@ -511,7 +513,9 @@ KERNEL_FQ void m01410_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -540,7 +544,7 @@ KERNEL_FQ void m01410_s08 (KERN_ATTR_VECTOR ()) * main */ - m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01410_s16 (KERN_ATTR_VECTOR ()) @@ -549,7 +553,9 @@ KERNEL_FQ void m01410_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -578,5 +584,5 @@ KERNEL_FQ void m01410_s16 (KERN_ATTR_VECTOR ()) * main */ - m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01420_a3-optimized.cl b/OpenCL/m01420_a3-optimized.cl index 30c86b72c..ad727387f 100644 --- a/OpenCL/m01420_a3-optimized.cl +++ b/OpenCL/m01420_a3-optimized.cl @@ -31,15 +31,12 @@ h = 0; \ } -DECLSPEC void m01420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01420m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -225,15 +222,12 @@ DECLSPEC void m01420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m01420s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01420s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -458,7 +452,9 @@ KERNEL_FQ void m01420_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -496,7 +492,7 @@ KERNEL_FQ void m01420_m04 (KERN_ATTR_BASIC ()) * main */ - m01420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01420_m08 (KERN_ATTR_BASIC ()) @@ -505,7 +501,9 @@ KERNEL_FQ void m01420_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -543,7 +541,7 @@ KERNEL_FQ void m01420_m08 (KERN_ATTR_BASIC ()) * main */ - m01420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01420_m16 (KERN_ATTR_BASIC ()) @@ -552,7 +550,9 @@ KERNEL_FQ void m01420_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -590,7 +590,7 @@ KERNEL_FQ void m01420_m16 (KERN_ATTR_BASIC ()) * main */ - m01420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01420_s04 (KERN_ATTR_BASIC ()) @@ -599,7 +599,9 @@ KERNEL_FQ void m01420_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -637,7 +639,7 @@ KERNEL_FQ void m01420_s04 (KERN_ATTR_BASIC ()) * main */ - m01420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01420_s08 (KERN_ATTR_BASIC ()) @@ -646,7 +648,9 @@ KERNEL_FQ void m01420_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -684,7 +688,7 @@ KERNEL_FQ void m01420_s08 (KERN_ATTR_BASIC ()) * main */ - m01420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01420_s16 (KERN_ATTR_BASIC ()) @@ -693,7 +697,9 @@ KERNEL_FQ void m01420_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -731,5 +737,5 @@ KERNEL_FQ void m01420_s16 (KERN_ATTR_BASIC ()) * main */ - m01420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01430_a3-optimized.cl b/OpenCL/m01430_a3-optimized.cl index 23f82f130..c31da8a3f 100644 --- a/OpenCL/m01430_a3-optimized.cl +++ b/OpenCL/m01430_a3-optimized.cl @@ -31,15 +31,12 @@ h = 0; \ } -DECLSPEC void m01430m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01430m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -201,15 +198,12 @@ DECLSPEC void m01430m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m01430s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01430s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -359,7 +353,9 @@ KERNEL_FQ void m01430_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -388,7 +384,7 @@ KERNEL_FQ void m01430_m04 (KERN_ATTR_VECTOR ()) * main */ - m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01430_m08 (KERN_ATTR_VECTOR ()) @@ -397,7 +393,9 @@ KERNEL_FQ void m01430_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -426,7 +424,7 @@ KERNEL_FQ void m01430_m08 (KERN_ATTR_VECTOR ()) * main */ - m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01430_m16 (KERN_ATTR_VECTOR ()) @@ -435,7 +433,9 @@ KERNEL_FQ void m01430_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -464,7 +464,7 @@ KERNEL_FQ void m01430_m16 (KERN_ATTR_VECTOR ()) * main */ - m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01430m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01430_s04 (KERN_ATTR_VECTOR ()) @@ -473,7 +473,9 @@ KERNEL_FQ void m01430_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -502,7 +504,7 @@ KERNEL_FQ void m01430_s04 (KERN_ATTR_VECTOR ()) * main */ - m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01430_s08 (KERN_ATTR_VECTOR ()) @@ -511,7 +513,9 @@ KERNEL_FQ void m01430_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -540,7 +544,7 @@ KERNEL_FQ void m01430_s08 (KERN_ATTR_VECTOR ()) * main */ - m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01430_s16 (KERN_ATTR_VECTOR ()) @@ -549,7 +553,9 @@ KERNEL_FQ void m01430_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -578,5 +584,5 @@ KERNEL_FQ void m01430_s16 (KERN_ATTR_VECTOR ()) * main */ - m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01430s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01440_a3-optimized.cl b/OpenCL/m01440_a3-optimized.cl index 8df73af40..fbc26273e 100644 --- a/OpenCL/m01440_a3-optimized.cl +++ b/OpenCL/m01440_a3-optimized.cl @@ -31,15 +31,12 @@ h = 0; \ } -DECLSPEC void m01440m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01440m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -225,15 +222,12 @@ DECLSPEC void m01440m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m01440s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01440s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -458,7 +452,9 @@ KERNEL_FQ void m01440_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -496,7 +492,7 @@ KERNEL_FQ void m01440_m04 (KERN_ATTR_BASIC ()) * main */ - m01440m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01440m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01440_m08 (KERN_ATTR_BASIC ()) @@ -505,7 +501,9 @@ KERNEL_FQ void m01440_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -543,7 +541,7 @@ KERNEL_FQ void m01440_m08 (KERN_ATTR_BASIC ()) * main */ - m01440m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01440m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01440_m16 (KERN_ATTR_BASIC ()) @@ -552,7 +550,9 @@ KERNEL_FQ void m01440_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -590,7 +590,7 @@ KERNEL_FQ void m01440_m16 (KERN_ATTR_BASIC ()) * main */ - m01440m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01440m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01440_s04 (KERN_ATTR_BASIC ()) @@ -599,7 +599,9 @@ KERNEL_FQ void m01440_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -637,7 +639,7 @@ KERNEL_FQ void m01440_s04 (KERN_ATTR_BASIC ()) * main */ - m01440s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01440s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01440_s08 (KERN_ATTR_BASIC ()) @@ -646,7 +648,9 @@ KERNEL_FQ void m01440_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -684,7 +688,7 @@ KERNEL_FQ void m01440_s08 (KERN_ATTR_BASIC ()) * main */ - m01440s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01440s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01440_s16 (KERN_ATTR_BASIC ()) @@ -693,7 +697,9 @@ KERNEL_FQ void m01440_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -731,5 +737,5 @@ KERNEL_FQ void m01440_s16 (KERN_ATTR_BASIC ()) * main */ - m01440s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01440s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01450_a0-optimized.cl b/OpenCL/m01450_a0-optimized.cl index 0761736e2..0501b8f40 100644 --- a/OpenCL/m01450_a0-optimized.cl +++ b/OpenCL/m01450_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha256.cl) #endif -DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -78,7 +78,7 @@ DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m01450_a1-optimized.cl b/OpenCL/m01450_a1-optimized.cl index 82d1b0cbf..66268a43d 100644 --- a/OpenCL/m01450_a1-optimized.cl +++ b/OpenCL/m01450_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha256.cl) #endif -DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -76,7 +76,7 @@ DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m01450_a3-optimized.cl b/OpenCL/m01450_a3-optimized.cl index 88f9fa288..1a67af5c8 100644 --- a/OpenCL/m01450_a3-optimized.cl +++ b/OpenCL/m01450_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha256.cl) #endif -DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -76,7 +76,7 @@ DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -118,15 +118,12 @@ DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa sha256_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void m01450m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01450m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -223,15 +220,12 @@ DECLSPEC void m01450m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m01450s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01450s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -346,7 +340,9 @@ KERNEL_FQ void m01450_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -384,7 +380,7 @@ KERNEL_FQ void m01450_m04 (KERN_ATTR_BASIC ()) * main */ - m01450m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01450m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01450_m08 (KERN_ATTR_BASIC ()) @@ -393,7 +389,9 @@ KERNEL_FQ void m01450_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -431,7 +429,7 @@ KERNEL_FQ void m01450_m08 (KERN_ATTR_BASIC ()) * main */ - m01450m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01450m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01450_m16 (KERN_ATTR_BASIC ()) @@ -440,7 +438,9 @@ KERNEL_FQ void m01450_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -478,7 +478,7 @@ KERNEL_FQ void m01450_m16 (KERN_ATTR_BASIC ()) * main */ - m01450m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01450m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01450_s04 (KERN_ATTR_BASIC ()) @@ -487,7 +487,9 @@ KERNEL_FQ void m01450_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -525,7 +527,7 @@ KERNEL_FQ void m01450_s04 (KERN_ATTR_BASIC ()) * main */ - m01450s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01450s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01450_s08 (KERN_ATTR_BASIC ()) @@ -534,7 +536,9 @@ KERNEL_FQ void m01450_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -572,7 +576,7 @@ KERNEL_FQ void m01450_s08 (KERN_ATTR_BASIC ()) * main */ - m01450s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01450s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01450_s16 (KERN_ATTR_BASIC ()) @@ -581,7 +585,9 @@ KERNEL_FQ void m01450_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -619,5 +625,5 @@ KERNEL_FQ void m01450_s16 (KERN_ATTR_BASIC ()) * main */ - m01450s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01450s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01460_a0-optimized.cl b/OpenCL/m01460_a0-optimized.cl index 265b8b548..2529f46a3 100644 --- a/OpenCL/m01460_a0-optimized.cl +++ b/OpenCL/m01460_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha256.cl) #endif -DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -78,7 +78,7 @@ DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m01460_a1-optimized.cl b/OpenCL/m01460_a1-optimized.cl index f417f12f9..0273d5be3 100644 --- a/OpenCL/m01460_a1-optimized.cl +++ b/OpenCL/m01460_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha256.cl) #endif -DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -76,7 +76,7 @@ DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m01460_a3-optimized.cl b/OpenCL/m01460_a3-optimized.cl index ac8541723..c1f0777ee 100644 --- a/OpenCL/m01460_a3-optimized.cl +++ b/OpenCL/m01460_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha256.cl) #endif -DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -76,7 +76,7 @@ DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -118,15 +118,12 @@ DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa sha256_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void m01460m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01460m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -221,15 +218,12 @@ DECLSPEC void m01460m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m01460s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01460s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -342,7 +336,9 @@ KERNEL_FQ void m01460_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -380,7 +376,7 @@ KERNEL_FQ void m01460_m04 (KERN_ATTR_BASIC ()) * main */ - m01460m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01460m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01460_m08 (KERN_ATTR_BASIC ()) @@ -389,7 +385,9 @@ KERNEL_FQ void m01460_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -427,7 +425,7 @@ KERNEL_FQ void m01460_m08 (KERN_ATTR_BASIC ()) * main */ - m01460m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01460m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01460_m16 (KERN_ATTR_BASIC ()) @@ -436,7 +434,9 @@ KERNEL_FQ void m01460_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -474,7 +474,7 @@ KERNEL_FQ void m01460_m16 (KERN_ATTR_BASIC ()) * main */ - m01460m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01460m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01460_s04 (KERN_ATTR_BASIC ()) @@ -483,7 +483,9 @@ KERNEL_FQ void m01460_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -521,7 +523,7 @@ KERNEL_FQ void m01460_s04 (KERN_ATTR_BASIC ()) * main */ - m01460s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01460s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01460_s08 (KERN_ATTR_BASIC ()) @@ -530,7 +532,9 @@ KERNEL_FQ void m01460_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -568,7 +572,7 @@ KERNEL_FQ void m01460_s08 (KERN_ATTR_BASIC ()) * main */ - m01460s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01460s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01460_s16 (KERN_ATTR_BASIC ()) @@ -577,7 +581,9 @@ KERNEL_FQ void m01460_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -615,5 +621,5 @@ KERNEL_FQ void m01460_s16 (KERN_ATTR_BASIC ()) * main */ - m01460s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01460s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01470_a3-optimized.cl b/OpenCL/m01470_a3-optimized.cl index 21c62174c..719724d56 100644 --- a/OpenCL/m01470_a3-optimized.cl +++ b/OpenCL/m01470_a3-optimized.cl @@ -31,15 +31,12 @@ h = 0; \ } -DECLSPEC void m01470m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01470m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -176,15 +173,12 @@ DECLSPEC void m01470m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m01470s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01470s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -360,7 +354,9 @@ KERNEL_FQ void m01470_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -398,7 +394,7 @@ KERNEL_FQ void m01470_m04 (KERN_ATTR_BASIC ()) * main */ - m01470m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01470m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01470_m08 (KERN_ATTR_BASIC ()) @@ -407,7 +403,9 @@ KERNEL_FQ void m01470_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -445,7 +443,7 @@ KERNEL_FQ void m01470_m08 (KERN_ATTR_BASIC ()) * main */ - m01470m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01470m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01470_m16 (KERN_ATTR_BASIC ()) @@ -454,7 +452,9 @@ KERNEL_FQ void m01470_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -492,7 +492,7 @@ KERNEL_FQ void m01470_m16 (KERN_ATTR_BASIC ()) * main */ - m01470m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01470m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01470_s04 (KERN_ATTR_BASIC ()) @@ -501,7 +501,9 @@ KERNEL_FQ void m01470_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -539,7 +541,7 @@ KERNEL_FQ void m01470_s04 (KERN_ATTR_BASIC ()) * main */ - m01470s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01470s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01470_s08 (KERN_ATTR_BASIC ()) @@ -548,7 +550,9 @@ KERNEL_FQ void m01470_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -586,7 +590,7 @@ KERNEL_FQ void m01470_s08 (KERN_ATTR_BASIC ()) * main */ - m01470s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01470s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01470_s16 (KERN_ATTR_BASIC ()) @@ -595,7 +599,9 @@ KERNEL_FQ void m01470_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -633,5 +639,5 @@ KERNEL_FQ void m01470_s16 (KERN_ATTR_BASIC ()) * main */ - m01470s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01470s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01500_a0-pure.cl b/OpenCL/m01500_a0-pure.cl index 25a8fa798..794249a65 100644 --- a/OpenCL/m01500_a0-pure.cl +++ b/OpenCL/m01500_a0-pure.cl @@ -346,7 +346,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -415,7 +415,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u } } -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, u32 mask, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E1 = (mask >> 2) & 0x3f0; const u32 E0 = mask & 0x3f; diff --git a/OpenCL/m01500_a1-pure.cl b/OpenCL/m01500_a1-pure.cl index 9221bd200..1a4516896 100644 --- a/OpenCL/m01500_a1-pure.cl +++ b/OpenCL/m01500_a1-pure.cl @@ -344,7 +344,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -413,7 +413,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u } } -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, u32 mask, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E1 = (mask >> 2) & 0x3f0; const u32 E0 = mask & 0x3f; diff --git a/OpenCL/m01500_a3-pure.cl b/OpenCL/m01500_a3-pure.cl index 0e118fc2a..1b5480929 100644 --- a/OpenCL/m01500_a3-pure.cl +++ b/OpenCL/m01500_a3-pure.cl @@ -58,7 +58,7 @@ #define LUT(a,b,c,d,e) u32 a; asm ("lop3.b32 %0, %1, %2, %3, "#e";" : "=r"(a): "r"(b), "r"(c), "r"(d)); -DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT (xAA55AA5500550055, a1, a4, a6, 0xC1) LUT (xA55AA55AF0F5F0F5, a3, a6, xAA55AA5500550055, 0x9E) @@ -92,7 +92,7 @@ DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT (xEEEEEEEE99999999, a1, a2, a6, 0x97) LUT (xFFFFEEEE66666666, a5, a6, xEEEEEEEE99999999, 0x67) @@ -125,7 +125,7 @@ DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT (xA50FA50FA50FA50F, a1, a3, a4, 0xC9) LUT (xF0F00F0FF0F0F0F0, a3, a5, a6, 0x4B) @@ -159,7 +159,7 @@ DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT (x55F055F055F055F0, a1, a3, a4, 0x72) LUT (xA500F5F0A500F5F0, a3, a5, x55F055F055F055F0, 0xAD) @@ -186,7 +186,7 @@ DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT (xA0A0A0A0FFFFFFFF, a1, a3, a6, 0xAB) LUT (xFFFF00005555FFFF, a1, a5, a6, 0xB9) @@ -220,7 +220,7 @@ DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT (x5050F5F55050F5F5, a1, a3, a5, 0xB2) LUT (x6363C6C66363C6C6, a1, a2, x5050F5F55050F5F5, 0x66) @@ -253,7 +253,7 @@ DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT (x88AA88AA88AA88AA, a1, a2, a4, 0x0B) LUT (xAAAAFF00AAAAFF00, a1, a4, a5, 0x27) @@ -286,7 +286,7 @@ DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT (xEEEE3333EEEE3333, a1, a2, a5, 0x9D) LUT (xBBBBBBBBBBBBBBBB, a1, a1, a2, 0x83) @@ -344,7 +344,7 @@ DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -419,7 +419,7 @@ DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -490,7 +490,7 @@ DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -561,7 +561,7 @@ DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out3 ^= x21; } -DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -615,7 +615,7 @@ DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -688,7 +688,7 @@ DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -761,7 +761,7 @@ DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out1 ^= x01; } -DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -832,7 +832,7 @@ DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -925,7 +925,7 @@ DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -1000,7 +1000,7 @@ DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -1071,7 +1071,7 @@ DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -1142,7 +1142,7 @@ DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out3 ^= x21; } -DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -1196,7 +1196,7 @@ DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -1269,7 +1269,7 @@ DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -1342,7 +1342,7 @@ DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out1 ^= x01; } -DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -1413,7 +1413,7 @@ DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -1537,7 +1537,7 @@ DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const #ifdef DESCRYPT_SALT -DECLSPEC void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) +DECLSPEC void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, PRIVATE_AS u32 *D00, PRIVATE_AS u32 *D01, PRIVATE_AS u32 *D02, PRIVATE_AS u32 *D03, PRIVATE_AS u32 *D04, PRIVATE_AS u32 *D05, PRIVATE_AS u32 *D06, PRIVATE_AS u32 *D07, PRIVATE_AS u32 *D08, PRIVATE_AS u32 *D09, PRIVATE_AS u32 *D10, PRIVATE_AS u32 *D11, PRIVATE_AS u32 *D12, PRIVATE_AS u32 *D13, PRIVATE_AS u32 *D14, PRIVATE_AS u32 *D15, PRIVATE_AS u32 *D16, PRIVATE_AS u32 *D17, PRIVATE_AS u32 *D18, PRIVATE_AS u32 *D19, PRIVATE_AS u32 *D20, PRIVATE_AS u32 *D21, PRIVATE_AS u32 *D22, PRIVATE_AS u32 *D23, PRIVATE_AS u32 *D24, PRIVATE_AS u32 *D25, PRIVATE_AS u32 *D26, PRIVATE_AS u32 *D27, PRIVATE_AS u32 *D28, PRIVATE_AS u32 *D29, PRIVATE_AS u32 *D30, PRIVATE_AS u32 *D31, PRIVATE_AS u32 *D32, PRIVATE_AS u32 *D33, PRIVATE_AS u32 *D34, PRIVATE_AS u32 *D35, PRIVATE_AS u32 *D36, PRIVATE_AS u32 *D37, PRIVATE_AS u32 *D38, PRIVATE_AS u32 *D39, PRIVATE_AS u32 *D40, PRIVATE_AS u32 *D41, PRIVATE_AS u32 *D42, PRIVATE_AS u32 *D43, PRIVATE_AS u32 *D44, PRIVATE_AS u32 *D45, PRIVATE_AS u32 *D46, PRIVATE_AS u32 *D47, PRIVATE_AS u32 *D48, PRIVATE_AS u32 *D49, PRIVATE_AS u32 *D50, PRIVATE_AS u32 *D51, PRIVATE_AS u32 *D52, PRIVATE_AS u32 *D53, PRIVATE_AS u32 *D54, PRIVATE_AS u32 *D55, PRIVATE_AS u32 *D56, PRIVATE_AS u32 *D57, PRIVATE_AS u32 *D58, PRIVATE_AS u32 *D59, PRIVATE_AS u32 *D60, PRIVATE_AS u32 *D61, PRIVATE_AS u32 *D62, PRIVATE_AS u32 *D63) { const u32 s001 = (0x001 & DESCRYPT_SALT) ? 1 : 0; const u32 s002 = (0x002 & DESCRYPT_SALT) ? 1 : 0; @@ -1665,7 +1665,7 @@ DECLSPEC void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 #else -DECLSPEC void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) +DECLSPEC void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, PRIVATE_AS u32 *D00, PRIVATE_AS u32 *D01, PRIVATE_AS u32 *D02, PRIVATE_AS u32 *D03, PRIVATE_AS u32 *D04, PRIVATE_AS u32 *D05, PRIVATE_AS u32 *D06, PRIVATE_AS u32 *D07, PRIVATE_AS u32 *D08, PRIVATE_AS u32 *D09, PRIVATE_AS u32 *D10, PRIVATE_AS u32 *D11, PRIVATE_AS u32 *D12, PRIVATE_AS u32 *D13, PRIVATE_AS u32 *D14, PRIVATE_AS u32 *D15, PRIVATE_AS u32 *D16, PRIVATE_AS u32 *D17, PRIVATE_AS u32 *D18, PRIVATE_AS u32 *D19, PRIVATE_AS u32 *D20, PRIVATE_AS u32 *D21, PRIVATE_AS u32 *D22, PRIVATE_AS u32 *D23, PRIVATE_AS u32 *D24, PRIVATE_AS u32 *D25, PRIVATE_AS u32 *D26, PRIVATE_AS u32 *D27, PRIVATE_AS u32 *D28, PRIVATE_AS u32 *D29, PRIVATE_AS u32 *D30, PRIVATE_AS u32 *D31, PRIVATE_AS u32 *D32, PRIVATE_AS u32 *D33, PRIVATE_AS u32 *D34, PRIVATE_AS u32 *D35, PRIVATE_AS u32 *D36, PRIVATE_AS u32 *D37, PRIVATE_AS u32 *D38, PRIVATE_AS u32 *D39, PRIVATE_AS u32 *D40, PRIVATE_AS u32 *D41, PRIVATE_AS u32 *D42, PRIVATE_AS u32 *D43, PRIVATE_AS u32 *D44, PRIVATE_AS u32 *D45, PRIVATE_AS u32 *D46, PRIVATE_AS u32 *D47, PRIVATE_AS u32 *D48, PRIVATE_AS u32 *D49, PRIVATE_AS u32 *D50, PRIVATE_AS u32 *D51, PRIVATE_AS u32 *D52, PRIVATE_AS u32 *D53, PRIVATE_AS u32 *D54, PRIVATE_AS u32 *D55, PRIVATE_AS u32 *D56, PRIVATE_AS u32 *D57, PRIVATE_AS u32 *D58, PRIVATE_AS u32 *D59, PRIVATE_AS u32 *D60, PRIVATE_AS u32 *D61, PRIVATE_AS u32 *D62, PRIVATE_AS u32 *D63) { const u32 s001 = (0x001 & SALT) ? 1 : 0; const u32 s002 = (0x002 & SALT) ? 1 : 0; @@ -1793,7 +1793,7 @@ DECLSPEC void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 #endif -DECLSPEC void transpose32c (u32 *data) +DECLSPEC void transpose32c (PRIVATE_AS u32 *data) { #define swap(x,y,j,m) \ t = ((x) ^ ((y) >> (j))) & (m); \ @@ -1888,7 +1888,7 @@ DECLSPEC void transpose32c (u32 *data) // transpose bitslice mod : attention race conditions, need different buffers for *in and *out // -KERNEL_FQ void m01500_tm (GLOBAL_AS u32 *mod, GLOBAL_AS bs_word_t *words_buf_b) +KERNEL_FQ void m01500_tm (KERN_ATTR_TM) { const u64 gid = get_global_id (0); diff --git a/OpenCL/m01600-optimized.cl b/OpenCL/m01600-optimized.cl index 82f7fa65b..4c75b7015 100644 --- a/OpenCL/m01600-optimized.cl +++ b/OpenCL/m01600-optimized.cl @@ -26,7 +26,7 @@ typedef struct md5crypt_tmp #define md5apr1_magic0 0x72706124u #define md5apr1_magic1 0x00002431u -DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16 (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 offset, PRIVATE_AS const u32 *append) { u32 tmp0; u32 tmp1; @@ -139,7 +139,7 @@ DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, cons } } -DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16_x80 (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 offset, PRIVATE_AS const u32 *append) { u32 tmp0; u32 tmp1; @@ -254,7 +254,7 @@ DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, } } -DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat8 (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 offset, PRIVATE_AS const u32 *append) { u32 tmp0; u32 tmp1; @@ -345,7 +345,7 @@ DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const } } -DECLSPEC void append_sign (u32 *block0, u32 *block1, const u32 block_len) +DECLSPEC void append_sign (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, const u32 block_len) { switch (block_len) { @@ -443,7 +443,7 @@ DECLSPEC void append_sign (u32 *block0, u32 *block1, const u32 block_len) } } -DECLSPEC void append_1st (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 block_len, const u32 append) +DECLSPEC void append_1st (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 block_len, const u32 append) { switch (block_len) { diff --git a/OpenCL/m01700_a0-optimized.cl b/OpenCL/m01700_a0-optimized.cl index 6007c137b..381013c2f 100644 --- a/OpenCL/m01700_a0-optimized.cl +++ b/OpenCL/m01700_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01700_a1-optimized.cl b/OpenCL/m01700_a1-optimized.cl index 983d88374..eb5e61776 100644 --- a/OpenCL/m01700_a1-optimized.cl +++ b/OpenCL/m01700_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01700_a3-optimized.cl b/OpenCL/m01700_a3-optimized.cl index 0dca43b6d..af6d9a36d 100644 --- a/OpenCL/m01700_a3-optimized.cl +++ b/OpenCL/m01700_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = h; } -DECLSPEC void m01700m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01700m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -188,15 +185,12 @@ DECLSPEC void m01700m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m01700s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01700s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -271,7 +265,9 @@ KERNEL_FQ void m01700_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -300,7 +296,7 @@ KERNEL_FQ void m01700_m04 (KERN_ATTR_VECTOR ()) * main */ - m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01700_m08 (KERN_ATTR_VECTOR ()) @@ -309,7 +305,9 @@ KERNEL_FQ void m01700_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -338,7 +336,7 @@ KERNEL_FQ void m01700_m08 (KERN_ATTR_VECTOR ()) * main */ - m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01700_m16 (KERN_ATTR_VECTOR ()) @@ -347,7 +345,9 @@ KERNEL_FQ void m01700_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -376,7 +376,7 @@ KERNEL_FQ void m01700_m16 (KERN_ATTR_VECTOR ()) * main */ - m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01700_s04 (KERN_ATTR_VECTOR ()) @@ -385,7 +385,9 @@ KERNEL_FQ void m01700_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -414,7 +416,7 @@ KERNEL_FQ void m01700_s04 (KERN_ATTR_VECTOR ()) * main */ - m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01700_s08 (KERN_ATTR_VECTOR ()) @@ -423,7 +425,9 @@ KERNEL_FQ void m01700_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -452,7 +456,7 @@ KERNEL_FQ void m01700_s08 (KERN_ATTR_VECTOR ()) * main */ - m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01700_s16 (KERN_ATTR_VECTOR ()) @@ -461,7 +465,9 @@ KERNEL_FQ void m01700_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -490,5 +496,5 @@ KERNEL_FQ void m01700_s16 (KERN_ATTR_VECTOR ()) * main */ - m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01710_a0-optimized.cl b/OpenCL/m01710_a0-optimized.cl index c588502cc..b31fc4edd 100644 --- a/OpenCL/m01710_a0-optimized.cl +++ b/OpenCL/m01710_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01710_a1-optimized.cl b/OpenCL/m01710_a1-optimized.cl index db523799c..d2cd4cc0d 100644 --- a/OpenCL/m01710_a1-optimized.cl +++ b/OpenCL/m01710_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01710_a3-optimized.cl b/OpenCL/m01710_a3-optimized.cl index 6f1b29663..39f4a00ec 100644 --- a/OpenCL/m01710_a3-optimized.cl +++ b/OpenCL/m01710_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = h; } -DECLSPEC void m01710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01710m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -239,15 +236,12 @@ DECLSPEC void m01710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m01710s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01710s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -322,7 +316,9 @@ KERNEL_FQ void m01710_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -351,7 +347,7 @@ KERNEL_FQ void m01710_m04 (KERN_ATTR_VECTOR ()) * main */ - m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01710_m08 (KERN_ATTR_VECTOR ()) @@ -360,7 +356,9 @@ KERNEL_FQ void m01710_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -389,7 +387,7 @@ KERNEL_FQ void m01710_m08 (KERN_ATTR_VECTOR ()) * main */ - m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01710_m16 (KERN_ATTR_VECTOR ()) @@ -398,7 +396,9 @@ KERNEL_FQ void m01710_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -427,7 +427,7 @@ KERNEL_FQ void m01710_m16 (KERN_ATTR_VECTOR ()) * main */ - m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01710_s04 (KERN_ATTR_VECTOR ()) @@ -436,7 +436,9 @@ KERNEL_FQ void m01710_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -465,7 +467,7 @@ KERNEL_FQ void m01710_s04 (KERN_ATTR_VECTOR ()) * main */ - m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01710_s08 (KERN_ATTR_VECTOR ()) @@ -474,7 +476,9 @@ KERNEL_FQ void m01710_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -503,7 +507,7 @@ KERNEL_FQ void m01710_s08 (KERN_ATTR_VECTOR ()) * main */ - m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01710_s16 (KERN_ATTR_VECTOR ()) @@ -512,7 +516,9 @@ KERNEL_FQ void m01710_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -541,5 +547,5 @@ KERNEL_FQ void m01710_s16 (KERN_ATTR_VECTOR ()) * main */ - m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01720_a0-optimized.cl b/OpenCL/m01720_a0-optimized.cl index 6745c4a24..2818066d8 100644 --- a/OpenCL/m01720_a0-optimized.cl +++ b/OpenCL/m01720_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01720_a1-optimized.cl b/OpenCL/m01720_a1-optimized.cl index 5f0771e01..444be57ce 100644 --- a/OpenCL/m01720_a1-optimized.cl +++ b/OpenCL/m01720_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01720_a3-optimized.cl b/OpenCL/m01720_a3-optimized.cl index 5b85468cd..328703320 100644 --- a/OpenCL/m01720_a3-optimized.cl +++ b/OpenCL/m01720_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = h; } -DECLSPEC void m01720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01720m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -241,15 +238,12 @@ DECLSPEC void m01720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m01720s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01720s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -377,7 +371,9 @@ KERNEL_FQ void m01720_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -415,7 +411,7 @@ KERNEL_FQ void m01720_m04 (KERN_ATTR_BASIC ()) * main */ - m01720m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01720m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01720_m08 (KERN_ATTR_BASIC ()) @@ -424,7 +420,9 @@ KERNEL_FQ void m01720_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -462,7 +460,7 @@ KERNEL_FQ void m01720_m08 (KERN_ATTR_BASIC ()) * main */ - m01720m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01720m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01720_m16 (KERN_ATTR_BASIC ()) @@ -471,7 +469,9 @@ KERNEL_FQ void m01720_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -509,7 +509,7 @@ KERNEL_FQ void m01720_m16 (KERN_ATTR_BASIC ()) * main */ - m01720m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01720m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01720_s04 (KERN_ATTR_BASIC ()) @@ -518,7 +518,9 @@ KERNEL_FQ void m01720_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -556,7 +558,7 @@ KERNEL_FQ void m01720_s04 (KERN_ATTR_BASIC ()) * main */ - m01720s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01720s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01720_s08 (KERN_ATTR_BASIC ()) @@ -565,7 +567,9 @@ KERNEL_FQ void m01720_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -603,7 +607,7 @@ KERNEL_FQ void m01720_s08 (KERN_ATTR_BASIC ()) * main */ - m01720s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01720s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01720_s16 (KERN_ATTR_BASIC ()) @@ -612,7 +616,9 @@ KERNEL_FQ void m01720_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -650,5 +656,5 @@ KERNEL_FQ void m01720_s16 (KERN_ATTR_BASIC ()) * main */ - m01720s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01720s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01730_a0-optimized.cl b/OpenCL/m01730_a0-optimized.cl index 83eee25a9..fe3273803 100644 --- a/OpenCL/m01730_a0-optimized.cl +++ b/OpenCL/m01730_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01730_a1-optimized.cl b/OpenCL/m01730_a1-optimized.cl index 20f3a30cb..6017cc13c 100644 --- a/OpenCL/m01730_a1-optimized.cl +++ b/OpenCL/m01730_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01730_a3-optimized.cl b/OpenCL/m01730_a3-optimized.cl index c6c13dd6b..24e9e666d 100644 --- a/OpenCL/m01730_a3-optimized.cl +++ b/OpenCL/m01730_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = h; } -DECLSPEC void m01730m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01730m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -239,15 +236,12 @@ DECLSPEC void m01730m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m01730s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01730s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -322,7 +316,9 @@ KERNEL_FQ void m01730_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -351,7 +347,7 @@ KERNEL_FQ void m01730_m04 (KERN_ATTR_VECTOR ()) * main */ - m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01730_m08 (KERN_ATTR_VECTOR ()) @@ -360,7 +356,9 @@ KERNEL_FQ void m01730_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -389,7 +387,7 @@ KERNEL_FQ void m01730_m08 (KERN_ATTR_VECTOR ()) * main */ - m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01730_m16 (KERN_ATTR_VECTOR ()) @@ -398,7 +396,9 @@ KERNEL_FQ void m01730_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -427,7 +427,7 @@ KERNEL_FQ void m01730_m16 (KERN_ATTR_VECTOR ()) * main */ - m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01730m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01730_s04 (KERN_ATTR_VECTOR ()) @@ -436,7 +436,9 @@ KERNEL_FQ void m01730_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -465,7 +467,7 @@ KERNEL_FQ void m01730_s04 (KERN_ATTR_VECTOR ()) * main */ - m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01730_s08 (KERN_ATTR_VECTOR ()) @@ -474,7 +476,9 @@ KERNEL_FQ void m01730_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -503,7 +507,7 @@ KERNEL_FQ void m01730_s08 (KERN_ATTR_VECTOR ()) * main */ - m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01730_s16 (KERN_ATTR_VECTOR ()) @@ -512,7 +516,9 @@ KERNEL_FQ void m01730_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -541,5 +547,5 @@ KERNEL_FQ void m01730_s16 (KERN_ATTR_VECTOR ()) * main */ - m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01730s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01740_a0-optimized.cl b/OpenCL/m01740_a0-optimized.cl index 327402b7a..f5d634e2f 100644 --- a/OpenCL/m01740_a0-optimized.cl +++ b/OpenCL/m01740_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01740_a1-optimized.cl b/OpenCL/m01740_a1-optimized.cl index 3899d5d46..e413f1af5 100644 --- a/OpenCL/m01740_a1-optimized.cl +++ b/OpenCL/m01740_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01740_a3-optimized.cl b/OpenCL/m01740_a3-optimized.cl index 1c37c3210..efa4bf28d 100644 --- a/OpenCL/m01740_a3-optimized.cl +++ b/OpenCL/m01740_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = h; } -DECLSPEC void m01740m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01740m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -241,15 +238,12 @@ DECLSPEC void m01740m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m01740s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01740s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -377,7 +371,9 @@ KERNEL_FQ void m01740_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -415,7 +411,7 @@ KERNEL_FQ void m01740_m04 (KERN_ATTR_BASIC ()) * main */ - m01740m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01740m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01740_m08 (KERN_ATTR_BASIC ()) @@ -424,7 +420,9 @@ KERNEL_FQ void m01740_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -462,7 +460,7 @@ KERNEL_FQ void m01740_m08 (KERN_ATTR_BASIC ()) * main */ - m01740m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01740m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01740_m16 (KERN_ATTR_BASIC ()) @@ -471,7 +469,9 @@ KERNEL_FQ void m01740_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -509,7 +509,7 @@ KERNEL_FQ void m01740_m16 (KERN_ATTR_BASIC ()) * main */ - m01740m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01740m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01740_s04 (KERN_ATTR_BASIC ()) @@ -518,7 +518,9 @@ KERNEL_FQ void m01740_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -556,7 +558,7 @@ KERNEL_FQ void m01740_s04 (KERN_ATTR_BASIC ()) * main */ - m01740s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01740s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01740_s08 (KERN_ATTR_BASIC ()) @@ -565,7 +567,9 @@ KERNEL_FQ void m01740_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -603,7 +607,7 @@ KERNEL_FQ void m01740_s08 (KERN_ATTR_BASIC ()) * main */ - m01740s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01740s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01740_s16 (KERN_ATTR_BASIC ()) @@ -612,7 +616,9 @@ KERNEL_FQ void m01740_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -650,5 +656,5 @@ KERNEL_FQ void m01740_s16 (KERN_ATTR_BASIC ()) * main */ - m01740s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01740s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01750_a0-optimized.cl b/OpenCL/m01750_a0-optimized.cl index 4cc8bfa9a..2af893c8f 100644 --- a/OpenCL/m01750_a0-optimized.cl +++ b/OpenCL/m01750_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (PRIVATE_AS const u64x *w0, PRIVATE_AS const u64x *w1, PRIVATE_AS const u64x *w2, PRIVATE_AS const u64x *w3, PRIVATE_AS u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -66,7 +66,7 @@ DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -130,7 +130,7 @@ DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipa sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; diff --git a/OpenCL/m01750_a1-optimized.cl b/OpenCL/m01750_a1-optimized.cl index 83cba3426..d6b403d45 100644 --- a/OpenCL/m01750_a1-optimized.cl +++ b/OpenCL/m01750_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (PRIVATE_AS const u64x *w0, PRIVATE_AS const u64x *w1, PRIVATE_AS const u64x *w2, PRIVATE_AS const u64x *w3, PRIVATE_AS u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -64,7 +64,7 @@ DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -128,7 +128,7 @@ DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipa sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; diff --git a/OpenCL/m01750_a3-optimized.cl b/OpenCL/m01750_a3-optimized.cl index 0f6ddf183..92c0b84a7 100644 --- a/OpenCL/m01750_a3-optimized.cl +++ b/OpenCL/m01750_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (PRIVATE_AS const u64x *w0, PRIVATE_AS const u64x *w1, PRIVATE_AS const u64x *w2, PRIVATE_AS const u64x *w3, PRIVATE_AS u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -64,7 +64,7 @@ DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -128,7 +128,7 @@ DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipa sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; @@ -192,15 +192,12 @@ DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipa sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, digest); } -DECLSPEC void m01750m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01750m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -302,15 +299,12 @@ DECLSPEC void m01750m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m01750s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01750s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -430,7 +424,9 @@ KERNEL_FQ void m01750_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -468,7 +464,7 @@ KERNEL_FQ void m01750_m04 (KERN_ATTR_BASIC ()) * main */ - m01750m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01750m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01750_m08 (KERN_ATTR_BASIC ()) @@ -477,7 +473,9 @@ KERNEL_FQ void m01750_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -515,7 +513,7 @@ KERNEL_FQ void m01750_m08 (KERN_ATTR_BASIC ()) * main */ - m01750m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01750m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01750_m16 (KERN_ATTR_BASIC ()) @@ -524,7 +522,9 @@ KERNEL_FQ void m01750_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -562,7 +562,7 @@ KERNEL_FQ void m01750_m16 (KERN_ATTR_BASIC ()) * main */ - m01750m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01750m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01750_s04 (KERN_ATTR_BASIC ()) @@ -571,7 +571,9 @@ KERNEL_FQ void m01750_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -609,7 +611,7 @@ KERNEL_FQ void m01750_s04 (KERN_ATTR_BASIC ()) * main */ - m01750s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01750s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01750_s08 (KERN_ATTR_BASIC ()) @@ -618,7 +620,9 @@ KERNEL_FQ void m01750_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -656,7 +660,7 @@ KERNEL_FQ void m01750_s08 (KERN_ATTR_BASIC ()) * main */ - m01750s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01750s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01750_s16 (KERN_ATTR_BASIC ()) @@ -665,7 +669,9 @@ KERNEL_FQ void m01750_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -703,5 +709,5 @@ KERNEL_FQ void m01750_s16 (KERN_ATTR_BASIC ()) * main */ - m01750s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01750s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01760_a0-optimized.cl b/OpenCL/m01760_a0-optimized.cl index 0408f61ca..b5d7f99af 100644 --- a/OpenCL/m01760_a0-optimized.cl +++ b/OpenCL/m01760_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (PRIVATE_AS const u64x *w0, PRIVATE_AS const u64x *w1, PRIVATE_AS const u64x *w2, PRIVATE_AS const u64x *w3, PRIVATE_AS u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -66,7 +66,7 @@ DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -130,7 +130,7 @@ DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipa sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; diff --git a/OpenCL/m01760_a1-optimized.cl b/OpenCL/m01760_a1-optimized.cl index 8d7f69441..f69c33cee 100644 --- a/OpenCL/m01760_a1-optimized.cl +++ b/OpenCL/m01760_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (PRIVATE_AS const u64x *w0, PRIVATE_AS const u64x *w1, PRIVATE_AS const u64x *w2, PRIVATE_AS const u64x *w3, PRIVATE_AS u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -64,7 +64,7 @@ DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -128,7 +128,7 @@ DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipa sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; diff --git a/OpenCL/m01760_a3-optimized.cl b/OpenCL/m01760_a3-optimized.cl index f8520b3da..59496a39a 100644 --- a/OpenCL/m01760_a3-optimized.cl +++ b/OpenCL/m01760_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (PRIVATE_AS const u64x *w0, PRIVATE_AS const u64x *w1, PRIVATE_AS const u64x *w2, PRIVATE_AS const u64x *w3, PRIVATE_AS u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -64,7 +64,7 @@ DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -128,7 +128,7 @@ DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipa sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; @@ -192,15 +192,12 @@ DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipa sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, digest); } -DECLSPEC void m01760m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01760m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -300,15 +297,12 @@ DECLSPEC void m01760m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m01760s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01760s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -426,7 +420,9 @@ KERNEL_FQ void m01760_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -464,7 +460,7 @@ KERNEL_FQ void m01760_m04 (KERN_ATTR_BASIC ()) * main */ - m01760m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01760m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01760_m08 (KERN_ATTR_BASIC ()) @@ -473,7 +469,9 @@ KERNEL_FQ void m01760_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -511,7 +509,7 @@ KERNEL_FQ void m01760_m08 (KERN_ATTR_BASIC ()) * main */ - m01760m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01760m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01760_m16 (KERN_ATTR_BASIC ()) @@ -520,7 +518,9 @@ KERNEL_FQ void m01760_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -558,7 +558,7 @@ KERNEL_FQ void m01760_m16 (KERN_ATTR_BASIC ()) * main */ - m01760m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01760m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01760_s04 (KERN_ATTR_BASIC ()) @@ -567,7 +567,9 @@ KERNEL_FQ void m01760_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -605,7 +607,7 @@ KERNEL_FQ void m01760_s04 (KERN_ATTR_BASIC ()) * main */ - m01760s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01760s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01760_s08 (KERN_ATTR_BASIC ()) @@ -614,7 +616,9 @@ KERNEL_FQ void m01760_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -652,7 +656,7 @@ KERNEL_FQ void m01760_s08 (KERN_ATTR_BASIC ()) * main */ - m01760s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01760s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01760_s16 (KERN_ATTR_BASIC ()) @@ -661,7 +665,9 @@ KERNEL_FQ void m01760_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -699,5 +705,5 @@ KERNEL_FQ void m01760_s16 (KERN_ATTR_BASIC ()) * main */ - m01760s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01760s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01770_a0-optimized.cl b/OpenCL/m01770_a0-optimized.cl index 57de4b3db..d2e30a2aa 100644 --- a/OpenCL/m01770_a0-optimized.cl +++ b/OpenCL/m01770_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01770_a1-optimized.cl b/OpenCL/m01770_a1-optimized.cl index 5cde40cad..189161687 100644 --- a/OpenCL/m01770_a1-optimized.cl +++ b/OpenCL/m01770_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01770_a3-optimized.cl b/OpenCL/m01770_a3-optimized.cl index b125c4150..a6adaccf5 100644 --- a/OpenCL/m01770_a3-optimized.cl +++ b/OpenCL/m01770_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = h; } -DECLSPEC void m01770m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01770m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - w[15] = pw_len * 8; /** @@ -190,15 +187,12 @@ DECLSPEC void m01770m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m01770s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01770s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -273,7 +267,9 @@ KERNEL_FQ void m01770_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -302,7 +298,7 @@ KERNEL_FQ void m01770_m04 (KERN_ATTR_VECTOR ()) * main */ - m01770m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01770m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01770_m08 (KERN_ATTR_VECTOR ()) @@ -311,7 +307,9 @@ KERNEL_FQ void m01770_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -340,7 +338,7 @@ KERNEL_FQ void m01770_m08 (KERN_ATTR_VECTOR ()) * main */ - m01770m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01770m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01770_m16 (KERN_ATTR_VECTOR ()) @@ -349,7 +347,9 @@ KERNEL_FQ void m01770_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -378,7 +378,7 @@ KERNEL_FQ void m01770_m16 (KERN_ATTR_VECTOR ()) * main */ - m01770m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01770m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01770_s04 (KERN_ATTR_VECTOR ()) @@ -387,7 +387,9 @@ KERNEL_FQ void m01770_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -416,7 +418,7 @@ KERNEL_FQ void m01770_s04 (KERN_ATTR_VECTOR ()) * main */ - m01770s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01770s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01770_s08 (KERN_ATTR_VECTOR ()) @@ -425,7 +427,9 @@ KERNEL_FQ void m01770_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -454,7 +458,7 @@ KERNEL_FQ void m01770_s08 (KERN_ATTR_VECTOR ()) * main */ - m01770s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01770s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m01770_s16 (KERN_ATTR_VECTOR ()) @@ -463,7 +467,9 @@ KERNEL_FQ void m01770_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -492,5 +498,5 @@ KERNEL_FQ void m01770_s16 (KERN_ATTR_VECTOR ()) * main */ - m01770s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m01770s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m01800-optimized.cl b/OpenCL/m01800-optimized.cl index b6cdb4ac5..bf763e81c 100644 --- a/OpenCL/m01800-optimized.cl +++ b/OpenCL/m01800-optimized.cl @@ -17,8 +17,8 @@ #define COMPARE_S STR(INCLUDE_PATH/inc_comp_single.cl) #define COMPARE_M STR(INCLUDE_PATH/inc_comp_multi.cl) -#define PUTCHAR64_BE(a,p,c) ((u8 *)(a))[(p) ^ 7] = (u8) (c) -#define GETCHAR64_BE(a,p) ((u8 *)(a))[(p) ^ 7] +#define PUTCHAR64_BE(a,p,c) ((PRIVATE_AS u8 *)(a))[(p) ^ 7] = (u8) (c) +#define GETCHAR64_BE(a,p) ((PRIVATE_AS u8 *)(a))[(p) ^ 7] typedef struct sha512crypt_tmp { @@ -42,7 +42,7 @@ typedef struct } orig_sha512_ctx_t; -DECLSPEC void sha512_transform_transport (const u64 *w, u64 *digest) +DECLSPEC void sha512_transform_transport (PRIVATE_AS const u64 *w, PRIVATE_AS u64 *digest) { u32 t0[4]; u32 t1[4]; @@ -89,7 +89,7 @@ DECLSPEC void sha512_transform_transport (const u64 *w, u64 *digest) sha512_transform (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC void orig_sha512_init (orig_sha512_ctx_t *sha512_ctx) +DECLSPEC void orig_sha512_init (PRIVATE_AS orig_sha512_ctx_t *sha512_ctx) { sha512_ctx->state[0] = SHA512M_A; sha512_ctx->state[1] = SHA512M_B; @@ -103,7 +103,7 @@ DECLSPEC void orig_sha512_init (orig_sha512_ctx_t *sha512_ctx) sha512_ctx->len = 0; } -DECLSPEC void orig_sha512_update (orig_sha512_ctx_t *sha512_ctx, const u64 *buf, int len) +DECLSPEC void orig_sha512_update (PRIVATE_AS orig_sha512_ctx_t *sha512_ctx, PRIVATE_AS const u64 *buf, int len) { int pos = sha512_ctx->len & 0x7f; @@ -136,7 +136,7 @@ DECLSPEC void orig_sha512_update (orig_sha512_ctx_t *sha512_ctx, const u64 *buf, } } -DECLSPEC void orig_sha512_final (orig_sha512_ctx_t *sha512_ctx) +DECLSPEC void orig_sha512_final (PRIVATE_AS orig_sha512_ctx_t *sha512_ctx) { int pos = sha512_ctx->len & 0x7f; diff --git a/OpenCL/m02100-pure.cl b/OpenCL/m02100-pure.cl index 57262abff..dfe1f9869 100644 --- a/OpenCL/m02100-pure.cl +++ b/OpenCL/m02100-pure.cl @@ -31,7 +31,7 @@ typedef struct dcc2_tmp } dcc2_tmp_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -43,6 +43,7 @@ DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa w0[0] = digest[0]; w0[1] = digest[1]; + w0[2] = digest[2]; w0[3] = digest[3]; w1[0] = digest[4]; diff --git a/OpenCL/m02400_a3-optimized.cl b/OpenCL/m02400_a3-optimized.cl index 87b7f792c..1fe7466f1 100644 --- a/OpenCL/m02400_a3-optimized.cl +++ b/OpenCL/m02400_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void m02400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m02400m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * algorithm specific */ @@ -232,15 +229,12 @@ DECLSPEC void m02400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m02400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m02400s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * algorithm specific */ @@ -468,7 +462,9 @@ KERNEL_FQ void m02400_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -497,7 +493,7 @@ KERNEL_FQ void m02400_m04 (KERN_ATTR_VECTOR ()) * main */ - m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m02400_m08 (KERN_ATTR_VECTOR ()) @@ -506,7 +502,9 @@ KERNEL_FQ void m02400_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -535,7 +533,7 @@ KERNEL_FQ void m02400_m08 (KERN_ATTR_VECTOR ()) * main */ - m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m02400_m16 (KERN_ATTR_VECTOR ()) @@ -544,7 +542,9 @@ KERNEL_FQ void m02400_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -573,7 +573,7 @@ KERNEL_FQ void m02400_m16 (KERN_ATTR_VECTOR ()) * main */ - m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m02400_s04 (KERN_ATTR_VECTOR ()) @@ -582,7 +582,9 @@ KERNEL_FQ void m02400_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -611,7 +613,7 @@ KERNEL_FQ void m02400_s04 (KERN_ATTR_VECTOR ()) * main */ - m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m02400_s08 (KERN_ATTR_VECTOR ()) @@ -620,7 +622,9 @@ KERNEL_FQ void m02400_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -649,7 +653,7 @@ KERNEL_FQ void m02400_s08 (KERN_ATTR_VECTOR ()) * main */ - m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m02400_s16 (KERN_ATTR_VECTOR ()) @@ -658,7 +662,9 @@ KERNEL_FQ void m02400_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -687,5 +693,5 @@ KERNEL_FQ void m02400_s16 (KERN_ATTR_VECTOR ()) * main */ - m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m02410_a3-optimized.cl b/OpenCL/m02410_a3-optimized.cl index 10c359744..313631b12 100644 --- a/OpenCL/m02410_a3-optimized.cl +++ b/OpenCL/m02410_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void m02410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m02410m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -281,15 +278,12 @@ DECLSPEC void m02410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m02410s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m02410s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -566,7 +560,9 @@ KERNEL_FQ void m02410_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -595,7 +591,7 @@ KERNEL_FQ void m02410_m04 (KERN_ATTR_VECTOR ()) * main */ - m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m02410_m08 (KERN_ATTR_VECTOR ()) @@ -604,7 +600,9 @@ KERNEL_FQ void m02410_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -633,7 +631,7 @@ KERNEL_FQ void m02410_m08 (KERN_ATTR_VECTOR ()) * main */ - m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m02410_m16 (KERN_ATTR_VECTOR ()) @@ -642,7 +640,9 @@ KERNEL_FQ void m02410_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -671,7 +671,7 @@ KERNEL_FQ void m02410_m16 (KERN_ATTR_VECTOR ()) * main */ - m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02410m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m02410_s04 (KERN_ATTR_VECTOR ()) @@ -680,7 +680,9 @@ KERNEL_FQ void m02410_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -709,7 +711,7 @@ KERNEL_FQ void m02410_s04 (KERN_ATTR_VECTOR ()) * main */ - m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m02410_s08 (KERN_ATTR_VECTOR ()) @@ -718,7 +720,9 @@ KERNEL_FQ void m02410_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -747,7 +751,7 @@ KERNEL_FQ void m02410_s08 (KERN_ATTR_VECTOR ()) * main */ - m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m02410_s16 (KERN_ATTR_VECTOR ()) @@ -756,7 +760,9 @@ KERNEL_FQ void m02410_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -785,5 +791,5 @@ KERNEL_FQ void m02410_s16 (KERN_ATTR_VECTOR ()) * main */ - m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m02410s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m02500-pure.cl b/OpenCL/m02500-pure.cl index b497f0b14..178a798da 100644 --- a/OpenCL/m02500-pure.cl +++ b/OpenCL/m02500-pure.cl @@ -65,7 +65,7 @@ typedef struct wpa_pbkdf2_tmp } wpa_pbkdf2_tmp_t; -DECLSPEC void make_kn (u32 *k) +DECLSPEC void make_kn (PRIVATE_AS u32 *k) { u32 kl[4]; u32 kr[4]; @@ -95,7 +95,7 @@ DECLSPEC void make_kn (u32 *k) k[3] ^= c * 0x87000000; } -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m02610_a3-optimized.cl b/OpenCL/m02610_a3-optimized.cl index 5f5959829..3123a35f5 100644 --- a/OpenCL/m02610_a3-optimized.cl +++ b/OpenCL/m02610_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m02610m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02610m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -287,15 +284,12 @@ DECLSPEC void m02610m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m02610s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02610s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -567,8 +561,8 @@ KERNEL_FQ void m02610_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -628,7 +622,7 @@ KERNEL_FQ void m02610_m04 (KERN_ATTR_BASIC ()) * main */ - m02610m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02610m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02610_m08 (KERN_ATTR_BASIC ()) @@ -637,8 +631,8 @@ KERNEL_FQ void m02610_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -698,7 +692,7 @@ KERNEL_FQ void m02610_m08 (KERN_ATTR_BASIC ()) * main */ - m02610m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02610m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02610_m16 (KERN_ATTR_BASIC ()) @@ -707,8 +701,8 @@ KERNEL_FQ void m02610_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -768,7 +762,7 @@ KERNEL_FQ void m02610_m16 (KERN_ATTR_BASIC ()) * main */ - m02610m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02610m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02610_s04 (KERN_ATTR_BASIC ()) @@ -777,8 +771,8 @@ KERNEL_FQ void m02610_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -838,7 +832,7 @@ KERNEL_FQ void m02610_s04 (KERN_ATTR_BASIC ()) * main */ - m02610s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02610s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02610_s08 (KERN_ATTR_BASIC ()) @@ -847,8 +841,8 @@ KERNEL_FQ void m02610_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -908,7 +902,7 @@ KERNEL_FQ void m02610_s08 (KERN_ATTR_BASIC ()) * main */ - m02610s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02610s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02610_s16 (KERN_ATTR_BASIC ()) @@ -917,8 +911,8 @@ KERNEL_FQ void m02610_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -978,5 +972,5 @@ KERNEL_FQ void m02610_s16 (KERN_ATTR_BASIC ()) * main */ - m02610s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02610s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m02710_a3-optimized.cl b/OpenCL/m02710_a3-optimized.cl index b1d125b32..0a391b1a6 100644 --- a/OpenCL/m02710_a3-optimized.cl +++ b/OpenCL/m02710_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m02710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02710m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -372,15 +369,12 @@ DECLSPEC void m02710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m02710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02710s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -736,8 +730,8 @@ KERNEL_FQ void m02710_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -797,7 +791,7 @@ KERNEL_FQ void m02710_m04 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02710_m08 (KERN_ATTR_BASIC ()) @@ -806,8 +800,8 @@ KERNEL_FQ void m02710_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -867,7 +861,7 @@ KERNEL_FQ void m02710_m08 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02710_m16 (KERN_ATTR_BASIC ()) @@ -876,8 +870,8 @@ KERNEL_FQ void m02710_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -937,7 +931,7 @@ KERNEL_FQ void m02710_m16 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02710_s04 (KERN_ATTR_BASIC ()) @@ -946,8 +940,8 @@ KERNEL_FQ void m02710_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1007,7 +1001,7 @@ KERNEL_FQ void m02710_s04 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02710_s08 (KERN_ATTR_BASIC ()) @@ -1016,8 +1010,8 @@ KERNEL_FQ void m02710_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1077,7 +1071,7 @@ KERNEL_FQ void m02710_s08 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02710_s16 (KERN_ATTR_BASIC ()) @@ -1086,8 +1080,8 @@ KERNEL_FQ void m02710_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1147,5 +1141,5 @@ KERNEL_FQ void m02710_s16 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m02810_a3-optimized.cl b/OpenCL/m02810_a3-optimized.cl index 8abe2c48a..31e4e3165 100644 --- a/OpenCL/m02810_a3-optimized.cl +++ b/OpenCL/m02810_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m02810m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02810m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -371,15 +368,12 @@ DECLSPEC void m02810m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m02810s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02810s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -734,8 +728,8 @@ KERNEL_FQ void m02810_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -795,7 +789,7 @@ KERNEL_FQ void m02810_m04 (KERN_ATTR_BASIC ()) * main */ - m02810m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02810m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02810_m08 (KERN_ATTR_BASIC ()) @@ -804,8 +798,8 @@ KERNEL_FQ void m02810_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -865,7 +859,7 @@ KERNEL_FQ void m02810_m08 (KERN_ATTR_BASIC ()) * main */ - m02810m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02810m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02810_m16 (KERN_ATTR_BASIC ()) @@ -874,8 +868,8 @@ KERNEL_FQ void m02810_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -935,7 +929,7 @@ KERNEL_FQ void m02810_m16 (KERN_ATTR_BASIC ()) * main */ - m02810m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02810m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02810_s04 (KERN_ATTR_BASIC ()) @@ -944,8 +938,8 @@ KERNEL_FQ void m02810_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1005,7 +999,7 @@ KERNEL_FQ void m02810_s04 (KERN_ATTR_BASIC ()) * main */ - m02810s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02810s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02810_s08 (KERN_ATTR_BASIC ()) @@ -1014,8 +1008,8 @@ KERNEL_FQ void m02810_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1075,7 +1069,7 @@ KERNEL_FQ void m02810_s08 (KERN_ATTR_BASIC ()) * main */ - m02810s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02810s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m02810_s16 (KERN_ATTR_BASIC ()) @@ -1084,8 +1078,8 @@ KERNEL_FQ void m02810_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1145,5 +1139,5 @@ KERNEL_FQ void m02810_s16 (KERN_ATTR_BASIC ()) * main */ - m02810s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m02810s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m03000_a0-pure.cl b/OpenCL/m03000_a0-pure.cl index 86e69a44d..55ec178da 100644 --- a/OpenCL/m03000_a0-pure.cl +++ b/OpenCL/m03000_a0-pure.cl @@ -349,7 +349,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32x *data, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -391,7 +391,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL iv[1] = hc_rotl32 (r, 29); } -DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -460,7 +460,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u } } -DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32x w1, PRIVATE_AS u32x *out) { u32 t[8]; diff --git a/OpenCL/m03000_a1-pure.cl b/OpenCL/m03000_a1-pure.cl index f8952b2b3..8e3b17597 100644 --- a/OpenCL/m03000_a1-pure.cl +++ b/OpenCL/m03000_a1-pure.cl @@ -347,7 +347,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32x *data, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -389,7 +389,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL iv[1] = hc_rotl32 (r, 29); } -DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -458,7 +458,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u } } -DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32x w1, PRIVATE_AS u32x *out) { u32 t[8]; diff --git a/OpenCL/m03000_a3-pure.cl b/OpenCL/m03000_a3-pure.cl index 3b89020be..f2417729f 100644 --- a/OpenCL/m03000_a3-pure.cl +++ b/OpenCL/m03000_a3-pure.cl @@ -58,7 +58,7 @@ #define LUT(a,b,c,d,e) u32 a; asm ("lop3.b32 %0, %1, %2, %3, "#e";" : "=r"(a): "r"(b), "r"(c), "r"(d)); -DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(xAA55AA5500550055, a1, a4, a6, 0xC1) LUT(xA55AA55AF0F5F0F5, a3, a6, xAA55AA5500550055, 0x9E) @@ -92,7 +92,7 @@ DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(xEEEEEEEE99999999, a1, a2, a6, 0x97) LUT(xFFFFEEEE66666666, a5, a6, xEEEEEEEE99999999, 0x67) @@ -125,7 +125,7 @@ DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(xA50FA50FA50FA50F, a1, a3, a4, 0xC9) LUT(xF0F00F0FF0F0F0F0, a3, a5, a6, 0x4B) @@ -159,7 +159,7 @@ DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(x55F055F055F055F0, a1, a3, a4, 0x72) LUT(xA500F5F0A500F5F0, a3, a5, x55F055F055F055F0, 0xAD) @@ -186,7 +186,7 @@ DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(xA0A0A0A0FFFFFFFF, a1, a3, a6, 0xAB) LUT(xFFFF00005555FFFF, a1, a5, a6, 0xB9) @@ -220,7 +220,7 @@ DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(x5050F5F55050F5F5, a1, a3, a5, 0xB2) LUT(x6363C6C66363C6C6, a1, a2, x5050F5F55050F5F5, 0x66) @@ -253,7 +253,7 @@ DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(x88AA88AA88AA88AA, a1, a2, a4, 0x0B) LUT(xAAAAFF00AAAAFF00, a1, a4, a5, 0x27) @@ -286,7 +286,7 @@ DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(xEEEE3333EEEE3333, a1, a2, a5, 0x9D) LUT(xBBBBBBBBBBBBBBBB, a1, a1, a2, 0x83) @@ -344,7 +344,7 @@ DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -419,7 +419,7 @@ DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -490,7 +490,7 @@ DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -561,7 +561,7 @@ DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out3 ^= x21; } -DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -615,7 +615,7 @@ DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -688,7 +688,7 @@ DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -761,7 +761,7 @@ DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out1 ^= x01; } -DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -832,7 +832,7 @@ DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -925,7 +925,7 @@ DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -1000,7 +1000,7 @@ DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -1071,7 +1071,7 @@ DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -1142,7 +1142,7 @@ DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out3 ^= x21; } -DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -1196,7 +1196,7 @@ DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -1269,7 +1269,7 @@ DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -1342,7 +1342,7 @@ DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out1 ^= x01; } -DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -1413,7 +1413,7 @@ DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -1532,7 +1532,7 @@ DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const #define KEYSET07 { k00 = K31; k01 = K35; k02 = K52; k03 = K43; k04 = K08; k05 = K37; k06 = K51; k07 = K15; k08 = K49; k09 = K30; k10 = K07; k11 = K02; k12 = K50; k13 = K21; k14 = K45; k15 = K44; k16 = K29; k17 = K16; k18 = K42; k19 = K23; k20 = K22; k21 = K14; k22 = K38; k23 = K01; k24 = K10; k25 = K47; k26 = K53; k27 = K11; k28 = K27; k29 = K26; k30 = K05; k31 = K17; k32 = K54; k33 = K41; k34 = K39; k35 = K20; k36 = K48; k37 = K13; k38 = K24; k39 = K19; k40 = K32; k41 = K40; k42 = K34; k43 = K03; k44 = K06; k45 = K18; k46 = K12; k47 = K46; } #define KEYSET17 { k00 = K15; k01 = K51; k02 = K36; k03 = K02; k04 = K49; k05 = K21; k06 = K35; k07 = K31; k08 = K08; k09 = K14; k10 = K23; k11 = K43; k12 = K09; k13 = K37; k14 = K29; k15 = K28; k16 = K45; k17 = K00; k18 = K01; k19 = K07; k20 = K38; k21 = K30; k22 = K22; k23 = K42; k24 = K26; k25 = K04; k26 = K41; k27 = K54; k28 = K39; k29 = K10; k30 = K48; k31 = K33; k32 = K11; k33 = K53; k34 = K27; k35 = K32; k36 = K05; k37 = K25; k38 = K40; k39 = K03; k40 = K20; k41 = K24; k42 = K46; k43 = K19; k44 = K18; k45 = K06; k46 = K55; k47 = K34; } -DECLSPEC void DES (const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) +DECLSPEC void DES (const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, PRIVATE_AS u32 *D00, PRIVATE_AS u32 *D01, PRIVATE_AS u32 *D02, PRIVATE_AS u32 *D03, PRIVATE_AS u32 *D04, PRIVATE_AS u32 *D05, PRIVATE_AS u32 *D06, PRIVATE_AS u32 *D07, PRIVATE_AS u32 *D08, PRIVATE_AS u32 *D09, PRIVATE_AS u32 *D10, PRIVATE_AS u32 *D11, PRIVATE_AS u32 *D12, PRIVATE_AS u32 *D13, PRIVATE_AS u32 *D14, PRIVATE_AS u32 *D15, PRIVATE_AS u32 *D16, PRIVATE_AS u32 *D17, PRIVATE_AS u32 *D18, PRIVATE_AS u32 *D19, PRIVATE_AS u32 *D20, PRIVATE_AS u32 *D21, PRIVATE_AS u32 *D22, PRIVATE_AS u32 *D23, PRIVATE_AS u32 *D24, PRIVATE_AS u32 *D25, PRIVATE_AS u32 *D26, PRIVATE_AS u32 *D27, PRIVATE_AS u32 *D28, PRIVATE_AS u32 *D29, PRIVATE_AS u32 *D30, PRIVATE_AS u32 *D31, PRIVATE_AS u32 *D32, PRIVATE_AS u32 *D33, PRIVATE_AS u32 *D34, PRIVATE_AS u32 *D35, PRIVATE_AS u32 *D36, PRIVATE_AS u32 *D37, PRIVATE_AS u32 *D38, PRIVATE_AS u32 *D39, PRIVATE_AS u32 *D40, PRIVATE_AS u32 *D41, PRIVATE_AS u32 *D42, PRIVATE_AS u32 *D43, PRIVATE_AS u32 *D44, PRIVATE_AS u32 *D45, PRIVATE_AS u32 *D46, PRIVATE_AS u32 *D47, PRIVATE_AS u32 *D48, PRIVATE_AS u32 *D49, PRIVATE_AS u32 *D50, PRIVATE_AS u32 *D51, PRIVATE_AS u32 *D52, PRIVATE_AS u32 *D53, PRIVATE_AS u32 *D54, PRIVATE_AS u32 *D55, PRIVATE_AS u32 *D56, PRIVATE_AS u32 *D57, PRIVATE_AS u32 *D58, PRIVATE_AS u32 *D59, PRIVATE_AS u32 *D60, PRIVATE_AS u32 *D61, PRIVATE_AS u32 *D62, PRIVATE_AS u32 *D63) { KXX_DECL u32 k00, k01, k02, k03, k04, k05; KXX_DECL u32 k06, k07, k08, k09, k10, k11; @@ -1638,7 +1638,7 @@ DECLSPEC void DES (const u32 K00, const u32 K01, const u32 K02, const u32 K03, c } } -DECLSPEC void transpose32c (u32 *data) +DECLSPEC void transpose32c (PRIVATE_AS u32 *data) { #define swap(x,y,j,m) \ t = ((x) ^ ((y) >> (j))) & (m); \ @@ -1733,7 +1733,7 @@ DECLSPEC void transpose32c (u32 *data) // transpose bitslice mod : attention race conditions, need different buffers for *in and *out // -KERNEL_FQ void m03000_tm (GLOBAL_AS u32 *mod, GLOBAL_AS bs_word_t *words_buf_b) +KERNEL_FQ void m03000_tm (KERN_ATTR_TM) { const u64 gid = get_global_id (0); diff --git a/OpenCL/m03100_a3-optimized.cl b/OpenCL/m03100_a3-optimized.cl index 5c16b4240..16910174e 100644 --- a/OpenCL/m03100_a3-optimized.cl +++ b/OpenCL/m03100_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_cipher_des.cl) #endif -DECLSPEC void m03100m (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m03100m (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -198,15 +195,12 @@ DECLSPEC void m03100m (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], } } -DECLSPEC void m03100s (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m03100s (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -397,8 +391,8 @@ KERNEL_FQ void m03100_m04 (KERN_ATTR_VECTOR ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -471,7 +465,7 @@ KERNEL_FQ void m03100_m04 (KERN_ATTR_VECTOR ()) * main */ - m03100m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m03100m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m03100_m08 (KERN_ATTR_VECTOR ()) @@ -480,8 +474,8 @@ KERNEL_FQ void m03100_m08 (KERN_ATTR_VECTOR ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -554,7 +548,7 @@ KERNEL_FQ void m03100_m08 (KERN_ATTR_VECTOR ()) * main */ - m03100m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m03100m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m03100_m16 (KERN_ATTR_VECTOR ()) @@ -567,8 +561,8 @@ KERNEL_FQ void m03100_s04 (KERN_ATTR_VECTOR ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -641,7 +635,7 @@ KERNEL_FQ void m03100_s04 (KERN_ATTR_VECTOR ()) * main */ - m03100s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m03100s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m03100_s08 (KERN_ATTR_VECTOR ()) @@ -650,8 +644,8 @@ KERNEL_FQ void m03100_s08 (KERN_ATTR_VECTOR ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -724,7 +718,7 @@ KERNEL_FQ void m03100_s08 (KERN_ATTR_VECTOR ()) * main */ - m03100s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m03100s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m03100_s16 (KERN_ATTR_VECTOR ()) diff --git a/OpenCL/m03200-pure.cl b/OpenCL/m03200-pure.cl index 26c296bb9..2891b341b 100644 --- a/OpenCL/m03200-pure.cl +++ b/OpenCL/m03200-pure.cl @@ -408,10 +408,10 @@ DECLSPEC inline void SET_KEY32 (LOCAL_AS u32 *S, const u64 key, const u32 val) extern __shared__ u32 S[]; #endif -DECLSPEC void expand_key (u32 *E, u32 *W, const int len) +DECLSPEC void expand_key (PRIVATE_AS u32 *E, PRIVATE_AS u32 *W, const int len) { - u8 *E_ptr = (u8 *) E; - u8 *W_ptr = (u8 *) W; + PRIVATE_AS u8 *E_ptr = (PRIVATE_AS u8 *) E; + PRIVATE_AS u8 *W_ptr = (PRIVATE_AS u8 *) W; for (int pos = 0; pos < 72; pos++) // pos++ is not a bug, we actually want that zero byte here { diff --git a/OpenCL/m03500_a3-optimized.cl b/OpenCL/m03500_a3-optimized.cl index 4921e2438..71993efd9 100644 --- a/OpenCL/m03500_a3-optimized.cl +++ b/OpenCL/m03500_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m03500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m03500m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -393,15 +390,12 @@ DECLSPEC void m03500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m03500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m03500s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -779,8 +773,8 @@ KERNEL_FQ void m03500_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -840,7 +834,7 @@ KERNEL_FQ void m03500_m04 (KERN_ATTR_BASIC ()) * main */ - m03500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03500_m08 (KERN_ATTR_BASIC ()) @@ -849,8 +843,8 @@ KERNEL_FQ void m03500_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -910,7 +904,7 @@ KERNEL_FQ void m03500_m08 (KERN_ATTR_BASIC ()) * main */ - m03500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03500_m16 (KERN_ATTR_BASIC ()) @@ -919,8 +913,8 @@ KERNEL_FQ void m03500_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -980,7 +974,7 @@ KERNEL_FQ void m03500_m16 (KERN_ATTR_BASIC ()) * main */ - m03500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03500_s04 (KERN_ATTR_BASIC ()) @@ -989,8 +983,8 @@ KERNEL_FQ void m03500_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1050,7 +1044,7 @@ KERNEL_FQ void m03500_s04 (KERN_ATTR_BASIC ()) * main */ - m03500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03500_s08 (KERN_ATTR_BASIC ()) @@ -1059,8 +1053,8 @@ KERNEL_FQ void m03500_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1120,7 +1114,7 @@ KERNEL_FQ void m03500_s08 (KERN_ATTR_BASIC ()) * main */ - m03500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03500_s16 (KERN_ATTR_BASIC ()) @@ -1129,8 +1123,8 @@ KERNEL_FQ void m03500_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1190,5 +1184,5 @@ KERNEL_FQ void m03500_s16 (KERN_ATTR_BASIC ()) * main */ - m03500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m03710_a3-optimized.cl b/OpenCL/m03710_a3-optimized.cl index 129fa028f..53425cf4a 100644 --- a/OpenCL/m03710_a3-optimized.cl +++ b/OpenCL/m03710_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m03710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m03710m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -318,15 +315,12 @@ DECLSPEC void m03710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m03710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m03710s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -628,8 +622,8 @@ KERNEL_FQ void m03710_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -689,7 +683,7 @@ KERNEL_FQ void m03710_m04 (KERN_ATTR_BASIC ()) * main */ - m03710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03710_m08 (KERN_ATTR_BASIC ()) @@ -698,8 +692,8 @@ KERNEL_FQ void m03710_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -759,7 +753,7 @@ KERNEL_FQ void m03710_m08 (KERN_ATTR_BASIC ()) * main */ - m03710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03710_m16 (KERN_ATTR_BASIC ()) @@ -768,8 +762,8 @@ KERNEL_FQ void m03710_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -829,7 +823,7 @@ KERNEL_FQ void m03710_m16 (KERN_ATTR_BASIC ()) * main */ - m03710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03710_s04 (KERN_ATTR_BASIC ()) @@ -838,8 +832,8 @@ KERNEL_FQ void m03710_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -899,7 +893,7 @@ KERNEL_FQ void m03710_s04 (KERN_ATTR_BASIC ()) * main */ - m03710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03710_s08 (KERN_ATTR_BASIC ()) @@ -908,8 +902,8 @@ KERNEL_FQ void m03710_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -969,7 +963,7 @@ KERNEL_FQ void m03710_s08 (KERN_ATTR_BASIC ()) * main */ - m03710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03710_s16 (KERN_ATTR_BASIC ()) @@ -978,8 +972,8 @@ KERNEL_FQ void m03710_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1039,5 +1033,5 @@ KERNEL_FQ void m03710_s16 (KERN_ATTR_BASIC ()) * main */ - m03710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m03800_a3-optimized.cl b/OpenCL/m03800_a3-optimized.cl index b4b2601e1..d97000998 100644 --- a/OpenCL/m03800_a3-optimized.cl +++ b/OpenCL/m03800_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void m03800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m03800m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -241,15 +238,12 @@ DECLSPEC void m03800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m03800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m03800s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -486,7 +480,9 @@ KERNEL_FQ void m03800_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -494,8 +490,6 @@ KERNEL_FQ void m03800_m04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -530,7 +524,7 @@ KERNEL_FQ void m03800_m04 (KERN_ATTR_BASIC ()) * main */ - m03800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m03800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m03800_m08 (KERN_ATTR_BASIC ()) @@ -539,7 +533,9 @@ KERNEL_FQ void m03800_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -547,8 +543,6 @@ KERNEL_FQ void m03800_m08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -583,7 +577,7 @@ KERNEL_FQ void m03800_m08 (KERN_ATTR_BASIC ()) * main */ - m03800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m03800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m03800_m16 (KERN_ATTR_BASIC ()) @@ -592,7 +586,9 @@ KERNEL_FQ void m03800_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -600,8 +596,6 @@ KERNEL_FQ void m03800_m16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -636,7 +630,7 @@ KERNEL_FQ void m03800_m16 (KERN_ATTR_BASIC ()) * main */ - m03800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m03800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m03800_s04 (KERN_ATTR_BASIC ()) @@ -645,7 +639,9 @@ KERNEL_FQ void m03800_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -653,8 +649,6 @@ KERNEL_FQ void m03800_s04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -689,7 +683,7 @@ KERNEL_FQ void m03800_s04 (KERN_ATTR_BASIC ()) * main */ - m03800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m03800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m03800_s08 (KERN_ATTR_BASIC ()) @@ -698,7 +692,9 @@ KERNEL_FQ void m03800_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -706,8 +702,6 @@ KERNEL_FQ void m03800_s08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -742,7 +736,7 @@ KERNEL_FQ void m03800_s08 (KERN_ATTR_BASIC ()) * main */ - m03800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m03800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m03800_s16 (KERN_ATTR_BASIC ()) @@ -751,7 +745,9 @@ KERNEL_FQ void m03800_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -759,8 +755,6 @@ KERNEL_FQ void m03800_s16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -795,5 +789,5 @@ KERNEL_FQ void m03800_s16 (KERN_ATTR_BASIC ()) * main */ - m03800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m03800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m03910_a3-optimized.cl b/OpenCL/m03910_a3-optimized.cl index 9924b1ec2..a0072b433 100644 --- a/OpenCL/m03910_a3-optimized.cl +++ b/OpenCL/m03910_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m03910m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m03910m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -371,15 +368,12 @@ DECLSPEC void m03910m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m03910s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m03910s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -734,8 +728,8 @@ KERNEL_FQ void m03910_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -795,7 +789,7 @@ KERNEL_FQ void m03910_m04 (KERN_ATTR_BASIC ()) * main */ - m03910m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03910m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03910_m08 (KERN_ATTR_BASIC ()) @@ -804,8 +798,8 @@ KERNEL_FQ void m03910_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -865,7 +859,7 @@ KERNEL_FQ void m03910_m08 (KERN_ATTR_BASIC ()) * main */ - m03910m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03910m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03910_m16 (KERN_ATTR_BASIC ()) @@ -874,8 +868,8 @@ KERNEL_FQ void m03910_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -935,7 +929,7 @@ KERNEL_FQ void m03910_m16 (KERN_ATTR_BASIC ()) * main */ - m03910m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03910m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03910_s04 (KERN_ATTR_BASIC ()) @@ -944,8 +938,8 @@ KERNEL_FQ void m03910_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1005,7 +999,7 @@ KERNEL_FQ void m03910_s04 (KERN_ATTR_BASIC ()) * main */ - m03910s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03910s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03910_s08 (KERN_ATTR_BASIC ()) @@ -1014,8 +1008,8 @@ KERNEL_FQ void m03910_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1075,7 +1069,7 @@ KERNEL_FQ void m03910_s08 (KERN_ATTR_BASIC ()) * main */ - m03910s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03910s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m03910_s16 (KERN_ATTR_BASIC ()) @@ -1084,8 +1078,8 @@ KERNEL_FQ void m03910_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1145,5 +1139,5 @@ KERNEL_FQ void m03910_s16 (KERN_ATTR_BASIC ()) * main */ - m03910s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m03910s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m04010_a3-optimized.cl b/OpenCL/m04010_a3-optimized.cl index f6484d6b1..eb870816b 100644 --- a/OpenCL/m04010_a3-optimized.cl +++ b/OpenCL/m04010_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m04010m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04010m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -338,15 +335,12 @@ DECLSPEC void m04010m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m04010s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04010s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -668,8 +662,8 @@ KERNEL_FQ void m04010_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -729,7 +723,7 @@ KERNEL_FQ void m04010_m04 (KERN_ATTR_BASIC ()) * main */ - m04010m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04010m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04010_m08 (KERN_ATTR_BASIC ()) @@ -738,8 +732,8 @@ KERNEL_FQ void m04010_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -799,7 +793,7 @@ KERNEL_FQ void m04010_m08 (KERN_ATTR_BASIC ()) * main */ - m04010m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04010m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04010_m16 (KERN_ATTR_BASIC ()) @@ -808,8 +802,8 @@ KERNEL_FQ void m04010_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -869,7 +863,7 @@ KERNEL_FQ void m04010_m16 (KERN_ATTR_BASIC ()) * main */ - m04010m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04010m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04010_s04 (KERN_ATTR_BASIC ()) @@ -878,8 +872,8 @@ KERNEL_FQ void m04010_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -939,7 +933,7 @@ KERNEL_FQ void m04010_s04 (KERN_ATTR_BASIC ()) * main */ - m04010s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04010s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04010_s08 (KERN_ATTR_BASIC ()) @@ -948,8 +942,8 @@ KERNEL_FQ void m04010_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1009,7 +1003,7 @@ KERNEL_FQ void m04010_s08 (KERN_ATTR_BASIC ()) * main */ - m04010s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04010s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04010_s16 (KERN_ATTR_BASIC ()) @@ -1018,8 +1012,8 @@ KERNEL_FQ void m04010_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1079,5 +1073,5 @@ KERNEL_FQ void m04010_s16 (KERN_ATTR_BASIC ()) * main */ - m04010s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04010s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m04110_a3-optimized.cl b/OpenCL/m04110_a3-optimized.cl index f81e78ff9..6052a02f7 100644 --- a/OpenCL/m04110_a3-optimized.cl +++ b/OpenCL/m04110_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m04110m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04110m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -366,15 +363,12 @@ DECLSPEC void m04110m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m04110s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04110s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -724,8 +718,8 @@ KERNEL_FQ void m04110_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -785,7 +779,7 @@ KERNEL_FQ void m04110_m04 (KERN_ATTR_BASIC ()) * main */ - m04110m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04110m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04110_m08 (KERN_ATTR_BASIC ()) @@ -794,8 +788,8 @@ KERNEL_FQ void m04110_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -855,7 +849,7 @@ KERNEL_FQ void m04110_m08 (KERN_ATTR_BASIC ()) * main */ - m04110m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04110m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04110_m16 (KERN_ATTR_BASIC ()) @@ -864,8 +858,8 @@ KERNEL_FQ void m04110_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -925,7 +919,7 @@ KERNEL_FQ void m04110_m16 (KERN_ATTR_BASIC ()) * main */ - m04110m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04110m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04110_s04 (KERN_ATTR_BASIC ()) @@ -934,8 +928,8 @@ KERNEL_FQ void m04110_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -995,7 +989,7 @@ KERNEL_FQ void m04110_s04 (KERN_ATTR_BASIC ()) * main */ - m04110s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04110s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04110_s08 (KERN_ATTR_BASIC ()) @@ -1004,8 +998,8 @@ KERNEL_FQ void m04110_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1065,7 +1059,7 @@ KERNEL_FQ void m04110_s08 (KERN_ATTR_BASIC ()) * main */ - m04110s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04110s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04110_s16 (KERN_ATTR_BASIC ()) @@ -1074,8 +1068,8 @@ KERNEL_FQ void m04110_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1135,5 +1129,5 @@ KERNEL_FQ void m04110_s16 (KERN_ATTR_BASIC ()) * main */ - m04110s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04110s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m04310_a3-optimized.cl b/OpenCL/m04310_a3-optimized.cl index e819fcfe5..3df129d15 100644 --- a/OpenCL/m04310_a3-optimized.cl +++ b/OpenCL/m04310_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_upper8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m04310m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04310m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -287,15 +284,12 @@ DECLSPEC void m04310m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m04310s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04310s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -567,8 +561,8 @@ KERNEL_FQ void m04310_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -628,7 +622,7 @@ KERNEL_FQ void m04310_m04 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04310_m08 (KERN_ATTR_BASIC ()) @@ -637,8 +631,8 @@ KERNEL_FQ void m04310_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -698,7 +692,7 @@ KERNEL_FQ void m04310_m08 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04310_m16 (KERN_ATTR_BASIC ()) @@ -707,8 +701,8 @@ KERNEL_FQ void m04310_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -768,7 +762,7 @@ KERNEL_FQ void m04310_m16 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04310_s04 (KERN_ATTR_BASIC ()) @@ -777,8 +771,8 @@ KERNEL_FQ void m04310_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -838,7 +832,7 @@ KERNEL_FQ void m04310_s04 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04310_s08 (KERN_ATTR_BASIC ()) @@ -847,8 +841,8 @@ KERNEL_FQ void m04310_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -908,7 +902,7 @@ KERNEL_FQ void m04310_s08 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04310_s16 (KERN_ATTR_BASIC ()) @@ -917,8 +911,8 @@ KERNEL_FQ void m04310_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -978,5 +972,5 @@ KERNEL_FQ void m04310_s16 (KERN_ATTR_BASIC ()) * main */ - 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m04400_a3-optimized.cl b/OpenCL/m04400_a3-optimized.cl index 12c027419..bef5f06c1 100644 --- a/OpenCL/m04400_a3-optimized.cl +++ b/OpenCL/m04400_a3-optimized.cl @@ -30,15 +30,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m04400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04400m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -291,15 +288,12 @@ DECLSPEC void m04400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m04400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04400s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -573,8 +567,8 @@ KERNEL_FQ void m04400_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -634,7 +628,7 @@ KERNEL_FQ void m04400_m04 (KERN_ATTR_BASIC ()) * main */ - m04400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04400_m08 (KERN_ATTR_BASIC ()) @@ -643,8 +637,8 @@ KERNEL_FQ void m04400_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -704,7 +698,7 @@ KERNEL_FQ void m04400_m08 (KERN_ATTR_BASIC ()) * main */ - m04400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04400_m16 (KERN_ATTR_BASIC ()) @@ -713,8 +707,8 @@ KERNEL_FQ void m04400_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -774,7 +768,7 @@ KERNEL_FQ void m04400_m16 (KERN_ATTR_BASIC ()) * main */ - m04400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04400_s04 (KERN_ATTR_BASIC ()) @@ -783,8 +777,8 @@ KERNEL_FQ void m04400_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -844,7 +838,7 @@ KERNEL_FQ void m04400_s04 (KERN_ATTR_BASIC ()) * main */ - m04400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04400_s08 (KERN_ATTR_BASIC ()) @@ -853,8 +847,8 @@ KERNEL_FQ void m04400_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -914,7 +908,7 @@ KERNEL_FQ void m04400_s08 (KERN_ATTR_BASIC ()) * main */ - m04400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04400_s16 (KERN_ATTR_BASIC ()) @@ -923,8 +917,8 @@ KERNEL_FQ void m04400_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -984,5 +978,5 @@ KERNEL_FQ void m04400_s16 (KERN_ATTR_BASIC ()) * main */ - m04400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m04500_a3-optimized.cl b/OpenCL/m04500_a3-optimized.cl index 0c1036334..9a865a592 100644 --- a/OpenCL/m04500_a3-optimized.cl +++ b/OpenCL/m04500_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8_le(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m04500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04500m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -317,15 +314,12 @@ DECLSPEC void m04500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m04500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04500s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -632,8 +626,8 @@ KERNEL_FQ void m04500_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -693,7 +687,7 @@ KERNEL_FQ void m04500_m04 (KERN_ATTR_BASIC ()) * main */ - m04500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04500_m08 (KERN_ATTR_BASIC ()) @@ -702,8 +696,8 @@ KERNEL_FQ void m04500_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -763,7 +757,7 @@ KERNEL_FQ void m04500_m08 (KERN_ATTR_BASIC ()) * main */ - m04500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04500_m16 (KERN_ATTR_BASIC ()) @@ -772,8 +766,8 @@ KERNEL_FQ void m04500_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -833,7 +827,7 @@ KERNEL_FQ void m04500_m16 (KERN_ATTR_BASIC ()) * main */ - m04500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04500_s04 (KERN_ATTR_BASIC ()) @@ -842,8 +836,8 @@ KERNEL_FQ void m04500_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -903,7 +897,7 @@ KERNEL_FQ void m04500_s04 (KERN_ATTR_BASIC ()) * main */ - m04500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04500_s08 (KERN_ATTR_BASIC ()) @@ -912,8 +906,8 @@ KERNEL_FQ void m04500_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -973,7 +967,7 @@ KERNEL_FQ void m04500_s08 (KERN_ATTR_BASIC ()) * main */ - m04500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04500_s16 (KERN_ATTR_BASIC ()) @@ -982,8 +976,8 @@ KERNEL_FQ void m04500_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1043,5 +1037,5 @@ KERNEL_FQ void m04500_s16 (KERN_ATTR_BASIC ()) * main */ - m04500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m04510_a3-optimized.cl b/OpenCL/m04510_a3-optimized.cl index 0b3b7a9d1..53bb8fd11 100644 --- a/OpenCL/m04510_a3-optimized.cl +++ b/OpenCL/m04510_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8_le(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m04510m (u32 * w0, u32 * w1, u32 * w2, u32 * w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 * l_bin2asc) +DECLSPEC void m04510m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 * l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -979,15 +976,12 @@ DECLSPEC void m04510m (u32 * w0, u32 * w1, u32 * w2, u32 * w3, const u32 pw_len, } } -DECLSPEC void m04510s (u32 * w0, u32 * w1, u32 * w2, u32 * w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 * l_bin2asc) +DECLSPEC void m04510s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 * l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -1958,8 +1952,8 @@ KERNEL_FQ void m04510_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -2019,7 +2013,7 @@ KERNEL_FQ void m04510_m04 (KERN_ATTR_BASIC ()) * main */ - m04510m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04510m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04510_m08 (KERN_ATTR_BASIC ()) @@ -2028,8 +2022,8 @@ KERNEL_FQ void m04510_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -2089,7 +2083,7 @@ KERNEL_FQ void m04510_m08 (KERN_ATTR_BASIC ()) * main */ - m04510m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04510m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04510_m16 (KERN_ATTR_BASIC ()) @@ -2098,8 +2092,8 @@ KERNEL_FQ void m04510_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -2159,7 +2153,7 @@ KERNEL_FQ void m04510_m16 (KERN_ATTR_BASIC ()) * main */ - m04510m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04510m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04510_s04 (KERN_ATTR_BASIC ()) @@ -2168,8 +2162,8 @@ KERNEL_FQ void m04510_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -2229,7 +2223,7 @@ KERNEL_FQ void m04510_s04 (KERN_ATTR_BASIC ()) * main */ - m04510s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04510s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04510_s08 (KERN_ATTR_BASIC ()) @@ -2238,8 +2232,8 @@ KERNEL_FQ void m04510_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -2299,7 +2293,7 @@ KERNEL_FQ void m04510_s08 (KERN_ATTR_BASIC ()) * main */ - m04510s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04510s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04510_s16 (KERN_ATTR_BASIC ()) @@ -2308,8 +2302,8 @@ KERNEL_FQ void m04510_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -2369,5 +2363,5 @@ KERNEL_FQ void m04510_s16 (KERN_ATTR_BASIC ()) * main */ - m04510s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04510s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m04520_a3-optimized.cl b/OpenCL/m04520_a3-optimized.cl index 455afe0cf..260b59482 100644 --- a/OpenCL/m04520_a3-optimized.cl +++ b/OpenCL/m04520_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m04520m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04520m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -548,15 +545,12 @@ DECLSPEC void m04520m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m04520s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04520s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -1085,8 +1079,8 @@ KERNEL_FQ void m04520_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1146,7 +1140,7 @@ KERNEL_FQ void m04520_m04 (KERN_ATTR_BASIC ()) * main */ - m04520m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04520m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04520_m08 (KERN_ATTR_BASIC ()) @@ -1155,8 +1149,8 @@ KERNEL_FQ void m04520_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1216,7 +1210,7 @@ KERNEL_FQ void m04520_m08 (KERN_ATTR_BASIC ()) * main */ - m04520m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04520m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04520_m16 (KERN_ATTR_BASIC ()) @@ -1225,8 +1219,8 @@ KERNEL_FQ void m04520_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1286,7 +1280,7 @@ KERNEL_FQ void m04520_m16 (KERN_ATTR_BASIC ()) * main */ - m04520m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04520m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04520_s04 (KERN_ATTR_BASIC ()) @@ -1295,8 +1289,8 @@ KERNEL_FQ void m04520_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1356,7 +1350,7 @@ KERNEL_FQ void m04520_s04 (KERN_ATTR_BASIC ()) * main */ - m04520s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04520s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04520_s08 (KERN_ATTR_BASIC ()) @@ -1365,8 +1359,8 @@ KERNEL_FQ void m04520_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1426,7 +1420,7 @@ KERNEL_FQ void m04520_s08 (KERN_ATTR_BASIC ()) * main */ - m04520s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04520s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04520_s16 (KERN_ATTR_BASIC ()) @@ -1435,8 +1429,8 @@ KERNEL_FQ void m04520_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1496,5 +1490,5 @@ KERNEL_FQ void m04520_s16 (KERN_ATTR_BASIC ()) * main */ - m04520s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04520s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m04700_a3-optimized.cl b/OpenCL/m04700_a3-optimized.cl index 46ec99388..1b6640742 100644 --- a/OpenCL/m04700_a3-optimized.cl +++ b/OpenCL/m04700_a3-optimized.cl @@ -30,15 +30,12 @@ #define uint_to_hex_lower8_le(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m04700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04700m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -288,15 +285,12 @@ DECLSPEC void m04700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m04700s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04700s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -573,8 +567,8 @@ KERNEL_FQ void m04700_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -634,7 +628,7 @@ KERNEL_FQ void m04700_m04 (KERN_ATTR_BASIC ()) * main */ - m04700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04700_m08 (KERN_ATTR_BASIC ()) @@ -643,8 +637,8 @@ KERNEL_FQ void m04700_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -704,7 +698,7 @@ KERNEL_FQ void m04700_m08 (KERN_ATTR_BASIC ()) * main */ - m04700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04700_m16 (KERN_ATTR_BASIC ()) @@ -713,8 +707,8 @@ KERNEL_FQ void m04700_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -774,7 +768,7 @@ KERNEL_FQ void m04700_m16 (KERN_ATTR_BASIC ()) * main */ - m04700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04700_s04 (KERN_ATTR_BASIC ()) @@ -783,8 +777,8 @@ KERNEL_FQ void m04700_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -844,7 +838,7 @@ KERNEL_FQ void m04700_s04 (KERN_ATTR_BASIC ()) * main */ - m04700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04700_s08 (KERN_ATTR_BASIC ()) @@ -853,8 +847,8 @@ KERNEL_FQ void m04700_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -914,7 +908,7 @@ KERNEL_FQ void m04700_s08 (KERN_ATTR_BASIC ()) * main */ - m04700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04700_s16 (KERN_ATTR_BASIC ()) @@ -923,8 +917,8 @@ KERNEL_FQ void m04700_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -984,5 +978,5 @@ KERNEL_FQ void m04700_s16 (KERN_ATTR_BASIC ()) * main */ - m04700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m04710_a3-optimized.cl b/OpenCL/m04710_a3-optimized.cl index dff6bbbd0..bc6c9db63 100644 --- a/OpenCL/m04710_a3-optimized.cl +++ b/OpenCL/m04710_a3-optimized.cl @@ -30,15 +30,12 @@ #define uint_to_hex_lower8_le(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m04710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04710m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -693,15 +690,12 @@ DECLSPEC void m04710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m04710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04710s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -1383,8 +1377,8 @@ KERNEL_FQ void m04710_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1444,7 +1438,7 @@ KERNEL_FQ void m04710_m04 (KERN_ATTR_BASIC ()) * main */ - m04710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04710_m08 (KERN_ATTR_BASIC ()) @@ -1453,8 +1447,8 @@ KERNEL_FQ void m04710_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1514,7 +1508,7 @@ KERNEL_FQ void m04710_m08 (KERN_ATTR_BASIC ()) * main */ - m04710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04710_m16 (KERN_ATTR_BASIC ()) @@ -1523,8 +1517,8 @@ KERNEL_FQ void m04710_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1584,7 +1578,7 @@ KERNEL_FQ void m04710_m16 (KERN_ATTR_BASIC ()) * main */ - m04710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04710m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04710_s04 (KERN_ATTR_BASIC ()) @@ -1593,8 +1587,8 @@ KERNEL_FQ void m04710_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1654,7 +1648,7 @@ KERNEL_FQ void m04710_s04 (KERN_ATTR_BASIC ()) * main */ - m04710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04710_s08 (KERN_ATTR_BASIC ()) @@ -1663,8 +1657,8 @@ KERNEL_FQ void m04710_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1724,7 +1718,7 @@ KERNEL_FQ void m04710_s08 (KERN_ATTR_BASIC ()) * main */ - m04710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m04710_s16 (KERN_ATTR_BASIC ()) @@ -1733,8 +1727,8 @@ KERNEL_FQ void m04710_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1794,5 +1788,5 @@ KERNEL_FQ void m04710_s16 (KERN_ATTR_BASIC ()) * main */ - m04710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m04710s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m04800_a3-optimized.cl b/OpenCL/m04800_a3-optimized.cl index 634832687..12566c6d9 100644 --- a/OpenCL/m04800_a3-optimized.cl +++ b/OpenCL/m04800_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void m04800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m04800m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -201,15 +198,12 @@ DECLSPEC void m04800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m04800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m04800s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -406,7 +400,9 @@ KERNEL_FQ void m04800_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -414,8 +410,6 @@ KERNEL_FQ void m04800_m04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -450,7 +444,7 @@ KERNEL_FQ void m04800_m04 (KERN_ATTR_BASIC ()) * main */ - m04800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m04800_m08 (KERN_ATTR_BASIC ()) @@ -459,7 +453,9 @@ KERNEL_FQ void m04800_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -467,8 +463,6 @@ KERNEL_FQ void m04800_m08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -503,7 +497,7 @@ KERNEL_FQ void m04800_m08 (KERN_ATTR_BASIC ()) * main */ - m04800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m04800_m16 (KERN_ATTR_BASIC ()) @@ -512,7 +506,9 @@ KERNEL_FQ void m04800_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -520,8 +516,6 @@ KERNEL_FQ void m04800_m16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -556,7 +550,7 @@ KERNEL_FQ void m04800_m16 (KERN_ATTR_BASIC ()) * main */ - m04800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m04800_s04 (KERN_ATTR_BASIC ()) @@ -565,7 +559,9 @@ KERNEL_FQ void m04800_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -573,8 +569,6 @@ KERNEL_FQ void m04800_s04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -609,7 +603,7 @@ KERNEL_FQ void m04800_s04 (KERN_ATTR_BASIC ()) * main */ - m04800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m04800_s08 (KERN_ATTR_BASIC ()) @@ -618,7 +612,9 @@ KERNEL_FQ void m04800_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -626,8 +622,6 @@ KERNEL_FQ void m04800_s08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -662,7 +656,7 @@ KERNEL_FQ void m04800_s08 (KERN_ATTR_BASIC ()) * main */ - m04800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m04800_s16 (KERN_ATTR_BASIC ()) @@ -671,7 +665,9 @@ KERNEL_FQ void m04800_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -679,8 +675,6 @@ KERNEL_FQ void m04800_s16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -715,5 +709,5 @@ KERNEL_FQ void m04800_s16 (KERN_ATTR_BASIC ()) * main */ - m04800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m04900_a3-optimized.cl b/OpenCL/m04900_a3-optimized.cl index b138abf7f..74b623da6 100644 --- a/OpenCL/m04900_a3-optimized.cl +++ b/OpenCL/m04900_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m04900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m04900m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -284,15 +281,12 @@ DECLSPEC void m04900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m04900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m04900s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -578,7 +572,9 @@ KERNEL_FQ void m04900_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -586,8 +582,6 @@ KERNEL_FQ void m04900_m04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -622,7 +616,7 @@ KERNEL_FQ void m04900_m04 (KERN_ATTR_BASIC ()) * main */ - m04900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m04900_m08 (KERN_ATTR_BASIC ()) @@ -631,7 +625,9 @@ KERNEL_FQ void m04900_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -639,8 +635,6 @@ KERNEL_FQ void m04900_m08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -675,7 +669,7 @@ KERNEL_FQ void m04900_m08 (KERN_ATTR_BASIC ()) * main */ - m04900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m04900_m16 (KERN_ATTR_BASIC ()) @@ -684,7 +678,9 @@ KERNEL_FQ void m04900_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -692,8 +688,6 @@ KERNEL_FQ void m04900_m16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -728,7 +722,7 @@ KERNEL_FQ void m04900_m16 (KERN_ATTR_BASIC ()) * main */ - m04900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m04900_s04 (KERN_ATTR_BASIC ()) @@ -737,7 +731,9 @@ KERNEL_FQ void m04900_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -745,8 +741,6 @@ KERNEL_FQ void m04900_s04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -781,7 +775,7 @@ KERNEL_FQ void m04900_s04 (KERN_ATTR_BASIC ()) * main */ - m04900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m04900_s08 (KERN_ATTR_BASIC ()) @@ -790,7 +784,9 @@ KERNEL_FQ void m04900_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -798,8 +794,6 @@ KERNEL_FQ void m04900_s08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -834,7 +828,7 @@ KERNEL_FQ void m04900_s08 (KERN_ATTR_BASIC ()) * main */ - m04900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m04900_s16 (KERN_ATTR_BASIC ()) @@ -843,7 +837,9 @@ KERNEL_FQ void m04900_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -851,8 +847,6 @@ KERNEL_FQ void m04900_s16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -887,5 +881,5 @@ KERNEL_FQ void m04900_s16 (KERN_ATTR_BASIC ()) * main */ - m04900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m04900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m05000_a3-optimized.cl b/OpenCL/m05000_a3-optimized.cl index f81893525..46c15a61f 100644 --- a/OpenCL/m05000_a3-optimized.cl +++ b/OpenCL/m05000_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8_le(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m05000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m05000m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -436,15 +433,12 @@ DECLSPEC void m05000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m05000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m05000s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -870,8 +864,8 @@ KERNEL_FQ void m05000_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -927,7 +921,7 @@ KERNEL_FQ void m05000_m04 (KERN_ATTR_BASIC ()) * main */ - m05000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m05000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m05000_m08 (KERN_ATTR_BASIC ()) @@ -936,8 +930,8 @@ KERNEL_FQ void m05000_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -993,7 +987,7 @@ KERNEL_FQ void m05000_m08 (KERN_ATTR_BASIC ()) * main */ - m05000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m05000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m05000_m16 (KERN_ATTR_BASIC ()) @@ -1002,8 +996,8 @@ KERNEL_FQ void m05000_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1059,7 +1053,7 @@ KERNEL_FQ void m05000_m16 (KERN_ATTR_BASIC ()) * main */ - m05000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m05000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m05000_s04 (KERN_ATTR_BASIC ()) @@ -1068,9 +1062,8 @@ KERNEL_FQ void m05000_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1126,7 +1119,7 @@ KERNEL_FQ void m05000_s04 (KERN_ATTR_BASIC ()) * main */ - m05000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m05000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m05000_s08 (KERN_ATTR_BASIC ()) @@ -1135,8 +1128,8 @@ KERNEL_FQ void m05000_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1192,7 +1185,7 @@ KERNEL_FQ void m05000_s08 (KERN_ATTR_BASIC ()) * main */ - m05000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m05000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m05000_s16 (KERN_ATTR_BASIC ()) @@ -1201,8 +1194,8 @@ KERNEL_FQ void m05000_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1258,5 +1251,5 @@ KERNEL_FQ void m05000_s16 (KERN_ATTR_BASIC ()) * main */ - m05000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m05000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m05100_a3-optimized.cl b/OpenCL/m05100_a3-optimized.cl index 5b82db7d2..898699239 100644 --- a/OpenCL/m05100_a3-optimized.cl +++ b/OpenCL/m05100_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void m05100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m05100m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -152,15 +149,12 @@ DECLSPEC void m05100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m05100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m05100s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -305,7 +299,9 @@ KERNEL_FQ void m05100_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -343,7 +339,7 @@ KERNEL_FQ void m05100_m04 (KERN_ATTR_BASIC ()) * main */ - m05100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m05100_m08 (KERN_ATTR_BASIC ()) @@ -352,7 +348,9 @@ KERNEL_FQ void m05100_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -390,7 +388,7 @@ KERNEL_FQ void m05100_m08 (KERN_ATTR_BASIC ()) * main */ - m05100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m05100_m16 (KERN_ATTR_BASIC ()) @@ -399,7 +397,9 @@ KERNEL_FQ void m05100_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -437,7 +437,7 @@ KERNEL_FQ void m05100_m16 (KERN_ATTR_BASIC ()) * main */ - m05100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m05100_s04 (KERN_ATTR_BASIC ()) @@ -446,7 +446,9 @@ KERNEL_FQ void m05100_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -484,7 +486,7 @@ KERNEL_FQ void m05100_s04 (KERN_ATTR_BASIC ()) * main */ - m05100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m05100_s08 (KERN_ATTR_BASIC ()) @@ -493,7 +495,9 @@ KERNEL_FQ void m05100_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -531,7 +535,7 @@ KERNEL_FQ void m05100_s08 (KERN_ATTR_BASIC ()) * main */ - m05100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m05100_s16 (KERN_ATTR_BASIC ()) @@ -540,7 +544,9 @@ KERNEL_FQ void m05100_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -578,5 +584,5 @@ KERNEL_FQ void m05100_s16 (KERN_ATTR_BASIC ()) * main */ - m05100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m05300_a0-optimized.cl b/OpenCL/m05300_a0-optimized.cl index ed5e197a5..2f49702d1 100644 --- a/OpenCL/m05300_a0-optimized.cl +++ b/OpenCL/m05300_a0-optimized.cl @@ -29,7 +29,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -80,7 +80,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05300_a1-optimized.cl b/OpenCL/m05300_a1-optimized.cl index f60666d94..eee27dc14 100644 --- a/OpenCL/m05300_a1-optimized.cl +++ b/OpenCL/m05300_a1-optimized.cl @@ -27,7 +27,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -78,7 +78,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05300_a3-optimized.cl b/OpenCL/m05300_a3-optimized.cl index 3874f57c7..fcf27e820 100644 --- a/OpenCL/m05300_a3-optimized.cl +++ b/OpenCL/m05300_a3-optimized.cl @@ -27,7 +27,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -78,7 +78,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -112,15 +112,12 @@ DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void m05300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) +DECLSPEC void m05300m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -259,15 +256,12 @@ DECLSPEC void m05300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m05300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) +DECLSPEC void m05300s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -424,8 +418,8 @@ KERNEL_FQ void m05300_m04 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -488,7 +482,7 @@ KERNEL_FQ void m05300_m04 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05300_m08 (KERN_ATTR_ESALT (ikepsk_t)) @@ -497,8 +491,8 @@ KERNEL_FQ void m05300_m08 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -561,7 +555,7 @@ KERNEL_FQ void m05300_m08 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05300_m16 (KERN_ATTR_ESALT (ikepsk_t)) @@ -570,8 +564,8 @@ KERNEL_FQ void m05300_m16 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -634,7 +628,7 @@ KERNEL_FQ void m05300_m16 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05300_s04 (KERN_ATTR_ESALT (ikepsk_t)) @@ -643,8 +637,8 @@ KERNEL_FQ void m05300_s04 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -707,7 +701,7 @@ KERNEL_FQ void m05300_s04 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05300_s08 (KERN_ATTR_ESALT (ikepsk_t)) @@ -716,8 +710,8 @@ KERNEL_FQ void m05300_s08 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -780,7 +774,7 @@ KERNEL_FQ void m05300_s08 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05300_s16 (KERN_ATTR_ESALT (ikepsk_t)) @@ -789,8 +783,8 @@ KERNEL_FQ void m05300_s16 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -853,5 +847,5 @@ KERNEL_FQ void m05300_s16 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } diff --git a/OpenCL/m05400_a0-optimized.cl b/OpenCL/m05400_a0-optimized.cl index 9d97b65db..898b9e198 100644 --- a/OpenCL/m05400_a0-optimized.cl +++ b/OpenCL/m05400_a0-optimized.cl @@ -29,7 +29,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -82,7 +82,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05400_a1-optimized.cl b/OpenCL/m05400_a1-optimized.cl index d69d1b3fa..2052e0539 100644 --- a/OpenCL/m05400_a1-optimized.cl +++ b/OpenCL/m05400_a1-optimized.cl @@ -27,7 +27,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -80,7 +80,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05400_a3-optimized.cl b/OpenCL/m05400_a3-optimized.cl index 2bc9f161d..be319e5f0 100644 --- a/OpenCL/m05400_a3-optimized.cl +++ b/OpenCL/m05400_a3-optimized.cl @@ -27,7 +27,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -80,7 +80,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -116,15 +116,12 @@ DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void m05400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) +DECLSPEC void m05400m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -263,15 +260,12 @@ DECLSPEC void m05400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m05400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) +DECLSPEC void m05400s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -428,8 +422,8 @@ KERNEL_FQ void m05400_m04 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -492,7 +486,7 @@ KERNEL_FQ void m05400_m04 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05400_m08 (KERN_ATTR_ESALT (ikepsk_t)) @@ -501,8 +495,8 @@ KERNEL_FQ void m05400_m08 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -565,7 +559,7 @@ KERNEL_FQ void m05400_m08 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05400_m16 (KERN_ATTR_ESALT (ikepsk_t)) @@ -574,8 +568,8 @@ KERNEL_FQ void m05400_m16 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -638,7 +632,7 @@ KERNEL_FQ void m05400_m16 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05400_s04 (KERN_ATTR_ESALT (ikepsk_t)) @@ -647,8 +641,8 @@ KERNEL_FQ void m05400_s04 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -711,7 +705,7 @@ KERNEL_FQ void m05400_s04 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05400_s08 (KERN_ATTR_ESALT (ikepsk_t)) @@ -720,8 +714,8 @@ KERNEL_FQ void m05400_s08 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -784,7 +778,7 @@ KERNEL_FQ void m05400_s08 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } KERNEL_FQ void m05400_s16 (KERN_ATTR_ESALT (ikepsk_t)) @@ -793,8 +787,8 @@ KERNEL_FQ void m05400_s16 (KERN_ATTR_ESALT (ikepsk_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -857,5 +851,5 @@ KERNEL_FQ void m05400_s16 (KERN_ATTR_ESALT (ikepsk_t)) * main */ - m05400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_msg_buf, s_nr_buf); + m05400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_msg_buf, s_nr_buf); } diff --git a/OpenCL/m05500_a0-optimized.cl b/OpenCL/m05500_a0-optimized.cl index 174c76c5c..359474e45 100644 --- a/OpenCL/m05500_a0-optimized.cl +++ b/OpenCL/m05500_a0-optimized.cl @@ -359,7 +359,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32x *iv, PRIVATE_AS u32x *data, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) { u32x r = data[0]; u32x l = data[1]; @@ -401,7 +401,7 @@ DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, SHM_ iv[1] = r; } -DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, SHM_TYPE u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, SHM_TYPE u32 (*s_skb)[64]) { u32x tt; @@ -470,7 +470,7 @@ DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, SHM_TYPE } } -DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, PRIVATE_AS u32x *out) { u32x t[8]; diff --git a/OpenCL/m05500_a0-pure.cl b/OpenCL/m05500_a0-pure.cl index e147229c1..5341becbe 100644 --- a/OpenCL/m05500_a0-pure.cl +++ b/OpenCL/m05500_a0-pure.cl @@ -359,7 +359,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32 *data, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -401,7 +401,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, SHM_TYPE iv[1] = r; } -DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, SHM_TYPE u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, SHM_TYPE u32 (*s_skb)[64]) { u32 tt; @@ -470,7 +470,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, SHM_TYPE u32 } } -DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32 w1, u32 *out) +DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32 w1, PRIVATE_AS u32 *out) { u32 t[8]; diff --git a/OpenCL/m05500_a1-optimized.cl b/OpenCL/m05500_a1-optimized.cl index 07743d7bf..c7258c57b 100644 --- a/OpenCL/m05500_a1-optimized.cl +++ b/OpenCL/m05500_a1-optimized.cl @@ -357,7 +357,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32x *iv, PRIVATE_AS u32x *data, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) { u32x r = data[0]; u32x l = data[1]; @@ -399,7 +399,7 @@ DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, SHM_ iv[1] = r; } -DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, SHM_TYPE u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, SHM_TYPE u32 (*s_skb)[64]) { u32x tt; @@ -468,7 +468,7 @@ DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, SHM_TYPE } } -DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, PRIVATE_AS u32x *out) { u32x t[8]; diff --git a/OpenCL/m05500_a1-pure.cl b/OpenCL/m05500_a1-pure.cl index 0522e7616..9c67d180e 100644 --- a/OpenCL/m05500_a1-pure.cl +++ b/OpenCL/m05500_a1-pure.cl @@ -357,7 +357,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32 *data, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -399,7 +399,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, SHM_TYPE iv[1] = r; } -DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, SHM_TYPE u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, SHM_TYPE u32 (*s_skb)[64]) { u32 tt; @@ -468,7 +468,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, SHM_TYPE u32 } } -DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32 w1, u32 *out) +DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32 w1, PRIVATE_AS u32 *out) { u32 t[8]; diff --git a/OpenCL/m05500_a3-optimized.cl b/OpenCL/m05500_a3-optimized.cl index 04a036f26..58df041fa 100644 --- a/OpenCL/m05500_a3-optimized.cl +++ b/OpenCL/m05500_a3-optimized.cl @@ -357,7 +357,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32x *iv, PRIVATE_AS u32x *data, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) { u32x r = data[0]; u32x l = data[1]; @@ -399,7 +399,7 @@ DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, SHM_ iv[1] = r; } -DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, SHM_TYPE u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, SHM_TYPE u32 (*s_skb)[64]) { u32x tt; @@ -468,7 +468,7 @@ DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, SHM_TYPE } } -DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, PRIVATE_AS u32x *out) { u32x t[8]; @@ -503,15 +503,12 @@ DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) | ((k[7] & 0xff) << 24); } -DECLSPEC void m05500m (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m05500m (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -660,15 +657,12 @@ DECLSPEC void m05500m (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], } } -DECLSPEC void m05500s (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m05500s (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -842,8 +836,8 @@ KERNEL_FQ void m05500_m04 (KERN_ATTR_VECTOR ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -916,7 +910,7 @@ KERNEL_FQ void m05500_m04 (KERN_ATTR_VECTOR ()) * main */ - m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m05500_m08 (KERN_ATTR_VECTOR ()) @@ -925,8 +919,8 @@ KERNEL_FQ void m05500_m08 (KERN_ATTR_VECTOR ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -999,7 +993,7 @@ KERNEL_FQ void m05500_m08 (KERN_ATTR_VECTOR ()) * main */ - m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m05500_m16 (KERN_ATTR_VECTOR ()) @@ -1008,8 +1002,8 @@ KERNEL_FQ void m05500_m16 (KERN_ATTR_VECTOR ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1082,7 +1076,7 @@ KERNEL_FQ void m05500_m16 (KERN_ATTR_VECTOR ()) * main */ - m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m05500_s04 (KERN_ATTR_VECTOR ()) @@ -1091,8 +1085,8 @@ KERNEL_FQ void m05500_s04 (KERN_ATTR_VECTOR ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1165,7 +1159,7 @@ KERNEL_FQ void m05500_s04 (KERN_ATTR_VECTOR ()) * main */ - m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m05500_s08 (KERN_ATTR_VECTOR ()) @@ -1174,8 +1168,8 @@ KERNEL_FQ void m05500_s08 (KERN_ATTR_VECTOR ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1248,7 +1242,7 @@ KERNEL_FQ void m05500_s08 (KERN_ATTR_VECTOR ()) * main */ - m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m05500_s16 (KERN_ATTR_VECTOR ()) @@ -1257,8 +1251,8 @@ KERNEL_FQ void m05500_s16 (KERN_ATTR_VECTOR ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1331,5 +1325,5 @@ KERNEL_FQ void m05500_s16 (KERN_ATTR_VECTOR ()) * main */ - m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m05500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m05500_a3-pure.cl b/OpenCL/m05500_a3-pure.cl index 525b03b54..d876d6888 100644 --- a/OpenCL/m05500_a3-pure.cl +++ b/OpenCL/m05500_a3-pure.cl @@ -357,7 +357,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32x *iv, PRIVATE_AS u32x *data, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) { u32x r = data[0]; u32x l = data[1]; @@ -399,7 +399,7 @@ DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, SHM_ iv[1] = r; } -DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, SHM_TYPE u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, SHM_TYPE u32 (*s_skb)[64]) { u32x tt; @@ -468,7 +468,7 @@ DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, SHM_TYPE } } -DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, PRIVATE_AS u32x *out) { u32x t[8]; diff --git a/OpenCL/m05600_a0-optimized.cl b/OpenCL/m05600_a0-optimized.cl index 17d881355..0476271b8 100644 --- a/OpenCL/m05600_a0-optimized.cl +++ b/OpenCL/m05600_a0-optimized.cl @@ -32,7 +32,7 @@ typedef struct netntlm } netntlm_t; -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -83,7 +83,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05600_a1-optimized.cl b/OpenCL/m05600_a1-optimized.cl index d3df891a1..9ff3c12eb 100644 --- a/OpenCL/m05600_a1-optimized.cl +++ b/OpenCL/m05600_a1-optimized.cl @@ -30,7 +30,7 @@ typedef struct netntlm } netntlm_t; -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -81,7 +81,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05600_a3-optimized.cl b/OpenCL/m05600_a3-optimized.cl index bd9d1dfd7..d59a110f2 100644 --- a/OpenCL/m05600_a3-optimized.cl +++ b/OpenCL/m05600_a3-optimized.cl @@ -30,7 +30,7 @@ typedef struct netntlm } netntlm_t; -DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -81,7 +81,7 @@ DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -115,15 +115,12 @@ DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, md5_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void m05600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (netntlm_t), LOCAL_AS u32 *s_userdomain_buf, LOCAL_AS u32 *s_chall_buf) +DECLSPEC void m05600m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (netntlm_t), LOCAL_AS u32 *s_userdomain_buf, LOCAL_AS u32 *s_chall_buf) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * prepare */ @@ -321,15 +318,12 @@ DECLSPEC void m05600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m05600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (netntlm_t), LOCAL_AS u32 *s_userdomain_buf, LOCAL_AS u32 *s_chall_buf) +DECLSPEC void m05600s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (netntlm_t), LOCAL_AS u32 *s_userdomain_buf, LOCAL_AS u32 *s_chall_buf) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * prepare */ @@ -545,8 +539,8 @@ KERNEL_FQ void m05600_m04 (KERN_ATTR_ESALT (netntlm_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -609,7 +603,7 @@ KERNEL_FQ void m05600_m04 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_userdomain_buf, s_chall_buf); + m05600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_userdomain_buf, s_chall_buf); } KERNEL_FQ void m05600_m08 (KERN_ATTR_ESALT (netntlm_t)) @@ -618,8 +612,8 @@ KERNEL_FQ void m05600_m08 (KERN_ATTR_ESALT (netntlm_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -682,7 +676,7 @@ KERNEL_FQ void m05600_m08 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_userdomain_buf, s_chall_buf); + m05600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_userdomain_buf, s_chall_buf); } KERNEL_FQ void m05600_m16 (KERN_ATTR_ESALT (netntlm_t)) @@ -691,8 +685,8 @@ KERNEL_FQ void m05600_m16 (KERN_ATTR_ESALT (netntlm_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -755,7 +749,7 @@ KERNEL_FQ void m05600_m16 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_userdomain_buf, s_chall_buf); + m05600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_userdomain_buf, s_chall_buf); } KERNEL_FQ void m05600_s04 (KERN_ATTR_ESALT (netntlm_t)) @@ -764,8 +758,8 @@ KERNEL_FQ void m05600_s04 (KERN_ATTR_ESALT (netntlm_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -828,7 +822,7 @@ KERNEL_FQ void m05600_s04 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_userdomain_buf, s_chall_buf); + m05600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_userdomain_buf, s_chall_buf); } KERNEL_FQ void m05600_s08 (KERN_ATTR_ESALT (netntlm_t)) @@ -837,8 +831,8 @@ KERNEL_FQ void m05600_s08 (KERN_ATTR_ESALT (netntlm_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -901,7 +895,7 @@ KERNEL_FQ void m05600_s08 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_userdomain_buf, s_chall_buf); + m05600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_userdomain_buf, s_chall_buf); } KERNEL_FQ void m05600_s16 (KERN_ATTR_ESALT (netntlm_t)) @@ -910,8 +904,8 @@ KERNEL_FQ void m05600_s16 (KERN_ATTR_ESALT (netntlm_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -974,5 +968,5 @@ KERNEL_FQ void m05600_s16 (KERN_ATTR_ESALT (netntlm_t)) * main */ - m05600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_userdomain_buf, s_chall_buf); + m05600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_userdomain_buf, s_chall_buf); } diff --git a/OpenCL/m05800-optimized.cl b/OpenCL/m05800-optimized.cl index 1295f1fcd..fd2b10078 100644 --- a/OpenCL/m05800-optimized.cl +++ b/OpenCL/m05800-optimized.cl @@ -2079,7 +2079,7 @@ CONSTANT_VK u32a c_pc_len[1024] = 4 }; -DECLSPEC void append_word (u32 *w0, u32 *w1, const u32 *append, const u32 offset) +DECLSPEC void append_word (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS const u32 *append, const u32 offset) { switch (offset) { @@ -2113,7 +2113,7 @@ DECLSPEC void append_word (u32 *w0, u32 *w1, const u32 *append, const u32 offset } } -DECLSPEC void append_salt (u32 *w0, u32 *w1, u32 *w2, const u32 *append, const u32 offset) +DECLSPEC void append_salt (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS const u32 *append, const u32 offset) { u32 tmp0; u32 tmp1; diff --git a/OpenCL/m06000_a0-optimized.cl b/OpenCL/m06000_a0-optimized.cl index 9daaeb684..6755fce54 100644 --- a/OpenCL/m06000_a0-optimized.cl +++ b/OpenCL/m06000_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_ripemd160.cl) #endif -DECLSPEC void ripemd160_transform_transport_vector (const u32x *w, u32x *dgst) +DECLSPEC void ripemd160_transform_transport_vector (PRIVATE_AS const u32x *w, PRIVATE_AS u32x *dgst) { ripemd160_transform_vector (w + 0, w + 4, w + 8, w + 12, dgst); } diff --git a/OpenCL/m06000_a1-optimized.cl b/OpenCL/m06000_a1-optimized.cl index 68f1caaec..f75a57540 100644 --- a/OpenCL/m06000_a1-optimized.cl +++ b/OpenCL/m06000_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_ripemd160.cl) #endif -DECLSPEC void ripemd160_transform_transport_vector (const u32x *w, u32x *dgst) +DECLSPEC void ripemd160_transform_transport_vector (PRIVATE_AS const u32x *w, PRIVATE_AS u32x *dgst) { ripemd160_transform_vector (w + 0, w + 4, w + 8, w + 12, dgst); } diff --git a/OpenCL/m06000_a3-optimized.cl b/OpenCL/m06000_a3-optimized.cl index 8e6303af5..68d2c0e11 100644 --- a/OpenCL/m06000_a3-optimized.cl +++ b/OpenCL/m06000_a3-optimized.cl @@ -17,20 +17,17 @@ #include STR(INCLUDE_PATH/inc_hash_ripemd160.cl) #endif -DECLSPEC void ripemd160_transform_transport_vector (const u32x *w, u32x *dgst) +DECLSPEC void ripemd160_transform_transport_vector (PRIVATE_AS const u32x *w, PRIVATE_AS u32x *dgst) { ripemd160_transform_vector (w + 0, w + 4, w + 8, w + 12, dgst); } -DECLSPEC void m06000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m06000m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -80,15 +77,12 @@ DECLSPEC void m06000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m06000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m06000s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -156,7 +150,9 @@ KERNEL_FQ void m06000_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -194,7 +190,7 @@ KERNEL_FQ void m06000_m04 (KERN_ATTR_BASIC ()) * main */ - m06000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m06000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m06000_m08 (KERN_ATTR_BASIC ()) @@ -203,7 +199,9 @@ KERNEL_FQ void m06000_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -241,7 +239,7 @@ KERNEL_FQ void m06000_m08 (KERN_ATTR_BASIC ()) * main */ - m06000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m06000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m06000_m16 (KERN_ATTR_BASIC ()) @@ -250,7 +248,9 @@ KERNEL_FQ void m06000_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -288,7 +288,7 @@ KERNEL_FQ void m06000_m16 (KERN_ATTR_BASIC ()) * main */ - m06000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m06000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m06000_s04 (KERN_ATTR_BASIC ()) @@ -297,7 +297,9 @@ KERNEL_FQ void m06000_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -335,7 +337,7 @@ KERNEL_FQ void m06000_s04 (KERN_ATTR_BASIC ()) * main */ - m06000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m06000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m06000_s08 (KERN_ATTR_BASIC ()) @@ -344,7 +346,9 @@ KERNEL_FQ void m06000_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -382,7 +386,7 @@ KERNEL_FQ void m06000_s08 (KERN_ATTR_BASIC ()) * main */ - m06000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m06000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m06000_s16 (KERN_ATTR_BASIC ()) @@ -391,7 +395,9 @@ KERNEL_FQ void m06000_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -429,5 +435,5 @@ KERNEL_FQ void m06000_s16 (KERN_ATTR_BASIC ()) * main */ - m06000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m06000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m06100_a0-optimized.cl b/OpenCL/m06100_a0-optimized.cl index 1d9439b14..d35bc054d 100644 --- a/OpenCL/m06100_a0-optimized.cl +++ b/OpenCL/m06100_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_whirlpool.cl) #endif -DECLSPEC void whirlpool_transform_transport_vector (const u32x *w, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_transform_transport_vector (PRIVATE_AS const u32x *w, PRIVATE_AS u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { whirlpool_transform_vector (w + 0, w + 4, w + 8, w + 12, digest, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } diff --git a/OpenCL/m06100_a1-optimized.cl b/OpenCL/m06100_a1-optimized.cl index f3bbd7667..9a915c0d5 100644 --- a/OpenCL/m06100_a1-optimized.cl +++ b/OpenCL/m06100_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_whirlpool.cl) #endif -DECLSPEC void whirlpool_transform_transport_vector (const u32x *w, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_transform_transport_vector (PRIVATE_AS const u32x *w, PRIVATE_AS u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { whirlpool_transform_vector (w + 0, w + 4, w + 8, w + 12, digest, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } diff --git a/OpenCL/m06100_a3-optimized.cl b/OpenCL/m06100_a3-optimized.cl index 26d0707bc..908cdc0fb 100644 --- a/OpenCL/m06100_a3-optimized.cl +++ b/OpenCL/m06100_a3-optimized.cl @@ -17,20 +17,17 @@ #include STR(INCLUDE_PATH/inc_hash_whirlpool.cl) #endif -DECLSPEC void whirlpool_transform_transport_vector (const u32x *w, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void whirlpool_transform_transport_vector (PRIVATE_AS const u32x *w, PRIVATE_AS u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { whirlpool_transform_vector (w + 0, w + 4, w + 8, w + 12, digest, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } -DECLSPEC void m06100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void m06100m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -91,15 +88,12 @@ DECLSPEC void m06100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m06100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void m06100s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -178,8 +172,8 @@ KERNEL_FQ void m06100_m04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -264,7 +258,7 @@ KERNEL_FQ void m06100_m04 (KERN_ATTR_BASIC ()) * main */ - m06100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); + m06100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } KERNEL_FQ void m06100_m08 (KERN_ATTR_BASIC ()) @@ -273,8 +267,8 @@ KERNEL_FQ void m06100_m08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -359,7 +353,7 @@ KERNEL_FQ void m06100_m08 (KERN_ATTR_BASIC ()) * main */ - m06100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); + m06100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } KERNEL_FQ void m06100_m16 (KERN_ATTR_BASIC ()) @@ -372,8 +366,8 @@ KERNEL_FQ void m06100_s04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -458,7 +452,7 @@ KERNEL_FQ void m06100_s04 (KERN_ATTR_BASIC ()) * main */ - m06100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); + m06100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } KERNEL_FQ void m06100_s08 (KERN_ATTR_BASIC ()) @@ -467,8 +461,8 @@ KERNEL_FQ void m06100_s08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -553,7 +547,7 @@ KERNEL_FQ void m06100_s08 (KERN_ATTR_BASIC ()) * main */ - m06100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); + m06100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_MT0, s_MT1, s_MT2, s_MT3, s_MT4, s_MT5, s_MT6, s_MT7); } KERNEL_FQ void m06100_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m06211-pure.cl b/OpenCL/m06211-pure.cl index 72dfd3743..32effc377 100644 --- a/OpenCL/m06211-pure.cl +++ b/OpenCL/m06211-pure.cl @@ -50,7 +50,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06212-pure.cl b/OpenCL/m06212-pure.cl index 595932b43..bebb58260 100644 --- a/OpenCL/m06212-pure.cl +++ b/OpenCL/m06212-pure.cl @@ -50,7 +50,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06213-pure.cl b/OpenCL/m06213-pure.cl index 752ca376b..4d0b43e0b 100644 --- a/OpenCL/m06213-pure.cl +++ b/OpenCL/m06213-pure.cl @@ -50,7 +50,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06221-pure.cl b/OpenCL/m06221-pure.cl index 178082334..71802bf7d 100644 --- a/OpenCL/m06221-pure.cl +++ b/OpenCL/m06221-pure.cl @@ -50,7 +50,7 @@ typedef struct tc64_tmp } tc64_tmp_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06222-pure.cl b/OpenCL/m06222-pure.cl index 05eaf139f..f32510f4e 100644 --- a/OpenCL/m06222-pure.cl +++ b/OpenCL/m06222-pure.cl @@ -50,7 +50,7 @@ typedef struct tc64_tmp } tc64_tmp_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06223-pure.cl b/OpenCL/m06223-pure.cl index ec55ebe9e..5e292f795 100644 --- a/OpenCL/m06223-pure.cl +++ b/OpenCL/m06223-pure.cl @@ -50,7 +50,7 @@ typedef struct tc64_tmp } tc64_tmp_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06231-pure.cl b/OpenCL/m06231-pure.cl index 1791eed32..acbb42d27 100644 --- a/OpenCL/m06231-pure.cl +++ b/OpenCL/m06231-pure.cl @@ -50,7 +50,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void hmac_whirlpool_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m06232-pure.cl b/OpenCL/m06232-pure.cl index 50d70a622..bd9abe910 100644 --- a/OpenCL/m06232-pure.cl +++ b/OpenCL/m06232-pure.cl @@ -50,7 +50,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void hmac_whirlpool_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m06233-pure.cl b/OpenCL/m06233-pure.cl index c0f2e4853..8bbde7f71 100644 --- a/OpenCL/m06233-pure.cl +++ b/OpenCL/m06233-pure.cl @@ -50,7 +50,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void hmac_whirlpool_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m06300-optimized.cl b/OpenCL/m06300-optimized.cl index 4aa6fe364..487bd94e9 100644 --- a/OpenCL/m06300-optimized.cl +++ b/OpenCL/m06300-optimized.cl @@ -23,7 +23,7 @@ typedef struct md5crypt_tmp } md5crypt_tmp_t; -DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16 (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 offset, PRIVATE_AS const u32 *append) { u32 tmp0; u32 tmp1; @@ -136,7 +136,7 @@ DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, cons } } -DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16_x80 (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 offset, PRIVATE_AS const u32 *append) { u32 tmp0; u32 tmp1; @@ -251,7 +251,7 @@ DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, } } -DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat8 (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 offset, PRIVATE_AS const u32 *append) { u32 tmp0; u32 tmp1; @@ -342,7 +342,7 @@ DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const } } -DECLSPEC void append_1st (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 block_len, const u32 append) +DECLSPEC void append_1st (PRIVATE_AS u32 *block0, PRIVATE_AS u32 *block1, PRIVATE_AS u32 *block2, PRIVATE_AS u32 *block3, const u32 block_len, const u32 append) { switch (block_len) { diff --git a/OpenCL/m06400-pure.cl b/OpenCL/m06400-pure.cl index 0fbfa6d55..b3401c65f 100644 --- a/OpenCL/m06400-pure.cl +++ b/OpenCL/m06400-pure.cl @@ -30,7 +30,7 @@ typedef struct sha256aix_tmp } sha256aix_tmp_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06500-pure.cl b/OpenCL/m06500-pure.cl index ba0a78a58..31356b8fc 100644 --- a/OpenCL/m06500-pure.cl +++ b/OpenCL/m06500-pure.cl @@ -30,7 +30,7 @@ typedef struct sha512aix_tmp } sha512aix_tmp_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06600-pure.cl b/OpenCL/m06600-pure.cl index 7ff2e7884..32658df5f 100644 --- a/OpenCL/m06600-pure.cl +++ b/OpenCL/m06600-pure.cl @@ -31,7 +31,7 @@ typedef struct agilekey_tmp } agilekey_tmp_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06700-pure.cl b/OpenCL/m06700-pure.cl index 1080cb93b..8a461be16 100644 --- a/OpenCL/m06700-pure.cl +++ b/OpenCL/m06700-pure.cl @@ -30,7 +30,7 @@ typedef struct sha1aix_tmp } sha1aix_tmp_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06800-pure.cl b/OpenCL/m06800-pure.cl index 38cb0d230..ad59021d8 100644 --- a/OpenCL/m06800-pure.cl +++ b/OpenCL/m06800-pure.cl @@ -31,7 +31,7 @@ typedef struct lastpass_tmp } lastpass_tmp_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06900_a3-optimized.cl b/OpenCL/m06900_a3-optimized.cl index b34da2a90..77232029c 100644 --- a/OpenCL/m06900_a3-optimized.cl +++ b/OpenCL/m06900_a3-optimized.cl @@ -699,15 +699,12 @@ CONSTANT_VK u32a c_tables[4][256] = R (k, h, s, 6, t); \ } -DECLSPEC void m06900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 (*s_tables)[256]) +DECLSPEC void m06900m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 (*s_tables)[256]) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -873,15 +870,12 @@ DECLSPEC void m06900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m06900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 (*s_tables)[256]) +DECLSPEC void m06900s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 (*s_tables)[256]) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -1065,8 +1059,8 @@ KERNEL_FQ void m06900_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1125,7 +1119,7 @@ KERNEL_FQ void m06900_m04 (KERN_ATTR_BASIC ()) * main */ - m06900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_tables); + m06900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_tables); } KERNEL_FQ void m06900_m08 (KERN_ATTR_BASIC ()) @@ -1134,8 +1128,8 @@ KERNEL_FQ void m06900_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1194,7 +1188,7 @@ KERNEL_FQ void m06900_m08 (KERN_ATTR_BASIC ()) * main */ - m06900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_tables); + m06900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_tables); } KERNEL_FQ void m06900_m16 (KERN_ATTR_BASIC ()) @@ -1207,8 +1201,8 @@ KERNEL_FQ void m06900_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1267,7 +1261,7 @@ KERNEL_FQ void m06900_s04 (KERN_ATTR_BASIC ()) * main */ - m06900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_tables); + m06900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_tables); } KERNEL_FQ void m06900_s08 (KERN_ATTR_BASIC ()) @@ -1276,8 +1270,8 @@ KERNEL_FQ void m06900_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1336,7 +1330,7 @@ KERNEL_FQ void m06900_s08 (KERN_ATTR_BASIC ()) * main */ - m06900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_tables); + m06900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_tables); } KERNEL_FQ void m06900_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m07000_a3-optimized.cl b/OpenCL/m07000_a3-optimized.cl index 35f9b1b58..536c35db5 100644 --- a/OpenCL/m07000_a3-optimized.cl +++ b/OpenCL/m07000_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m07000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07000m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -284,15 +281,12 @@ DECLSPEC void m07000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m07000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07000s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -578,7 +572,9 @@ KERNEL_FQ void m07000_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -586,8 +582,6 @@ KERNEL_FQ void m07000_m04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -622,7 +616,7 @@ KERNEL_FQ void m07000_m04 (KERN_ATTR_BASIC ()) * main */ - m07000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07000_m08 (KERN_ATTR_BASIC ()) @@ -631,7 +625,9 @@ KERNEL_FQ void m07000_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -639,8 +635,6 @@ KERNEL_FQ void m07000_m08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -675,7 +669,7 @@ KERNEL_FQ void m07000_m08 (KERN_ATTR_BASIC ()) * main */ - m07000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07000_m16 (KERN_ATTR_BASIC ()) @@ -684,7 +678,9 @@ KERNEL_FQ void m07000_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -692,8 +688,6 @@ KERNEL_FQ void m07000_m16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -728,7 +722,7 @@ KERNEL_FQ void m07000_m16 (KERN_ATTR_BASIC ()) * main */ - m07000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07000_s04 (KERN_ATTR_BASIC ()) @@ -737,7 +731,9 @@ KERNEL_FQ void m07000_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -745,8 +741,6 @@ KERNEL_FQ void m07000_s04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -781,7 +775,7 @@ KERNEL_FQ void m07000_s04 (KERN_ATTR_BASIC ()) * main */ - m07000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07000_s08 (KERN_ATTR_BASIC ()) @@ -790,7 +784,9 @@ KERNEL_FQ void m07000_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -798,8 +794,6 @@ KERNEL_FQ void m07000_s08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -834,7 +828,7 @@ KERNEL_FQ void m07000_s08 (KERN_ATTR_BASIC ()) * main */ - m07000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07000_s16 (KERN_ATTR_BASIC ()) @@ -843,7 +837,9 @@ KERNEL_FQ void m07000_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -851,8 +847,6 @@ KERNEL_FQ void m07000_s16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -887,5 +881,5 @@ KERNEL_FQ void m07000_s16 (KERN_ATTR_BASIC ()) * main */ - m07000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m07100-pure.cl b/OpenCL/m07100-pure.cl index 602296d4f..2dca3a925 100644 --- a/OpenCL/m07100-pure.cl +++ b/OpenCL/m07100-pure.cl @@ -36,7 +36,7 @@ typedef struct pbkdf2_sha512 } pbkdf2_sha512_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m07300_a0-optimized.cl b/OpenCL/m07300_a0-optimized.cl index af8078434..f6bfa67e4 100644 --- a/OpenCL/m07300_a0-optimized.cl +++ b/OpenCL/m07300_a0-optimized.cl @@ -26,7 +26,7 @@ typedef struct rakp } rakp_t; -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -79,7 +79,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m07300_a1-optimized.cl b/OpenCL/m07300_a1-optimized.cl index b83e9025b..9c9d8b07b 100644 --- a/OpenCL/m07300_a1-optimized.cl +++ b/OpenCL/m07300_a1-optimized.cl @@ -24,7 +24,7 @@ typedef struct rakp } rakp_t; -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -77,7 +77,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m07300_a3-optimized.cl b/OpenCL/m07300_a3-optimized.cl index e48d819de..2d8e87fff 100644 --- a/OpenCL/m07300_a3-optimized.cl +++ b/OpenCL/m07300_a3-optimized.cl @@ -24,7 +24,7 @@ typedef struct rakp } rakp_t; -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -77,7 +77,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -113,15 +113,12 @@ DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void m07300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (rakp_t), LOCAL_AS u32 *s_esalt_buf) +DECLSPEC void m07300m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (rakp_t), LOCAL_AS u32 *s_esalt_buf) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -223,15 +220,12 @@ DECLSPEC void m07300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m07300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (rakp_t), LOCAL_AS u32 *s_esalt_buf) +DECLSPEC void m07300s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (rakp_t), LOCAL_AS u32 *s_esalt_buf) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -351,8 +345,8 @@ KERNEL_FQ void m07300_m04 (KERN_ATTR_ESALT (rakp_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -408,17 +402,17 @@ KERNEL_FQ void m07300_m04 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_esalt_buf); + m07300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_esalt_buf); } KERNEL_FQ void m07300_m08 (KERN_ATTR_ESALT (rakp_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -474,17 +468,17 @@ KERNEL_FQ void m07300_m08 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_esalt_buf); + m07300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_esalt_buf); } KERNEL_FQ void m07300_m16 (KERN_ATTR_ESALT (rakp_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -540,7 +534,7 @@ KERNEL_FQ void m07300_m16 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_esalt_buf); + m07300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_esalt_buf); } KERNEL_FQ void m07300_s04 (KERN_ATTR_ESALT (rakp_t)) @@ -549,8 +543,8 @@ KERNEL_FQ void m07300_s04 (KERN_ATTR_ESALT (rakp_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -606,7 +600,7 @@ KERNEL_FQ void m07300_s04 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_esalt_buf); + m07300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_esalt_buf); } KERNEL_FQ void m07300_s08 (KERN_ATTR_ESALT (rakp_t)) @@ -615,8 +609,8 @@ KERNEL_FQ void m07300_s08 (KERN_ATTR_ESALT (rakp_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -672,7 +666,7 @@ KERNEL_FQ void m07300_s08 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_esalt_buf); + m07300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_esalt_buf); } KERNEL_FQ void m07300_s16 (KERN_ATTR_ESALT (rakp_t)) @@ -681,8 +675,8 @@ KERNEL_FQ void m07300_s16 (KERN_ATTR_ESALT (rakp_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -738,5 +732,5 @@ KERNEL_FQ void m07300_s16 (KERN_ATTR_ESALT (rakp_t)) * main */ - m07300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, s_esalt_buf); + m07300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, s_esalt_buf); } diff --git a/OpenCL/m07400-optimized.cl b/OpenCL/m07400-optimized.cl index 6eb2e1371..b6f6539c9 100644 --- a/OpenCL/m07400-optimized.cl +++ b/OpenCL/m07400-optimized.cl @@ -29,7 +29,7 @@ typedef struct sha256crypt_tmp } sha256crypt_tmp_t; -DECLSPEC void init_ctx (u32 *digest) +DECLSPEC void init_ctx (PRIVATE_AS u32 *digest) { digest[0] = SHA256M_A; digest[1] = SHA256M_B; @@ -41,7 +41,7 @@ DECLSPEC void init_ctx (u32 *digest) digest[7] = SHA256M_H; } -DECLSPEC u32 memcat16 (u32 *block, const u32 offset, const u32 *append, const u32 append_len) +DECLSPEC u32 memcat16 (PRIVATE_AS u32 *block, const u32 offset, PRIVATE_AS const u32 *append, const u32 append_len) { u32 in0 = append[0]; u32 in1 = append[1]; @@ -168,7 +168,7 @@ DECLSPEC u32 memcat16 (u32 *block, const u32 offset, const u32 *append, const u3 return new_len; } -DECLSPEC u32 memcat16c (u32 *block, const u32 offset, const u32 *append, const u32 append_len, u32 *digest) +DECLSPEC u32 memcat16c (PRIVATE_AS u32 *block, const u32 offset, PRIVATE_AS const u32 *append, const u32 append_len, PRIVATE_AS u32 *digest) { u32 in0 = append[0]; u32 in1 = append[1]; @@ -331,7 +331,7 @@ DECLSPEC u32 memcat16c (u32 *block, const u32 offset, const u32 *append, const u return new_len; } -DECLSPEC u32 memcat16s (u32 *block, const u32 offset, const u32 *append, const u32 append_len) +DECLSPEC u32 memcat16s (PRIVATE_AS u32 *block, const u32 offset, PRIVATE_AS const u32 *append, const u32 append_len) { u32 in0 = append[0]; u32 in1 = append[1]; @@ -472,7 +472,7 @@ DECLSPEC u32 memcat16s (u32 *block, const u32 offset, const u32 *append, const u return new_len; } -DECLSPEC u32 memcat16sc (u32 *block, const u32 offset, const u32 *append, const u32 append_len, u32 *digest) +DECLSPEC u32 memcat16sc (PRIVATE_AS u32 *block, const u32 offset, PRIVATE_AS const u32 *append, const u32 append_len, PRIVATE_AS u32 *digest) { u32 in0 = append[0]; u32 in1 = append[1]; @@ -654,7 +654,7 @@ DECLSPEC u32 memcat16sc (u32 *block, const u32 offset, const u32 *append, const return new_len; } -DECLSPEC void truncate_block_5x4_be_S (u32 *w0, const u32 len) +DECLSPEC void truncate_block_5x4_be_S (PRIVATE_AS u32 *w0, const u32 len) { switch (len) { @@ -780,7 +780,7 @@ DECLSPEC void truncate_block_5x4_be_S (u32 *w0, const u32 len) } } -DECLSPEC u32 memcat20 (u32 *block, const u32 offset, const u32 *append, const u32 append_len) +DECLSPEC u32 memcat20 (PRIVATE_AS u32 *block, const u32 offset, PRIVATE_AS const u32 *append, const u32 append_len) { u32 in0 = append[0]; u32 in1 = append[1]; @@ -945,7 +945,7 @@ DECLSPEC u32 memcat20 (u32 *block, const u32 offset, const u32 *append, const u3 return offset + append_len; } -DECLSPEC u32 memcat20_x80 (u32 *block, const u32 offset, const u32 *append, const u32 append_len) +DECLSPEC u32 memcat20_x80 (PRIVATE_AS u32 *block, const u32 offset, PRIVATE_AS const u32 *append, const u32 append_len) { u32 in0 = append[0]; u32 in1 = append[1]; @@ -1111,7 +1111,7 @@ DECLSPEC u32 memcat20_x80 (u32 *block, const u32 offset, const u32 *append, cons return offset + append_len; } -DECLSPEC u32 memcat24 (u32 *block, const u32 offset, const u32 *append, const u32 append_len) +DECLSPEC u32 memcat24 (PRIVATE_AS u32 *block, const u32 offset, PRIVATE_AS const u32 *append, const u32 append_len) { u32 in0 = append[0]; u32 in1 = append[1]; diff --git a/OpenCL/m07500_a0-optimized.cl b/OpenCL/m07500_a0-optimized.cl index bc05337ab..cb24417d2 100644 --- a/OpenCL/m07500_a0-optimized.cl +++ b/OpenCL/m07500_a0-optimized.cl @@ -32,19 +32,19 @@ typedef struct krb5pa } krb5pa_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, PRIVATE_AS u32 *timestamp_ct, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out[4]; u8 j = 0; - j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out); + j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out, lid); if ((out[3] & 0xffff0000) != 0x30320000) return 0; - j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out); + j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out, lid); if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; @@ -62,7 +62,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) return 1; } -DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -113,7 +113,7 @@ DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad, PRIVATE_AS u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -147,7 +147,7 @@ DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, const u32 pw_len, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest) { /** * pads @@ -362,7 +362,7 @@ KERNEL_FQ void m07500_m04 (KERN_ATTR_RULES_ESALT (krb5pa_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, timestamp_ct) == 1) + if (decrypt_and_check (S, tmp, timestamp_ct, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -466,7 +466,7 @@ KERNEL_FQ void m07500_s04 (KERN_ATTR_RULES_ESALT (krb5pa_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, timestamp_ct) == 1) + if (decrypt_and_check (S, tmp, timestamp_ct, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m07500_a0-pure.cl b/OpenCL/m07500_a0-pure.cl index 3e9e3ea05..c557d3481 100644 --- a/OpenCL/m07500_a0-pure.cl +++ b/OpenCL/m07500_a0-pure.cl @@ -31,19 +31,19 @@ typedef struct krb5pa } krb5pa_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, PRIVATE_AS u32 *timestamp_ct, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out[4]; u8 j = 0; - j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out); + j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out, lid); if ((out[3] & 0xffff0000) != 0x30320000) return 0; - j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out); + j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out, lid); if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; @@ -61,7 +61,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) return 1; } -DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *K, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -219,7 +219,7 @@ KERNEL_FQ void m07500_mxx (KERN_ATTR_RULES_ESALT (krb5pa_t)) kerb_prepare (ctx.h, checksum, digest); - if (decrypt_and_check (S, digest, timestamp_ct) == 1) + if (decrypt_and_check (S, digest, timestamp_ct, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -288,7 +288,7 @@ KERNEL_FQ void m07500_sxx (KERN_ATTR_RULES_ESALT (krb5pa_t)) kerb_prepare (ctx.h, checksum, digest); - if (decrypt_and_check (S, digest, timestamp_ct) == 1) + if (decrypt_and_check (S, digest, timestamp_ct, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m07500_a1-optimized.cl b/OpenCL/m07500_a1-optimized.cl index 12654a985..a726d09d2 100644 --- a/OpenCL/m07500_a1-optimized.cl +++ b/OpenCL/m07500_a1-optimized.cl @@ -30,19 +30,19 @@ typedef struct krb5pa } krb5pa_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, PRIVATE_AS u32 *timestamp_ct, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out[4]; u8 j = 0; - j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out); + j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out, lid); if ((out[3] & 0xffff0000) != 0x30320000) return 0; - j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out); + j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out, lid); if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; @@ -60,7 +60,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) return 1; } -DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -111,7 +111,7 @@ DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad, PRIVATE_AS u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -145,7 +145,7 @@ DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, const u32 pw_len, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest) { /** * pads @@ -410,7 +410,7 @@ KERNEL_FQ void m07500_m04 (KERN_ATTR_ESALT (krb5pa_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, timestamp_ct) == 1) + if (decrypt_and_check (S, tmp, timestamp_ct, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -564,7 +564,7 @@ KERNEL_FQ void m07500_s04 (KERN_ATTR_ESALT (krb5pa_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, timestamp_ct) == 1) + if (decrypt_and_check (S, tmp, timestamp_ct, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m07500_a1-pure.cl b/OpenCL/m07500_a1-pure.cl index feea11d25..6906988ca 100644 --- a/OpenCL/m07500_a1-pure.cl +++ b/OpenCL/m07500_a1-pure.cl @@ -29,19 +29,19 @@ typedef struct krb5pa } krb5pa_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, PRIVATE_AS u32 *timestamp_ct, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out[4]; u8 j = 0; - j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out); + j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out, lid); if ((out[3] & 0xffff0000) != 0x30320000) return 0; - j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out); + j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out, lid); if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; @@ -59,7 +59,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) return 1; } -DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *K, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -215,7 +215,7 @@ KERNEL_FQ void m07500_mxx (KERN_ATTR_ESALT (krb5pa_t)) kerb_prepare (ctx.h, checksum, digest); - if (decrypt_and_check (S, digest, timestamp_ct) == 1) + if (decrypt_and_check (S, digest, timestamp_ct, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -282,7 +282,7 @@ KERNEL_FQ void m07500_sxx (KERN_ATTR_ESALT (krb5pa_t)) kerb_prepare (ctx.h, checksum, digest); - if (decrypt_and_check (S, digest, timestamp_ct) == 1) + if (decrypt_and_check (S, digest, timestamp_ct, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m07500_a3-optimized.cl b/OpenCL/m07500_a3-optimized.cl index 9aec21dce..c784cb372 100644 --- a/OpenCL/m07500_a3-optimized.cl +++ b/OpenCL/m07500_a3-optimized.cl @@ -30,19 +30,19 @@ typedef struct krb5pa } krb5pa_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, PRIVATE_AS u32 *timestamp_ct, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out[4]; u8 j = 0; - j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out); + j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out, lid); if ((out[3] & 0xffff0000) != 0x30320000) return 0; - j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out); + j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out, lid); if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; @@ -60,7 +60,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) return 1; } -DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -111,7 +111,7 @@ DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad, PRIVATE_AS u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -145,7 +145,7 @@ DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, const u32 pw_len, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest) { /** * pads @@ -274,15 +274,12 @@ DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, cons hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest); } -DECLSPEC void m07500 (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (krb5pa_t)) +DECLSPEC void m07500 (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (krb5pa_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -354,7 +351,7 @@ DECLSPEC void m07500 (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, timestamp_ct) == 1) + if (decrypt_and_check (S, tmp, timestamp_ct, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -370,8 +367,9 @@ KERNEL_FQ void m07500_m04 (KERN_ATTR_ESALT (krb5pa_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -411,7 +409,7 @@ KERNEL_FQ void m07500_m04 (KERN_ATTR_ESALT (krb5pa_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m07500 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07500 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07500_m08 (KERN_ATTR_ESALT (krb5pa_t)) @@ -420,8 +418,9 @@ KERNEL_FQ void m07500_m08 (KERN_ATTR_ESALT (krb5pa_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -461,7 +460,7 @@ KERNEL_FQ void m07500_m08 (KERN_ATTR_ESALT (krb5pa_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m07500 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07500 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07500_m16 (KERN_ATTR_ESALT (krb5pa_t)) @@ -474,8 +473,9 @@ KERNEL_FQ void m07500_s04 (KERN_ATTR_ESALT (krb5pa_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -515,7 +515,7 @@ KERNEL_FQ void m07500_s04 (KERN_ATTR_ESALT (krb5pa_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m07500 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07500 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07500_s08 (KERN_ATTR_ESALT (krb5pa_t)) @@ -524,8 +524,9 @@ KERNEL_FQ void m07500_s08 (KERN_ATTR_ESALT (krb5pa_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -565,7 +566,7 @@ KERNEL_FQ void m07500_s08 (KERN_ATTR_ESALT (krb5pa_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m07500 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07500 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07500_s16 (KERN_ATTR_ESALT (krb5pa_t)) diff --git a/OpenCL/m07500_a3-pure.cl b/OpenCL/m07500_a3-pure.cl index f9055ed37..283615cdd 100644 --- a/OpenCL/m07500_a3-pure.cl +++ b/OpenCL/m07500_a3-pure.cl @@ -29,19 +29,19 @@ typedef struct krb5pa } krb5pa_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, PRIVATE_AS u32 *timestamp_ct, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out[4]; u8 j = 0; - j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out); + j = rc4_next_16 (S, 0, j, timestamp_ct + 0, out, lid); if ((out[3] & 0xffff0000) != 0x30320000) return 0; - j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out); + j = rc4_next_16 (S, 16, j, timestamp_ct + 4, out, lid); if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; if (((out[0] & 0xff) < '0') || ((out[0] & 0xff) > '9')) return 0; out[0] >>= 8; @@ -59,7 +59,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, u32 *timestamp_ct) return 1; } -DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *K, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -240,7 +240,7 @@ KERNEL_FQ void m07500_mxx (KERN_ATTR_VECTOR_ESALT (krb5pa_t)) kerb_prepare (ctx.h, checksum, digest); - if (decrypt_and_check (S, digest, timestamp_ct) == 1) + if (decrypt_and_check (S, digest, timestamp_ct, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -332,7 +332,7 @@ KERNEL_FQ void m07500_sxx (KERN_ATTR_VECTOR_ESALT (krb5pa_t)) kerb_prepare (ctx.h, checksum, digest); - if (decrypt_and_check (S, digest, timestamp_ct) == 1) + if (decrypt_and_check (S, digest, timestamp_ct, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m07700_a0-optimized.cl b/OpenCL/m07700_a0-optimized.cl index a92413865..565d6fa9b 100644 --- a/OpenCL/m07700_a0-optimized.cl +++ b/OpenCL/m07700_a0-optimized.cl @@ -27,8 +27,8 @@ #else */ -#define GETCHAR(a,p) ((u8 *)(a))[(p)] -#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) +#define GETCHAR(a,p) ((PRIVATE_AS u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((PRIVATE_AS u8 *)(a))[(p)] = (u8) (c) #define SETSHIFTEDINT(a,n,v) \ { \ @@ -79,7 +79,7 @@ DECLSPEC u32 sapb_trans (const u32 in) return out; } -DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (PRIVATE_AS const u32 *w0, const u32 pw_len, PRIVATE_AS const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, PRIVATE_AS u32 *t) { t[ 0] = 0; t[ 1] = 0; diff --git a/OpenCL/m07700_a1-optimized.cl b/OpenCL/m07700_a1-optimized.cl index 296710b97..5f7108be6 100644 --- a/OpenCL/m07700_a1-optimized.cl +++ b/OpenCL/m07700_a1-optimized.cl @@ -18,8 +18,8 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -#define GETCHAR(a,p) ((u8 *)(a))[(p)] -#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) +#define GETCHAR(a,p) ((PRIVATE_AS u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((PRIVATE_AS u8 *)(a))[(p)] = (u8) (c) #define SETSHIFTEDINT(a,n,v) \ { \ @@ -70,7 +70,7 @@ DECLSPEC u32 sapb_trans (const u32 in) return out; } -DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (PRIVATE_AS const u32 *w0, const u32 pw_len, PRIVATE_AS const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, PRIVATE_AS u32 *t) { t[ 0] = 0; t[ 1] = 0; diff --git a/OpenCL/m07700_a3-optimized.cl b/OpenCL/m07700_a3-optimized.cl index c59b8cbc6..2c3e9e641 100644 --- a/OpenCL/m07700_a3-optimized.cl +++ b/OpenCL/m07700_a3-optimized.cl @@ -18,8 +18,8 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -#define GETCHAR(a,p) ((u8 *)(a))[(p)] -#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) +#define GETCHAR(a,p) ((PRIVATE_AS u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((PRIVATE_AS u8 *)(a))[(p)] = (u8) (c) CONSTANT_VK u32a sapb_trans_tbl[256] = { @@ -61,7 +61,7 @@ DECLSPEC u32 sapb_trans (const u32 in) return out; } -DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (PRIVATE_AS const u32 *w0, const u32 pw_len, PRIVATE_AS const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, PRIVATE_AS u32 *t) { t[ 0] = 0; t[ 1] = 0; @@ -140,15 +140,12 @@ DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_bu return sum20; } -DECLSPEC void m07700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07700m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - w0[0] = sapb_trans (w0[0]); w0[1] = sapb_trans (w0[1]); @@ -265,15 +262,12 @@ DECLSPEC void m07700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m07700s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07700s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - w0[0] = sapb_trans (w0[0]); w0[1] = sapb_trans (w0[1]); @@ -408,7 +402,9 @@ KERNEL_FQ void m07700_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -416,8 +412,6 @@ KERNEL_FQ void m07700_m04 (KERN_ATTR_BASIC ()) * modifier */ - //const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -452,7 +446,7 @@ KERNEL_FQ void m07700_m04 (KERN_ATTR_BASIC ()) * main */ - m07700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07700_m08 (KERN_ATTR_BASIC ()) @@ -461,7 +455,9 @@ KERNEL_FQ void m07700_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -469,8 +465,6 @@ KERNEL_FQ void m07700_m08 (KERN_ATTR_BASIC ()) * modifier */ - //const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -505,7 +499,7 @@ KERNEL_FQ void m07700_m08 (KERN_ATTR_BASIC ()) * main */ - m07700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07700_m16 (KERN_ATTR_BASIC ()) @@ -518,7 +512,9 @@ KERNEL_FQ void m07700_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -526,8 +522,6 @@ KERNEL_FQ void m07700_s04 (KERN_ATTR_BASIC ()) * modifier */ - //const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -562,7 +556,7 @@ KERNEL_FQ void m07700_s04 (KERN_ATTR_BASIC ()) * main */ - m07700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07700_s08 (KERN_ATTR_BASIC ()) @@ -571,7 +565,9 @@ KERNEL_FQ void m07700_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -579,8 +575,6 @@ KERNEL_FQ void m07700_s08 (KERN_ATTR_BASIC ()) * modifier */ - //const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -615,7 +609,7 @@ KERNEL_FQ void m07700_s08 (KERN_ATTR_BASIC ()) * main */ - m07700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07700_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m07701_a0-optimized.cl b/OpenCL/m07701_a0-optimized.cl index b12a214f8..5e5b0c8c2 100644 --- a/OpenCL/m07701_a0-optimized.cl +++ b/OpenCL/m07701_a0-optimized.cl @@ -20,8 +20,8 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -#define GETCHAR(a,p) ((u8 *)(a))[(p)] -#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) +#define GETCHAR(a,p) ((PRIVATE_AS u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((PRIVATE_AS u8 *)(a))[(p)] = (u8) (c) #define SETSHIFTEDINT(a,n,v) \ { \ @@ -72,7 +72,7 @@ DECLSPEC u32 sapb_trans (const u32 in) return out; } -DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (PRIVATE_AS const u32 *w0, const u32 pw_len, PRIVATE_AS const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, PRIVATE_AS u32 *t) { t[ 0] = 0; t[ 1] = 0; diff --git a/OpenCL/m07701_a1-optimized.cl b/OpenCL/m07701_a1-optimized.cl index 4ef4472a6..4dd684adc 100644 --- a/OpenCL/m07701_a1-optimized.cl +++ b/OpenCL/m07701_a1-optimized.cl @@ -18,8 +18,8 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -#define GETCHAR(a,p) ((u8 *)(a))[(p)] -#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) +#define GETCHAR(a,p) ((PRIVATE_AS u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((PRIVATE_AS u8 *)(a))[(p)] = (u8) (c) #define SETSHIFTEDINT(a,n,v) \ { \ @@ -70,7 +70,7 @@ DECLSPEC u32 sapb_trans (const u32 in) return out; } -DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (PRIVATE_AS const u32 *w0, const u32 pw_len, PRIVATE_AS const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, PRIVATE_AS u32 *t) { t[ 0] = 0; t[ 1] = 0; diff --git a/OpenCL/m07701_a3-optimized.cl b/OpenCL/m07701_a3-optimized.cl index c9e75e32d..84d13d4ee 100644 --- a/OpenCL/m07701_a3-optimized.cl +++ b/OpenCL/m07701_a3-optimized.cl @@ -18,8 +18,8 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -#define GETCHAR(a,p) ((u8 *)(a))[(p)] -#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) +#define GETCHAR(a,p) ((PRIVATE_AS u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((PRIVATE_AS u8 *)(a))[(p)] = (u8) (c) CONSTANT_VK u32a sapb_trans_tbl[256] = { @@ -61,7 +61,7 @@ DECLSPEC u32 sapb_trans (const u32 in) return out; } -DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (PRIVATE_AS const u32 *w0, const u32 pw_len, PRIVATE_AS const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, PRIVATE_AS u32 *t) { t[ 0] = 0; t[ 1] = 0; @@ -140,15 +140,12 @@ DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_bu return sum20; } -DECLSPEC void m07701m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07701m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - w0[0] = sapb_trans (w0[0]); w0[1] = sapb_trans (w0[1]); @@ -265,15 +262,12 @@ DECLSPEC void m07701m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m07701s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07701s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - w0[0] = sapb_trans (w0[0]); w0[1] = sapb_trans (w0[1]); @@ -408,7 +402,9 @@ KERNEL_FQ void m07701_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -416,8 +412,6 @@ KERNEL_FQ void m07701_m04 (KERN_ATTR_BASIC ()) * modifier */ - //const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -452,7 +446,7 @@ KERNEL_FQ void m07701_m04 (KERN_ATTR_BASIC ()) * main */ - m07701m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07701m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07701_m08 (KERN_ATTR_BASIC ()) @@ -461,7 +455,9 @@ KERNEL_FQ void m07701_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -469,8 +465,6 @@ KERNEL_FQ void m07701_m08 (KERN_ATTR_BASIC ()) * modifier */ - //const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -505,7 +499,7 @@ KERNEL_FQ void m07701_m08 (KERN_ATTR_BASIC ()) * main */ - m07701m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07701m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07701_m16 (KERN_ATTR_BASIC ()) @@ -518,7 +512,9 @@ KERNEL_FQ void m07701_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -526,8 +522,6 @@ KERNEL_FQ void m07701_s04 (KERN_ATTR_BASIC ()) * modifier */ - //const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -562,7 +556,7 @@ KERNEL_FQ void m07701_s04 (KERN_ATTR_BASIC ()) * main */ - m07701s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07701s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07701_s08 (KERN_ATTR_BASIC ()) @@ -571,7 +565,9 @@ KERNEL_FQ void m07701_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -579,8 +575,6 @@ KERNEL_FQ void m07701_s08 (KERN_ATTR_BASIC ()) * modifier */ - //const u64 lid = get_local_id (0); - u32 w0[4]; w0[0] = pws[gid].i[ 0]; @@ -615,7 +609,7 @@ KERNEL_FQ void m07701_s08 (KERN_ATTR_BASIC ()) * main */ - m07701s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07701s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07701_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m07800_a0-optimized.cl b/OpenCL/m07800_a0-optimized.cl index cd9fb441f..b62386367 100644 --- a/OpenCL/m07800_a0-optimized.cl +++ b/OpenCL/m07800_a0-optimized.cl @@ -44,7 +44,7 @@ DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (PRIVATE_AS u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; diff --git a/OpenCL/m07800_a1-optimized.cl b/OpenCL/m07800_a1-optimized.cl index e713c08bc..f3fb9a4d9 100644 --- a/OpenCL/m07800_a1-optimized.cl +++ b/OpenCL/m07800_a1-optimized.cl @@ -42,7 +42,7 @@ DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (PRIVATE_AS u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; diff --git a/OpenCL/m07800_a3-optimized.cl b/OpenCL/m07800_a3-optimized.cl index 453c9b779..f6addcc18 100644 --- a/OpenCL/m07800_a3-optimized.cl +++ b/OpenCL/m07800_a3-optimized.cl @@ -42,7 +42,7 @@ DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (PRIVATE_AS u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; @@ -55,15 +55,12 @@ DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) a[d + 1] = l32_from_64_S (tmp); } -DECLSPEC void m07800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07800m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -275,15 +272,12 @@ DECLSPEC void m07800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m07800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07800s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -513,7 +507,9 @@ KERNEL_FQ void m07800_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -557,7 +553,7 @@ KERNEL_FQ void m07800_m04 (KERN_ATTR_BASIC ()) * main */ - m07800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07800_m08 (KERN_ATTR_BASIC ()) @@ -566,7 +562,9 @@ KERNEL_FQ void m07800_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -610,7 +608,7 @@ KERNEL_FQ void m07800_m08 (KERN_ATTR_BASIC ()) * main */ - m07800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07800_m16 (KERN_ATTR_BASIC ()) @@ -623,7 +621,9 @@ KERNEL_FQ void m07800_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -667,7 +667,7 @@ KERNEL_FQ void m07800_s04 (KERN_ATTR_BASIC ()) * main */ - m07800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07800_s08 (KERN_ATTR_BASIC ()) @@ -676,7 +676,9 @@ KERNEL_FQ void m07800_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -720,7 +722,7 @@ KERNEL_FQ void m07800_s08 (KERN_ATTR_BASIC ()) * main */ - m07800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07800_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m07801_a0-optimized.cl b/OpenCL/m07801_a0-optimized.cl index 39a0784ec..8eb81d67a 100644 --- a/OpenCL/m07801_a0-optimized.cl +++ b/OpenCL/m07801_a0-optimized.cl @@ -44,7 +44,7 @@ DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (PRIVATE_AS u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; diff --git a/OpenCL/m07801_a1-optimized.cl b/OpenCL/m07801_a1-optimized.cl index 19111a135..85866af0d 100644 --- a/OpenCL/m07801_a1-optimized.cl +++ b/OpenCL/m07801_a1-optimized.cl @@ -42,7 +42,7 @@ DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (PRIVATE_AS u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; diff --git a/OpenCL/m07801_a3-optimized.cl b/OpenCL/m07801_a3-optimized.cl index 7085d2fc2..aa3223b3a 100644 --- a/OpenCL/m07801_a3-optimized.cl +++ b/OpenCL/m07801_a3-optimized.cl @@ -42,7 +42,7 @@ DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (PRIVATE_AS u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; @@ -55,15 +55,12 @@ DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) a[d + 1] = l32_from_64_S (tmp); } -DECLSPEC void m07801m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07801m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -275,15 +272,12 @@ DECLSPEC void m07801m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m07801s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07801s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -513,7 +507,9 @@ KERNEL_FQ void m07801_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -557,7 +553,7 @@ KERNEL_FQ void m07801_m04 (KERN_ATTR_BASIC ()) * main */ - m07801m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07801m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07801_m08 (KERN_ATTR_BASIC ()) @@ -566,7 +562,9 @@ KERNEL_FQ void m07801_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -610,7 +608,7 @@ KERNEL_FQ void m07801_m08 (KERN_ATTR_BASIC ()) * main */ - m07801m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07801m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07801_m16 (KERN_ATTR_BASIC ()) @@ -623,7 +621,9 @@ KERNEL_FQ void m07801_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -667,7 +667,7 @@ KERNEL_FQ void m07801_s04 (KERN_ATTR_BASIC ()) * main */ - m07801s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07801s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07801_s08 (KERN_ATTR_BASIC ()) @@ -676,7 +676,9 @@ KERNEL_FQ void m07801_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -720,7 +722,7 @@ KERNEL_FQ void m07801_s08 (KERN_ATTR_BASIC ()) * main */ - m07801s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m07801s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m07801_s16 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m08000_a0-optimized.cl b/OpenCL/m08000_a0-optimized.cl index a54f79e4a..e0df036d9 100644 --- a/OpenCL/m08000_a0-optimized.cl +++ b/OpenCL/m08000_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha256.cl) #endif -DECLSPEC void sha256_transform_m (u32x *digest, const u32x *w) +DECLSPEC void sha256_transform_m (PRIVATE_AS u32x *digest, PRIVATE_AS const u32x *w) { u32x a = digest[0]; u32x b = digest[1]; @@ -113,7 +113,7 @@ DECLSPEC void sha256_transform_m (u32x *digest, const u32x *w) digest[7] += h; } -DECLSPEC void sha256_transform_z (u32x *digest) +DECLSPEC void sha256_transform_z (PRIVATE_AS u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -170,7 +170,7 @@ DECLSPEC void sha256_transform_z (u32x *digest) digest[7] += h; } -DECLSPEC void sha256_transform_s (u32x *digest, LOCAL_AS u32 *w) +DECLSPEC void sha256_transform_s (PRIVATE_AS u32x *digest, LOCAL_AS u32 *w) { u32x a = digest[0]; u32x b = digest[1]; diff --git a/OpenCL/m08000_a1-optimized.cl b/OpenCL/m08000_a1-optimized.cl index 6c187f4a7..f37307ea5 100644 --- a/OpenCL/m08000_a1-optimized.cl +++ b/OpenCL/m08000_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha256.cl) #endif -DECLSPEC void sha256_transform_m (u32x *digest, const u32x *w) +DECLSPEC void sha256_transform_m (PRIVATE_AS u32x *digest, PRIVATE_AS const u32x *w) { u32x a = digest[0]; u32x b = digest[1]; @@ -111,7 +111,7 @@ DECLSPEC void sha256_transform_m (u32x *digest, const u32x *w) digest[7] += h; } -DECLSPEC void sha256_transform_z (u32x *digest) +DECLSPEC void sha256_transform_z (PRIVATE_AS u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -168,7 +168,7 @@ DECLSPEC void sha256_transform_z (u32x *digest) digest[7] += h; } -DECLSPEC void sha256_transform_s (u32x *digest, LOCAL_AS u32 *w) +DECLSPEC void sha256_transform_s (PRIVATE_AS u32x *digest, LOCAL_AS u32 *w) { u32x a = digest[0]; u32x b = digest[1]; diff --git a/OpenCL/m08000_a3-optimized.cl b/OpenCL/m08000_a3-optimized.cl index 90895c48b..e21fdb87a 100644 --- a/OpenCL/m08000_a3-optimized.cl +++ b/OpenCL/m08000_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha256.cl) #endif -DECLSPEC void sha256_transform_m (u32x *digest, const u32x *w) +DECLSPEC void sha256_transform_m (PRIVATE_AS u32x *digest, PRIVATE_AS const u32x *w) { u32x a = digest[0]; u32x b = digest[1]; @@ -111,7 +111,7 @@ DECLSPEC void sha256_transform_m (u32x *digest, const u32x *w) digest[7] += h; } -DECLSPEC void sha256_transform_z (u32x *digest) +DECLSPEC void sha256_transform_z (PRIVATE_AS u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -168,7 +168,7 @@ DECLSPEC void sha256_transform_z (u32x *digest) digest[7] += h; } -DECLSPEC void sha256_transform_s (u32x *digest, LOCAL_AS u32 *w) +DECLSPEC void sha256_transform_s (PRIVATE_AS u32x *digest, LOCAL_AS u32 *w) { u32x a = digest[0]; u32x b = digest[1]; @@ -219,16 +219,12 @@ DECLSPEC void sha256_transform_s (u32x *digest, LOCAL_AS u32 *w) digest[7] += h; } -DECLSPEC void m08000m (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08000m (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** * salt */ @@ -341,16 +337,12 @@ DECLSPEC void m08000m (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, u32 *w, const u32 } } -DECLSPEC void m08000s (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08000s (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** * salt */ @@ -481,7 +473,9 @@ KERNEL_FQ void m08000_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -511,7 +505,7 @@ KERNEL_FQ void m08000_m04 (KERN_ATTR_VECTOR ()) * main */ - m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08000_m08 (KERN_ATTR_VECTOR ()) @@ -520,7 +514,9 @@ KERNEL_FQ void m08000_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -550,7 +546,7 @@ KERNEL_FQ void m08000_m08 (KERN_ATTR_VECTOR ()) * main */ - m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08000_m16 (KERN_ATTR_VECTOR ()) @@ -559,7 +555,9 @@ KERNEL_FQ void m08000_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -589,7 +587,7 @@ KERNEL_FQ void m08000_m16 (KERN_ATTR_VECTOR ()) * main */ - m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08000_s04 (KERN_ATTR_VECTOR ()) @@ -598,7 +596,9 @@ KERNEL_FQ void m08000_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -628,7 +628,7 @@ KERNEL_FQ void m08000_s04 (KERN_ATTR_VECTOR ()) * main */ - m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08000_s08 (KERN_ATTR_VECTOR ()) @@ -637,7 +637,9 @@ KERNEL_FQ void m08000_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -667,7 +669,7 @@ KERNEL_FQ void m08000_s08 (KERN_ATTR_VECTOR ()) * main */ - m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08000_s16 (KERN_ATTR_VECTOR ()) @@ -676,7 +678,9 @@ KERNEL_FQ void m08000_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); u32 w[16]; @@ -706,5 +710,5 @@ KERNEL_FQ void m08000_s16 (KERN_ATTR_VECTOR ()) * main */ - m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m08100_a3-optimized.cl b/OpenCL/m08100_a3-optimized.cl index 8d7b4e331..fe069c87a 100644 --- a/OpenCL/m08100_a3-optimized.cl +++ b/OpenCL/m08100_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m08100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m08100m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -178,15 +175,12 @@ DECLSPEC void m08100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m08100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m08100s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -366,7 +360,9 @@ KERNEL_FQ void m08100_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -421,7 +417,7 @@ KERNEL_FQ void m08100_m04 (KERN_ATTR_BASIC ()) * main */ - m08100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08100_m08 (KERN_ATTR_BASIC ()) @@ -430,7 +426,9 @@ KERNEL_FQ void m08100_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -493,7 +491,7 @@ KERNEL_FQ void m08100_m08 (KERN_ATTR_BASIC ()) * main */ - m08100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08100_m16 (KERN_ATTR_BASIC ()) @@ -502,7 +500,9 @@ KERNEL_FQ void m08100_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -580,7 +580,7 @@ KERNEL_FQ void m08100_m16 (KERN_ATTR_BASIC ()) * main */ - m08100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08100_s04 (KERN_ATTR_BASIC ()) @@ -589,7 +589,9 @@ KERNEL_FQ void m08100_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -644,7 +646,7 @@ KERNEL_FQ void m08100_s04 (KERN_ATTR_BASIC ()) * main */ - m08100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08100_s08 (KERN_ATTR_BASIC ()) @@ -653,7 +655,9 @@ KERNEL_FQ void m08100_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -716,7 +720,7 @@ KERNEL_FQ void m08100_s08 (KERN_ATTR_BASIC ()) * main */ - m08100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08100_s16 (KERN_ATTR_BASIC ()) @@ -725,7 +729,9 @@ KERNEL_FQ void m08100_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -803,5 +809,5 @@ KERNEL_FQ void m08100_s16 (KERN_ATTR_BASIC ()) * main */ - m08100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m08200-pure.cl b/OpenCL/m08200-pure.cl index 55dad5d33..64d449c3c 100644 --- a/OpenCL/m08200-pure.cl +++ b/OpenCL/m08200-pure.cl @@ -38,7 +38,7 @@ typedef struct cloudkey } cloudkey_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m08300_a0-optimized.cl b/OpenCL/m08300_a0-optimized.cl index bcb9aac6c..a7a716359 100644 --- a/OpenCL/m08300_a0-optimized.cl +++ b/OpenCL/m08300_a0-optimized.cl @@ -49,7 +49,7 @@ DECLSPEC u32 u64_to_u32 (const u64 in) return out; } -DECLSPEC int replace_u32_le (const u32 input, u32 *output, int cur_len) +DECLSPEC int replace_u32_le (const u32 input, PRIVATE_AS u32 *output, int cur_len) { // expand to keep 9th bit consistent @@ -90,7 +90,7 @@ DECLSPEC int replace_u32_le (const u32 input, u32 *output, int cur_len) return cur_len; } -DECLSPEC u32 replace_dot_by_len (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len) +DECLSPEC u32 replace_dot_by_len (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len) { // loop over w3...w0 (4 * 16 = 64 bytes): diff --git a/OpenCL/m08300_a1-optimized.cl b/OpenCL/m08300_a1-optimized.cl index cfd82b550..7f0341c6e 100644 --- a/OpenCL/m08300_a1-optimized.cl +++ b/OpenCL/m08300_a1-optimized.cl @@ -47,7 +47,7 @@ DECLSPEC u32 u64_to_u32 (const u64 in) return out; } -DECLSPEC int replace_u32_le (const u32 input, u32 *output, int cur_len) +DECLSPEC int replace_u32_le (const u32 input, PRIVATE_AS u32 *output, int cur_len) { // expand to keep 9th bit consistent @@ -88,7 +88,7 @@ DECLSPEC int replace_u32_le (const u32 input, u32 *output, int cur_len) return cur_len; } -DECLSPEC u32 replace_dot_by_len (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len) +DECLSPEC u32 replace_dot_by_len (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len) { // loop over w3...w0 (4 * 16 = 64 bytes): diff --git a/OpenCL/m08300_a1-pure.cl b/OpenCL/m08300_a1-pure.cl index e197c758a..e17b3723d 100644 --- a/OpenCL/m08300_a1-pure.cl +++ b/OpenCL/m08300_a1-pure.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC const u32 replace_dot_by_len (pw_t *out, GLOBAL_AS const pw_t *in, const u32 old_len) +DECLSPEC const u32 replace_dot_by_len (PRIVATE_AS pw_t *out, GLOBAL_AS const pw_t *in, const u32 old_len) { // first make out a copy of in: diff --git a/OpenCL/m08300_a3-optimized.cl b/OpenCL/m08300_a3-optimized.cl index ed58a98b8..a0ce6a0dc 100644 --- a/OpenCL/m08300_a3-optimized.cl +++ b/OpenCL/m08300_a3-optimized.cl @@ -47,7 +47,7 @@ DECLSPEC u32 u64_to_u32 (const u64 in) return out; } -DECLSPEC int replace_u32_be (const u32 input, u32 *output, int cur_len) +DECLSPEC int replace_u32_be (const u32 input, PRIVATE_AS u32 *output, int cur_len) { // expand to keep 9th bit consistent @@ -87,7 +87,7 @@ DECLSPEC int replace_u32_be (const u32 input, u32 *output, int cur_len) return cur_len; } -DECLSPEC u32 replace_dot_by_len (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len) +DECLSPEC u32 replace_dot_by_len (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len) { // loop over w3...w0 (4 * 16 = 64 bytes): @@ -170,15 +170,12 @@ DECLSPEC u32 replace_dot_by_len (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 p w3_t[3].s##n = tmp3[3]; \ } -DECLSPEC void m08300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m08300m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -409,15 +406,12 @@ DECLSPEC void m08300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m08300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m08300s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -666,7 +660,9 @@ KERNEL_FQ void m08300_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -704,7 +700,7 @@ KERNEL_FQ void m08300_m04 (KERN_ATTR_BASIC ()) * main */ - m08300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08300_m08 (KERN_ATTR_BASIC ()) @@ -713,7 +709,9 @@ KERNEL_FQ void m08300_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -751,7 +749,7 @@ KERNEL_FQ void m08300_m08 (KERN_ATTR_BASIC ()) * main */ - m08300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08300_m16 (KERN_ATTR_BASIC ()) @@ -760,7 +758,9 @@ KERNEL_FQ void m08300_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -798,7 +798,7 @@ KERNEL_FQ void m08300_m16 (KERN_ATTR_BASIC ()) * main */ - m08300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08300_s04 (KERN_ATTR_BASIC ()) @@ -807,7 +807,9 @@ KERNEL_FQ void m08300_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -845,7 +847,7 @@ KERNEL_FQ void m08300_s04 (KERN_ATTR_BASIC ()) * main */ - m08300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08300_s08 (KERN_ATTR_BASIC ()) @@ -854,7 +856,9 @@ KERNEL_FQ void m08300_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -892,7 +896,7 @@ KERNEL_FQ void m08300_s08 (KERN_ATTR_BASIC ()) * main */ - m08300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08300_s16 (KERN_ATTR_BASIC ()) @@ -901,7 +905,9 @@ KERNEL_FQ void m08300_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -939,5 +945,5 @@ KERNEL_FQ void m08300_s16 (KERN_ATTR_BASIC ()) * main */ - m08300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m08400_a3-optimized.cl b/OpenCL/m08400_a3-optimized.cl index b2b4b1969..30f263efd 100644 --- a/OpenCL/m08400_a3-optimized.cl +++ b/OpenCL/m08400_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8_le(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m08400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m08400m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -239,15 +236,12 @@ DECLSPEC void m08400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m08400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m08400s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -467,8 +461,8 @@ KERNEL_FQ void m08400_m04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -528,7 +522,7 @@ KERNEL_FQ void m08400_m04 (KERN_ATTR_BASIC ()) * main */ - m08400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m08400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m08400_m08 (KERN_ATTR_BASIC ()) @@ -537,8 +531,8 @@ KERNEL_FQ void m08400_m08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -598,7 +592,7 @@ KERNEL_FQ void m08400_m08 (KERN_ATTR_BASIC ()) * main */ - m08400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m08400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m08400_m16 (KERN_ATTR_BASIC ()) @@ -607,8 +601,8 @@ KERNEL_FQ void m08400_m16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -668,7 +662,7 @@ KERNEL_FQ void m08400_m16 (KERN_ATTR_BASIC ()) * main */ - m08400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m08400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m08400_s04 (KERN_ATTR_BASIC ()) @@ -677,8 +671,8 @@ KERNEL_FQ void m08400_s04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -738,7 +732,7 @@ KERNEL_FQ void m08400_s04 (KERN_ATTR_BASIC ()) * main */ - m08400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m08400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m08400_s08 (KERN_ATTR_BASIC ()) @@ -747,8 +741,8 @@ KERNEL_FQ void m08400_s08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -808,7 +802,7 @@ KERNEL_FQ void m08400_s08 (KERN_ATTR_BASIC ()) * main */ - m08400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m08400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m08400_s16 (KERN_ATTR_BASIC ()) @@ -817,8 +811,8 @@ KERNEL_FQ void m08400_s16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -878,5 +872,5 @@ KERNEL_FQ void m08400_s16 (KERN_ATTR_BASIC ()) * main */ - m08400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m08400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m08500_a0-pure.cl b/OpenCL/m08500_a0-pure.cl index c03fed4a9..d1ce062af 100644 --- a/OpenCL/m08500_a0-pure.cl +++ b/OpenCL/m08500_a0-pure.cl @@ -398,7 +398,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX1(i,S) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32x *data, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -440,7 +440,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL iv[1] = r; } -DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -512,7 +512,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u } } -DECLSPEC void transform_racf_key (const u32 w0, const u32x w1, u32x *key) +DECLSPEC void transform_racf_key (const u32 w0, const u32x w1, PRIVATE_AS u32x *key) { key[0] = BOX1 (((w0 >> 0) & 0xff), c_ascii_to_ebcdic_pc) << 0 | BOX1 (((w0 >> 8) & 0xff), c_ascii_to_ebcdic_pc) << 8 diff --git a/OpenCL/m08500_a1-pure.cl b/OpenCL/m08500_a1-pure.cl index 96059da58..ae90219d2 100644 --- a/OpenCL/m08500_a1-pure.cl +++ b/OpenCL/m08500_a1-pure.cl @@ -396,7 +396,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX1(i,S) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32x *data, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -438,7 +438,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL iv[1] = r; } -DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -510,7 +510,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u } } -DECLSPEC void transform_racf_key (const u32 w0, const u32x w1, u32x *key) +DECLSPEC void transform_racf_key (const u32 w0, const u32x w1, PRIVATE_AS u32x *key) { key[0] = BOX1 (((w0 >> 0) & 0xff), c_ascii_to_ebcdic_pc) << 0 | BOX1 (((w0 >> 8) & 0xff), c_ascii_to_ebcdic_pc) << 8 diff --git a/OpenCL/m08500_a3-pure.cl b/OpenCL/m08500_a3-pure.cl index 9bbd90bab..da569e1d7 100644 --- a/OpenCL/m08500_a3-pure.cl +++ b/OpenCL/m08500_a3-pure.cl @@ -396,7 +396,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX1(i,S) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32x *iv, PRIVATE_AS u32x *data, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32x r = data[0]; u32x l = data[1]; @@ -438,7 +438,7 @@ DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCA iv[1] = r; } -DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32x tt; @@ -510,7 +510,7 @@ DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS } } -DECLSPEC void transform_racf_key (const u32x w0, const u32x w1, u32x *key) +DECLSPEC void transform_racf_key (const u32x w0, const u32x w1, PRIVATE_AS u32x *key) { key[0] = BOX1 (((w0 >> 0) & 0xff), c_ascii_to_ebcdic_pc) << 0 | BOX1 (((w0 >> 8) & 0xff), c_ascii_to_ebcdic_pc) << 8 @@ -523,15 +523,12 @@ DECLSPEC void transform_racf_key (const u32x w0, const u32x w1, u32x *key) | BOX1 (((w1 >> 24) & 0xff), c_ascii_to_ebcdic_pc) << 24; } -DECLSPEC void m08500m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08500m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -586,15 +583,12 @@ DECLSPEC void m08500m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], } } -DECLSPEC void m08500s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08500s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -667,8 +661,8 @@ KERNEL_FQ void m08500_mxx (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -732,7 +726,7 @@ KERNEL_FQ void m08500_mxx (KERN_ATTR_VECTOR ()) * main */ - m08500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08500m (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08500_sxx (KERN_ATTR_VECTOR ()) @@ -741,8 +735,8 @@ KERNEL_FQ void m08500_sxx (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -806,5 +800,5 @@ KERNEL_FQ void m08500_sxx (KERN_ATTR_VECTOR ()) * main */ - m08500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08500s (s_SPtrans, s_skb, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m08600_a0-pure.cl b/OpenCL/m08600_a0-pure.cl index 35b0157bd..fa9941499 100644 --- a/OpenCL/m08600_a0-pure.cl +++ b/OpenCL/m08600_a0-pure.cl @@ -102,7 +102,7 @@ CONSTANT_VK u32a lotus_magic_table[512] = #define BOX1(S,i) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void lotus_mix (u32 *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (PRIVATE_AS u32 *in, LOCAL_AS u32 *s_lotus_magic_table) { u32 p = 0; @@ -125,7 +125,7 @@ DECLSPEC void lotus_mix (u32 *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC void lotus_transform_password (const u32 *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (PRIVATE_AS const u32 *in, PRIVATE_AS u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32 t = out[3] >> 24; @@ -143,7 +143,7 @@ DECLSPEC void lotus_transform_password (const u32 *in, u32x *out, LOCAL_AS u32 * } } -DECLSPEC void pad (u32 *w, const u32 len) +DECLSPEC void pad (PRIVATE_AS u32 *w, const u32 len) { const u32 val = 16 - len; @@ -222,7 +222,7 @@ DECLSPEC void pad (u32 *w, const u32 len) } } -DECLSPEC void mdtransform_norecalc (u32 *state, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (PRIVATE_AS u32 *state, PRIVATE_AS const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32 x[12]; @@ -247,14 +247,14 @@ DECLSPEC void mdtransform_norecalc (u32 *state, const u32x *block, LOCAL_AS u32 state[3] = x[3]; } -DECLSPEC void mdtransform (u32 *state, u32x *checksum, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (PRIVATE_AS u32 *state, PRIVATE_AS u32x *checksum, PRIVATE_AS const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC void domino_big_md (const u32 *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (PRIVATE_AS const u32 *saved_key, const u32 size, PRIVATE_AS u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32 checksum[4]; diff --git a/OpenCL/m08600_a1-pure.cl b/OpenCL/m08600_a1-pure.cl index bc1e8c20b..a2313d010 100644 --- a/OpenCL/m08600_a1-pure.cl +++ b/OpenCL/m08600_a1-pure.cl @@ -100,7 +100,7 @@ CONSTANT_VK u32a lotus_magic_table[512] = #define BOX1(S,i) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void lotus_mix (u32 *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (PRIVATE_AS u32 *in, LOCAL_AS u32 *s_lotus_magic_table) { u32 p = 0; @@ -123,7 +123,7 @@ DECLSPEC void lotus_mix (u32 *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC void lotus_transform_password (const u32 *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (PRIVATE_AS const u32 *in, PRIVATE_AS u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32 t = out[3] >> 24; @@ -141,7 +141,7 @@ DECLSPEC void lotus_transform_password (const u32 *in, u32x *out, LOCAL_AS u32 * } } -DECLSPEC void pad (u32 *w, const u32 len) +DECLSPEC void pad (PRIVATE_AS u32 *w, const u32 len) { const u32 val = 16 - len; @@ -220,7 +220,7 @@ DECLSPEC void pad (u32 *w, const u32 len) } } -DECLSPEC void mdtransform_norecalc (u32 *state, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (PRIVATE_AS u32 *state, PRIVATE_AS const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32 x[12]; @@ -245,14 +245,14 @@ DECLSPEC void mdtransform_norecalc (u32 *state, const u32x *block, LOCAL_AS u32 state[3] = x[3]; } -DECLSPEC void mdtransform (u32 *state, u32x *checksum, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (PRIVATE_AS u32 *state, PRIVATE_AS u32x *checksum, PRIVATE_AS const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC void domino_big_md (const u32 *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (PRIVATE_AS const u32 *saved_key, const u32 size, PRIVATE_AS u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32 checksum[4]; diff --git a/OpenCL/m08600_a3-pure.cl b/OpenCL/m08600_a3-pure.cl index 0fbe47e25..e88ccfd97 100644 --- a/OpenCL/m08600_a3-pure.cl +++ b/OpenCL/m08600_a3-pure.cl @@ -99,7 +99,7 @@ CONSTANT_VK u32a lotus_magic_table[512] = #define BOX1(S,i) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (PRIVATE_AS u32x *in, LOCAL_AS u32 *s_lotus_magic_table) { u32x p = 0; @@ -122,7 +122,7 @@ DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC void lotus_transform_password (const u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32x t = out[3] >> 24; @@ -140,7 +140,7 @@ DECLSPEC void lotus_transform_password (const u32x *in, u32x *out, LOCAL_AS u32 } } -DECLSPEC void pad (u32 *w, const u32 len) +DECLSPEC void pad (PRIVATE_AS u32 *w, const u32 len) { const u32 val = 16 - len; @@ -219,7 +219,7 @@ DECLSPEC void pad (u32 *w, const u32 len) } } -DECLSPEC void mdtransform_norecalc (u32x *state, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (PRIVATE_AS u32x *state, PRIVATE_AS const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32x x[12]; @@ -244,14 +244,14 @@ DECLSPEC void mdtransform_norecalc (u32x *state, const u32x *block, LOCAL_AS u32 state[3] = x[3]; } -DECLSPEC void mdtransform (u32x *state, u32x *checksum, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (PRIVATE_AS u32x *state, PRIVATE_AS u32x *checksum, PRIVATE_AS const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (PRIVATE_AS const u32x *saved_key, const u32 size, PRIVATE_AS u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32x checksum[4]; @@ -265,15 +265,12 @@ DECLSPEC void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, mdtransform_norecalc (state, checksum, s_lotus_magic_table); } -DECLSPEC void m08600m (LOCAL_AS u32 *s_lotus_magic_table, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08600m (LOCAL_AS u32 *s_lotus_magic_table, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -312,15 +309,12 @@ DECLSPEC void m08600m (LOCAL_AS u32 *s_lotus_magic_table, u32 *w, const u32 pw_l } } -DECLSPEC void m08600s (LOCAL_AS u32 *s_lotus_magic_table, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08600s (LOCAL_AS u32 *s_lotus_magic_table, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -377,8 +371,8 @@ KERNEL_FQ void m08600_mxx (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -425,7 +419,7 @@ KERNEL_FQ void m08600_mxx (KERN_ATTR_VECTOR ()) * main */ - m08600m (s_lotus_magic_table, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08600m (s_lotus_magic_table, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08600_sxx (KERN_ATTR_VECTOR ()) @@ -434,8 +428,8 @@ KERNEL_FQ void m08600_sxx (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -482,5 +476,5 @@ KERNEL_FQ void m08600_sxx (KERN_ATTR_VECTOR ()) * main */ - m08600s (s_lotus_magic_table, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08600s (s_lotus_magic_table, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m08700_a0-optimized.cl b/OpenCL/m08700_a0-optimized.cl index ba77aff9f..8b7e78937 100644 --- a/OpenCL/m08700_a0-optimized.cl +++ b/OpenCL/m08700_a0-optimized.cl @@ -114,7 +114,7 @@ CONSTANT_VK u32a lotus_magic_table[512] = #define BOX1(S,i) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (PRIVATE_AS u32x *in, LOCAL_AS u32 *s_lotus_magic_table) { u32x p = 0; @@ -137,7 +137,7 @@ DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC void lotus_transform_password (const u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32x t = out[3] >> 24; @@ -155,7 +155,7 @@ DECLSPEC void lotus_transform_password (const u32x *in, u32x *out, LOCAL_AS u32 } } -DECLSPEC void pad (u32 *w, const u32 len) +DECLSPEC void pad (PRIVATE_AS u32 *w, const u32 len) { const u32 val = 16 - len; @@ -234,7 +234,7 @@ DECLSPEC void pad (u32 *w, const u32 len) } } -DECLSPEC void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (PRIVATE_AS u32x *state, PRIVATE_AS u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32x x[12]; @@ -259,14 +259,14 @@ DECLSPEC void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lo state[3] = x[3]; } -DECLSPEC void mdtransform (u32x *state, u32x *checksum, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (PRIVATE_AS u32x *state, PRIVATE_AS u32x *checksum, PRIVATE_AS u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (PRIVATE_AS const u32x *saved_key, const u32 size, PRIVATE_AS u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32x checksum[4]; diff --git a/OpenCL/m08700_a1-optimized.cl b/OpenCL/m08700_a1-optimized.cl index 19ef6c47f..e3671371c 100644 --- a/OpenCL/m08700_a1-optimized.cl +++ b/OpenCL/m08700_a1-optimized.cl @@ -112,7 +112,7 @@ CONSTANT_VK u32a lotus_magic_table[512] = #define BOX1(S,i) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (PRIVATE_AS u32x *in, LOCAL_AS u32 *s_lotus_magic_table) { u32x p = 0; @@ -135,7 +135,7 @@ DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC void lotus_transform_password (const u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32x t = out[3] >> 24; @@ -153,7 +153,7 @@ DECLSPEC void lotus_transform_password (const u32x *in, u32x *out, LOCAL_AS u32 } } -DECLSPEC void pad (u32 *w, const u32 len) +DECLSPEC void pad (PRIVATE_AS u32 *w, const u32 len) { const u32 val = 16 - len; @@ -232,7 +232,7 @@ DECLSPEC void pad (u32 *w, const u32 len) } } -DECLSPEC void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (PRIVATE_AS u32x *state, PRIVATE_AS u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32x x[12]; @@ -257,14 +257,14 @@ DECLSPEC void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lo state[3] = x[3]; } -DECLSPEC void mdtransform (u32x *state, u32x *checksum, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (PRIVATE_AS u32x *state, PRIVATE_AS u32x *checksum, PRIVATE_AS u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (PRIVATE_AS const u32x *saved_key, const u32 size, PRIVATE_AS u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32x checksum[4]; diff --git a/OpenCL/m08700_a3-optimized.cl b/OpenCL/m08700_a3-optimized.cl index 778bc9ef3..6db900762 100644 --- a/OpenCL/m08700_a3-optimized.cl +++ b/OpenCL/m08700_a3-optimized.cl @@ -113,7 +113,7 @@ CONSTANT_VK u32a lotus_magic_table[512] = #define BOX1(S,i) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (PRIVATE_AS u32x *in, LOCAL_AS u32 *s_lotus_magic_table) { u32x p = 0; @@ -136,7 +136,7 @@ DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC void lotus_transform_password (const u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32x t = out[3] >> 24; @@ -154,7 +154,7 @@ DECLSPEC void lotus_transform_password (const u32x *in, u32x *out, LOCAL_AS u32 } } -DECLSPEC void pad (u32 *w, const u32 len) +DECLSPEC void pad (PRIVATE_AS u32 *w, const u32 len) { const u32 val = 16 - len; @@ -233,7 +233,7 @@ DECLSPEC void pad (u32 *w, const u32 len) } } -DECLSPEC void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (PRIVATE_AS u32x *state, PRIVATE_AS u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32x x[12]; @@ -258,14 +258,14 @@ DECLSPEC void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lo state[3] = x[3]; } -DECLSPEC void mdtransform (u32x *state, u32x *checksum, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (PRIVATE_AS u32x *state, PRIVATE_AS u32x *checksum, PRIVATE_AS u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (PRIVATE_AS const u32x *saved_key, const u32 size, PRIVATE_AS u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32x checksum[4]; @@ -304,15 +304,12 @@ DECLSPEC void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, mdtransform_norecalc (state, checksum, s_lotus_magic_table); } -DECLSPEC void m08700m (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2asc, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08700m (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2asc, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -437,15 +434,12 @@ DECLSPEC void m08700m (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2as } } -DECLSPEC void m08700s (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2asc, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08700s (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2asc, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -647,7 +641,7 @@ KERNEL_FQ void m08700_m04 (KERN_ATTR_VECTOR ()) * main */ - m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08700_m08 (KERN_ATTR_VECTOR ()) @@ -656,8 +650,8 @@ KERNEL_FQ void m08700_m08 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -715,7 +709,7 @@ KERNEL_FQ void m08700_m08 (KERN_ATTR_VECTOR ()) * main */ - m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08700_m16 (KERN_ATTR_VECTOR ()) @@ -724,8 +718,8 @@ KERNEL_FQ void m08700_m16 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -783,7 +777,7 @@ KERNEL_FQ void m08700_m16 (KERN_ATTR_VECTOR ()) * main */ - m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08700m (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08700_s04 (KERN_ATTR_VECTOR ()) @@ -792,8 +786,8 @@ KERNEL_FQ void m08700_s04 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -851,7 +845,7 @@ KERNEL_FQ void m08700_s04 (KERN_ATTR_VECTOR ()) * main */ - m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08700_s08 (KERN_ATTR_VECTOR ()) @@ -860,8 +854,8 @@ KERNEL_FQ void m08700_s08 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -919,7 +913,7 @@ KERNEL_FQ void m08700_s08 (KERN_ATTR_VECTOR ()) * main */ - m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m08700_s16 (KERN_ATTR_VECTOR ()) @@ -928,8 +922,8 @@ KERNEL_FQ void m08700_s16 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -987,5 +981,5 @@ KERNEL_FQ void m08700_s16 (KERN_ATTR_VECTOR ()) * main */ - m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m08700s (s_lotus_magic_table, l_bin2asc, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m08800-pure.cl b/OpenCL/m08800-pure.cl index 920b95de8..716967f6c 100644 --- a/OpenCL/m08800-pure.cl +++ b/OpenCL/m08800-pure.cl @@ -35,7 +35,7 @@ typedef struct androidfde } androidfde_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m08900-pure.cl b/OpenCL/m08900-pure.cl index a27cde573..0dd34d32d 100644 --- a/OpenCL/m08900-pure.cl +++ b/OpenCL/m08900-pure.cl @@ -82,6 +82,27 @@ DECLSPEC uint4 hc_swap32_4 (uint4 v) X2 = make_uint4 (X2.z, X2.w, X2.x, X2.y); \ X3 = make_uint4 (X3.w, X3.x, X3.y, X3.z); \ } +#elif defined IS_METAL +#define SALSA20_2R() \ +{ \ + ADD_ROTATE_XOR (X1, X0, X3, 7); \ + ADD_ROTATE_XOR (X2, X1, X0, 9); \ + ADD_ROTATE_XOR (X3, X2, X1, 13); \ + ADD_ROTATE_XOR (X0, X3, X2, 18); \ + \ + X1 = X1.wxyz; \ + X2 = X2.zwxy; \ + X3 = X3.yzwx; \ + \ + ADD_ROTATE_XOR (X3, X0, X1, 7); \ + ADD_ROTATE_XOR (X2, X3, X0, 9); \ + ADD_ROTATE_XOR (X1, X2, X3, 13); \ + ADD_ROTATE_XOR (X0, X1, X2, 18); \ + \ + X1 = X1.yzwx; \ + X2 = X2.zwxy; \ + X3 = X3.wxyz; \ +} #else #define SALSA20_2R() \ { \ @@ -108,7 +129,7 @@ DECLSPEC uint4 hc_swap32_4 (uint4 v) #define Coord(xd4,y,z) (((xd4) * ySIZE * zSIZE) + ((y) * zSIZE) + (z)) #define CO Coord(xd4,y,z) -DECLSPEC void salsa_r (uint4 *TI) +DECLSPEC void salsa_r (PRIVATE_AS uint4 *TI) { uint4 R0 = TI[STATE_CNT4 - 4]; uint4 R1 = TI[STATE_CNT4 - 3]; @@ -179,12 +200,12 @@ DECLSPEC void salsa_r (uint4 *TI) #endif } -DECLSPEC void scrypt_smix_init (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix_init (PRIVATE_AS uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3, const u64 gid) { const u32 ySIZE = SCRYPT_N / SCRYPT_TMTO; const u32 zSIZE = STATE_CNT4; - const u32 x = get_global_id (0); + const u32 x = (u32) gid; const u32 xd4 = x / 4; const u32 xm4 = x & 3; @@ -207,12 +228,12 @@ DECLSPEC void scrypt_smix_init (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 * } } -DECLSPEC void scrypt_smix_loop (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix_loop (PRIVATE_AS uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3, const u64 gid) { const u32 ySIZE = SCRYPT_N / SCRYPT_TMTO; const u32 zSIZE = STATE_CNT4; - const u32 x = get_global_id (0); + const u32 x = (u32) gid; const u32 xd4 = x / 4; const u32 xm4 = x & 3; @@ -379,7 +400,7 @@ KERNEL_FQ void m08900_loop_prepare (KERN_ATTR_TMPS (scrypt_tmp_t)) for (int z = 0; z < STATE_CNT4; z++) X[z] = P[z]; - scrypt_smix_init (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf); + scrypt_smix_init (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf, gid); for (int z = 0; z < STATE_CNT4; z++) P[z] = X[z]; } @@ -404,7 +425,7 @@ KERNEL_FQ void m08900_loop (KERN_ATTR_TMPS (scrypt_tmp_t)) for (int z = 0; z < STATE_CNT4; z++) X[z] = P[z]; - scrypt_smix_loop (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf); + scrypt_smix_loop (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf, gid); for (int z = 0; z < STATE_CNT4; z++) P[z] = X[z]; } diff --git a/OpenCL/m09100-pure.cl b/OpenCL/m09100-pure.cl index 8bb98ecf6..d22b4b9d5 100644 --- a/OpenCL/m09100-pure.cl +++ b/OpenCL/m09100-pure.cl @@ -118,7 +118,7 @@ CONSTANT_VK u32a lotus_magic_table[256] = #define BOX1(S,i) (S)[(i)] -DECLSPEC void lotus_mix (u32 *in, SHM_TYPE const u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (PRIVATE_AS u32 *in, SHM_TYPE const u32 *s_lotus_magic_table) { u8 p = 0; @@ -141,7 +141,7 @@ DECLSPEC void lotus_mix (u32 *in, SHM_TYPE const u32 *s_lotus_magic_table) } } -DECLSPEC void lotus_transform_password (const u32 *in, u32 *out, SHM_TYPE const u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE const u32 *s_lotus_magic_table) { u8 t = (u8) (out[3] >> 24); @@ -159,7 +159,7 @@ DECLSPEC void lotus_transform_password (const u32 *in, u32 *out, SHM_TYPE const } } -DECLSPEC void pad (u32 *w, const u32 len) +DECLSPEC void pad (PRIVATE_AS u32 *w, const u32 len) { const u32 val = 16 - len; @@ -238,7 +238,7 @@ DECLSPEC void pad (u32 *w, const u32 len) } } -DECLSPEC void mdtransform_norecalc (u32 *state, const u32 *block, SHM_TYPE const u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (PRIVATE_AS u32 *state, PRIVATE_AS const u32 *block, SHM_TYPE const u32 *s_lotus_magic_table) { u32 x[12]; @@ -263,14 +263,14 @@ DECLSPEC void mdtransform_norecalc (u32 *state, const u32 *block, SHM_TYPE const state[3] = x[3]; } -DECLSPEC void mdtransform (u32 *state, u32 *checksum, const u32 *block, SHM_TYPE const u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (PRIVATE_AS u32 *state, PRIVATE_AS u32 *checksum, PRIVATE_AS const u32 *block, SHM_TYPE const u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC void domino_big_md (const u32 *saved_key, const u32 size, u32 *state, SHM_TYPE const u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (PRIVATE_AS const u32 *saved_key, const u32 size, PRIVATE_AS u32 *state, SHM_TYPE const u32 *s_lotus_magic_table) { u32 checksum[4]; @@ -309,10 +309,10 @@ DECLSPEC void domino_big_md (const u32 *saved_key, const u32 size, u32 *state, S mdtransform_norecalc (state, checksum, s_lotus_magic_table); } -DECLSPEC void base64_encode (u8 *base64_hash, const u32 len, const u8 *base64_plain) +DECLSPEC void base64_encode (PRIVATE_AS u8 *base64_hash, const u32 len, PRIVATE_AS const u8 *base64_plain) { - u8 *out_ptr = (u8 *) base64_hash; - u8 *in_ptr = (u8 *) base64_plain; + PRIVATE_AS u8 *out_ptr = (PRIVATE_AS u8 *) base64_hash; + PRIVATE_AS u8 *in_ptr = (PRIVATE_AS u8 *) base64_plain; u32 i; @@ -333,7 +333,7 @@ DECLSPEC void base64_encode (u8 *base64_hash, const u32 len, const u8 *base64_pl } } -DECLSPEC void lotus6_base64_encode (u8 *base64_hash, const u32 salt0, const u32 salt1, const u32 a, const u32 b, const u32 c) +DECLSPEC void lotus6_base64_encode (PRIVATE_AS u8 *base64_hash, const u32 salt0, const u32 salt1, const u32 a, const u32 b, const u32 c) { u8 tmp[24]; // size 22 (=pw_len) is needed but base64 needs size divisible by 4 @@ -391,7 +391,7 @@ DECLSPEC void lotus6_base64_encode (u8 *base64_hash, const u32 salt0, const u32 base64_hash[21] = ')'; } -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m09700_a0-optimized.cl b/OpenCL/m09700_a0-optimized.cl index e5cd4409e..95649db31 100644 --- a/OpenCL/m09700_a0-optimized.cl +++ b/OpenCL/m09700_a0-optimized.cl @@ -30,7 +30,7 @@ typedef struct oldoffice01 } oldoffice01_t; -DECLSPEC void gen336 (u32 *digest_pre, u32 *salt_buf, u32 *digest) +DECLSPEC void gen336 (PRIVATE_AS u32 *digest_pre, PRIVATE_AS u32 *salt_buf, PRIVATE_AS u32 *digest) { u32 digest_t0[2]; u32 digest_t1[2]; @@ -515,11 +515,11 @@ KERNEL_FQ void m09700_m04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) key[2] = digest[2]; key[3] = digest[3]; - rc4_init_128 (S, key); + rc4_init_128 (S, key, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = out[0]; w0[1] = out[1]; @@ -545,7 +545,7 @@ KERNEL_FQ void m09700_m04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) md5_transform (w0, w1, w2, w3, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } @@ -712,11 +712,11 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) key[2] = digest[2]; key[3] = digest[3]; - rc4_init_128 (S, key); + rc4_init_128 (S, key, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = out[0]; w0[1] = out[1]; @@ -742,7 +742,7 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) md5_transform (w0, w1, w2, w3, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } diff --git a/OpenCL/m09700_a1-optimized.cl b/OpenCL/m09700_a1-optimized.cl index 5a52b6eeb..91f2783b1 100644 --- a/OpenCL/m09700_a1-optimized.cl +++ b/OpenCL/m09700_a1-optimized.cl @@ -28,7 +28,7 @@ typedef struct oldoffice01 } oldoffice01_t; -DECLSPEC void gen336 (u32 *digest_pre, u32 *salt_buf, u32 *digest) +DECLSPEC void gen336 (PRIVATE_AS u32 *digest_pre, PRIVATE_AS u32 *salt_buf, PRIVATE_AS u32 *digest) { u32 digest_t0[2]; u32 digest_t1[2]; @@ -571,11 +571,11 @@ KERNEL_FQ void m09700_m04 (KERN_ATTR_ESALT (oldoffice01_t)) key[2] = digest[2]; key[3] = digest[3]; - rc4_init_128 (S, key); + rc4_init_128 (S, key, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = out[0]; w0[1] = out[1]; @@ -601,7 +601,7 @@ KERNEL_FQ void m09700_m04 (KERN_ATTR_ESALT (oldoffice01_t)) md5_transform (w0, w1, w2, w3, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } @@ -826,11 +826,11 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_ESALT (oldoffice01_t)) key[2] = digest[2]; key[3] = digest[3]; - rc4_init_128 (S, key); + rc4_init_128 (S, key, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = out[0]; w0[1] = out[1]; @@ -856,7 +856,7 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_ESALT (oldoffice01_t)) md5_transform (w0, w1, w2, w3, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } diff --git a/OpenCL/m09700_a3-optimized.cl b/OpenCL/m09700_a3-optimized.cl index 0ebfca7ca..bc2f10090 100644 --- a/OpenCL/m09700_a3-optimized.cl +++ b/OpenCL/m09700_a3-optimized.cl @@ -25,15 +25,12 @@ typedef struct oldoffice01 } oldoffice01_t; -DECLSPEC void m09700m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09700m (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice01_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -389,11 +386,11 @@ DECLSPEC void m09700m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons // now the RC4 part - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0_t[0] = out[0]; w0_t[1] = out[1]; @@ -419,21 +416,18 @@ DECLSPEC void m09700m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons md5_transform (w0_t, w1_t, w2_t, w3_t, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } } -DECLSPEC void m09700s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09700s (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice01_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -801,11 +795,11 @@ DECLSPEC void m09700s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons // now the RC4 part - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0_t[0] = out[0]; w0_t[1] = out[1]; @@ -831,7 +825,7 @@ DECLSPEC void m09700s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons md5_transform (w0_t, w1_t, w2_t, w3_t, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } @@ -843,7 +837,9 @@ KERNEL_FQ void m09700_m04 (KERN_ATTR_ESALT (oldoffice01_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -883,7 +879,7 @@ KERNEL_FQ void m09700_m04 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09700m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09700m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09700_m08 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -892,7 +888,9 @@ KERNEL_FQ void m09700_m08 (KERN_ATTR_ESALT (oldoffice01_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -932,7 +930,7 @@ KERNEL_FQ void m09700_m08 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09700m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09700m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09700_m16 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -945,7 +943,9 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_ESALT (oldoffice01_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -985,7 +985,7 @@ KERNEL_FQ void m09700_s04 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09700s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09700s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09700_s08 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -994,7 +994,9 @@ KERNEL_FQ void m09700_s08 (KERN_ATTR_ESALT (oldoffice01_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -1034,7 +1036,7 @@ KERNEL_FQ void m09700_s08 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09700s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09700s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09700_s16 (KERN_ATTR_ESALT (oldoffice01_t)) diff --git a/OpenCL/m09710_a0-optimized.cl b/OpenCL/m09710_a0-optimized.cl index 547498681..abd3406cf 100644 --- a/OpenCL/m09710_a0-optimized.cl +++ b/OpenCL/m09710_a0-optimized.cl @@ -122,11 +122,11 @@ KERNEL_FQ void m09710_m04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) // now the RC4 part - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = out[0]; w0[1] = out[1]; @@ -152,7 +152,7 @@ KERNEL_FQ void m09710_m04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) md5_transform (w0, w1, w2, w3, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } @@ -270,11 +270,11 @@ KERNEL_FQ void m09710_s04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) // now the RC4 part - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = out[0]; w0[1] = out[1]; @@ -300,7 +300,7 @@ KERNEL_FQ void m09710_s04 (KERN_ATTR_RULES_ESALT (oldoffice01_t)) md5_transform (w0, w1, w2, w3, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } diff --git a/OpenCL/m09710_a1-optimized.cl b/OpenCL/m09710_a1-optimized.cl index c3a7dcc8a..5f61dca88 100644 --- a/OpenCL/m09710_a1-optimized.cl +++ b/OpenCL/m09710_a1-optimized.cl @@ -166,11 +166,11 @@ KERNEL_FQ void m09710_m04 (KERN_ATTR_ESALT (oldoffice01_t)) // now the RC4 part - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = out[0]; w0[1] = out[1]; @@ -196,7 +196,7 @@ KERNEL_FQ void m09710_m04 (KERN_ATTR_ESALT (oldoffice01_t)) md5_transform (w0, w1, w2, w3, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } @@ -360,11 +360,11 @@ KERNEL_FQ void m09710_s04 (KERN_ATTR_ESALT (oldoffice01_t)) // now the RC4 part - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = out[0]; w0[1] = out[1]; @@ -390,7 +390,7 @@ KERNEL_FQ void m09710_s04 (KERN_ATTR_ESALT (oldoffice01_t)) md5_transform (w0, w1, w2, w3, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } diff --git a/OpenCL/m09710_a3-optimized.cl b/OpenCL/m09710_a3-optimized.cl index 1c6d190be..f0d45b3e8 100644 --- a/OpenCL/m09710_a3-optimized.cl +++ b/OpenCL/m09710_a3-optimized.cl @@ -28,15 +28,12 @@ typedef struct oldoffice01 } oldoffice01_t; -DECLSPEC void m09710m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09710m (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice01_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * esalt */ @@ -95,11 +92,11 @@ DECLSPEC void m09710m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons // now the RC4 part - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0_t[0] = out[0]; w0_t[1] = out[1]; @@ -125,21 +122,18 @@ DECLSPEC void m09710m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons md5_transform (w0_t, w1_t, w2_t, w3_t, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } } -DECLSPEC void m09710s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09710s (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice01_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * esalt */ @@ -210,11 +204,11 @@ DECLSPEC void m09710s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons // now the RC4 part - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0_t[0] = out[0]; w0_t[1] = out[1]; @@ -240,7 +234,7 @@ DECLSPEC void m09710s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons md5_transform (w0_t, w1_t, w2_t, w3_t, digest); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } @@ -252,7 +246,9 @@ KERNEL_FQ void m09710_m04 (KERN_ATTR_ESALT (oldoffice01_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -292,7 +288,7 @@ KERNEL_FQ void m09710_m04 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09710m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09710m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09710_m08 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -309,7 +305,9 @@ KERNEL_FQ void m09710_s04 (KERN_ATTR_ESALT (oldoffice01_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -349,7 +347,7 @@ KERNEL_FQ void m09710_s04 (KERN_ATTR_ESALT (oldoffice01_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09710s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09710s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09710_s08 (KERN_ATTR_ESALT (oldoffice01_t)) diff --git a/OpenCL/m09720_a0-optimized.cl b/OpenCL/m09720_a0-optimized.cl index d29e06d3b..930b71ec7 100644 --- a/OpenCL/m09720_a0-optimized.cl +++ b/OpenCL/m09720_a0-optimized.cl @@ -28,7 +28,7 @@ typedef struct oldoffice01 } oldoffice01_t; -DECLSPEC void gen336 (u32x *digest_pre, u32 *salt_buf, u32x *digest) +DECLSPEC void gen336 (PRIVATE_AS u32x *digest_pre, PRIVATE_AS u32 *salt_buf, PRIVATE_AS u32x *digest) { u32x digest_t0[2]; u32x digest_t1[2]; diff --git a/OpenCL/m09720_a1-optimized.cl b/OpenCL/m09720_a1-optimized.cl index 5fa8e0fad..60614c070 100644 --- a/OpenCL/m09720_a1-optimized.cl +++ b/OpenCL/m09720_a1-optimized.cl @@ -26,7 +26,7 @@ typedef struct oldoffice01 } oldoffice01_t; -DECLSPEC void gen336 (u32x *digest_pre, u32 *salt_buf, u32x *digest) +DECLSPEC void gen336 (PRIVATE_AS u32x *digest_pre, PRIVATE_AS u32 *salt_buf, PRIVATE_AS u32x *digest) { u32x digest_t0[2]; u32x digest_t1[2]; diff --git a/OpenCL/m09720_a3-optimized.cl b/OpenCL/m09720_a3-optimized.cl index d9a70d44a..b0fa13c3b 100644 --- a/OpenCL/m09720_a3-optimized.cl +++ b/OpenCL/m09720_a3-optimized.cl @@ -26,7 +26,7 @@ typedef struct oldoffice01 } oldoffice01_t; -DECLSPEC void gen336 (u32x *digest_pre, u32 *salt_buf, u32x *digest) +DECLSPEC void gen336 (PRIVATE_AS u32x *digest_pre, PRIVATE_AS u32 *salt_buf, PRIVATE_AS u32x *digest) { u32x digest_t0[2]; u32x digest_t1[2]; @@ -370,15 +370,12 @@ DECLSPEC void gen336 (u32x *digest_pre, u32 *salt_buf, u32x *digest) md5_transform_vector (w0_t, w1_t, w2_t, w3_t, digest); } -DECLSPEC void m09720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09720m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice01_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -460,15 +457,12 @@ DECLSPEC void m09720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m09720s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09720s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice01_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -568,7 +562,9 @@ KERNEL_FQ void m09720_m04 (KERN_ATTR_ESALT (oldoffice01_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -606,7 +602,7 @@ KERNEL_FQ void m09720_m04 (KERN_ATTR_ESALT (oldoffice01_t)) * main */ - m09720m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09720m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09720_m08 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -615,7 +611,9 @@ KERNEL_FQ void m09720_m08 (KERN_ATTR_ESALT (oldoffice01_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -653,7 +651,7 @@ KERNEL_FQ void m09720_m08 (KERN_ATTR_ESALT (oldoffice01_t)) * main */ - m09720m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09720m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09720_m16 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -666,7 +664,9 @@ KERNEL_FQ void m09720_s04 (KERN_ATTR_ESALT (oldoffice01_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -704,7 +704,7 @@ KERNEL_FQ void m09720_s04 (KERN_ATTR_ESALT (oldoffice01_t)) * main */ - m09720s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09720s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09720_s08 (KERN_ATTR_ESALT (oldoffice01_t)) @@ -713,7 +713,9 @@ KERNEL_FQ void m09720_s08 (KERN_ATTR_ESALT (oldoffice01_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -751,7 +753,7 @@ KERNEL_FQ void m09720_s08 (KERN_ATTR_ESALT (oldoffice01_t)) * main */ - m09720s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09720s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09720_s16 (KERN_ATTR_ESALT (oldoffice01_t)) diff --git a/OpenCL/m09800_a0-optimized.cl b/OpenCL/m09800_a0-optimized.cl index f64f199f9..c0f64af0e 100644 --- a/OpenCL/m09800_a0-optimized.cl +++ b/OpenCL/m09800_a0-optimized.cl @@ -184,11 +184,11 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) digest[3] = 0; } - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = hc_swap32 (out[0]); w0[1] = hc_swap32 (out[1]); @@ -220,7 +220,7 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); // initial compare @@ -264,7 +264,7 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -273,7 +273,7 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[2]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[3]; - j = rc4_next_16 (S, 0, 0, secondBlockData, out); + j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -290,7 +290,7 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { @@ -482,11 +482,11 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) digest[3] = 0; } - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = hc_swap32 (out[0]); w0[1] = hc_swap32 (out[1]); @@ -518,7 +518,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); // initial compare @@ -563,7 +563,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -572,7 +572,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[2]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[3]; - j = rc4_next_16 (S, 0, 0, secondBlockData, out); + j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -589,7 +589,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { diff --git a/OpenCL/m09800_a1-optimized.cl b/OpenCL/m09800_a1-optimized.cl index a568e4621..2da3aeef9 100644 --- a/OpenCL/m09800_a1-optimized.cl +++ b/OpenCL/m09800_a1-optimized.cl @@ -232,11 +232,11 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) digest[3] = 0; } - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = hc_swap32 (out[0]); w0[1] = hc_swap32 (out[1]); @@ -268,7 +268,7 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); // initial compare @@ -312,7 +312,7 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -321,7 +321,7 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[2]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[3]; - j = rc4_next_16 (S, 0, 0, secondBlockData, out); + j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -338,7 +338,7 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { @@ -580,11 +580,11 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) digest[3] = 0; } - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = hc_swap32 (out[0]); w0[1] = hc_swap32 (out[1]); @@ -616,7 +616,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); // initial compare @@ -661,7 +661,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -670,7 +670,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[2]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[3]; - j = rc4_next_16 (S, 0, 0, secondBlockData, out); + j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -687,7 +687,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { diff --git a/OpenCL/m09800_a3-optimized.cl b/OpenCL/m09800_a3-optimized.cl index 76228619d..54a4fa8cd 100644 --- a/OpenCL/m09800_a3-optimized.cl +++ b/OpenCL/m09800_a3-optimized.cl @@ -29,15 +29,12 @@ typedef struct oldoffice34 } oldoffice34_t; -DECLSPEC void m09800m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09800m (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice34_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -151,11 +148,11 @@ DECLSPEC void m09800m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons digest[3] = 0; } - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0_t[0] = hc_swap32_S (out[0]); w0_t[1] = hc_swap32_S (out[1]); @@ -187,7 +184,7 @@ DECLSPEC void m09800m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); // initial compare @@ -231,7 +228,7 @@ DECLSPEC void m09800m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -240,7 +237,7 @@ DECLSPEC void m09800m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[2]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[3]; - j = rc4_next_16 (S, 0, 0, secondBlockData, out); + j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -257,7 +254,7 @@ DECLSPEC void m09800m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { @@ -279,15 +276,12 @@ DECLSPEC void m09800m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons } } -DECLSPEC void m09800s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09800s (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice34_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -413,11 +407,11 @@ DECLSPEC void m09800s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons digest[3] = 0; } - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0_t[0] = hc_swap32_S (out[0]); w0_t[1] = hc_swap32_S (out[1]); @@ -449,7 +443,7 @@ DECLSPEC void m09800s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); // initial compare @@ -494,7 +488,7 @@ DECLSPEC void m09800s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -503,7 +497,7 @@ DECLSPEC void m09800s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[2]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[3]; - j = rc4_next_16 (S, 0, 0, secondBlockData, out); + j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -520,7 +514,7 @@ DECLSPEC void m09800s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { @@ -546,7 +540,9 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -586,7 +582,7 @@ KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09800m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09800m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09800_m08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -595,7 +591,9 @@ KERNEL_FQ void m09800_m08 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -635,7 +633,7 @@ KERNEL_FQ void m09800_m08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09800m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09800m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09800_m16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -644,7 +642,9 @@ KERNEL_FQ void m09800_m16 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -684,7 +684,7 @@ KERNEL_FQ void m09800_m16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09800m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09800m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -693,7 +693,9 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -733,7 +735,7 @@ KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09800s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09800s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09800_s08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -742,7 +744,9 @@ KERNEL_FQ void m09800_s08 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -782,7 +786,7 @@ KERNEL_FQ void m09800_s08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09800s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09800s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09800_s16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -791,7 +795,9 @@ KERNEL_FQ void m09800_s16 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -831,5 +837,5 @@ KERNEL_FQ void m09800_s16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09800s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09800s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m09810_a0-optimized.cl b/OpenCL/m09810_a0-optimized.cl index 2e45fb8ad..c20f17e85 100644 --- a/OpenCL/m09810_a0-optimized.cl +++ b/OpenCL/m09810_a0-optimized.cl @@ -103,11 +103,11 @@ KERNEL_FQ void m09810_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) key[2] = 0; key[3] = 0; - rc4_init_128 (S, key); + rc4_init_128 (S, key, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = hc_swap32 (out[0]); w0[1] = hc_swap32 (out[1]); @@ -141,7 +141,7 @@ KERNEL_FQ void m09810_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } @@ -238,11 +238,11 @@ KERNEL_FQ void m09810_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) key[2] = 0; key[3] = 0; - rc4_init_128 (S, key); + rc4_init_128 (S, key, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = hc_swap32 (out[0]); w0[1] = hc_swap32 (out[1]); @@ -276,7 +276,7 @@ KERNEL_FQ void m09810_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } diff --git a/OpenCL/m09810_a1-optimized.cl b/OpenCL/m09810_a1-optimized.cl index 7cddc8a94..ff1d576de 100644 --- a/OpenCL/m09810_a1-optimized.cl +++ b/OpenCL/m09810_a1-optimized.cl @@ -147,11 +147,11 @@ KERNEL_FQ void m09810_m04 (KERN_ATTR_ESALT (oldoffice34_t)) key[2] = 0; key[3] = 0; - rc4_init_128 (S, key); + rc4_init_128 (S, key, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = hc_swap32 (out[0]); w0[1] = hc_swap32 (out[1]); @@ -185,7 +185,7 @@ KERNEL_FQ void m09810_m04 (KERN_ATTR_ESALT (oldoffice34_t)) digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } @@ -328,11 +328,11 @@ KERNEL_FQ void m09810_s04 (KERN_ATTR_ESALT (oldoffice34_t)) key[2] = 0; key[3] = 0; - rc4_init_128 (S, key); + rc4_init_128 (S, key, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); w0[0] = hc_swap32 (out[0]); w0[1] = hc_swap32 (out[1]); @@ -366,7 +366,7 @@ KERNEL_FQ void m09810_s04 (KERN_ATTR_ESALT (oldoffice34_t)) digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } diff --git a/OpenCL/m09810_a3-optimized.cl b/OpenCL/m09810_a3-optimized.cl index bbce74536..c7611aa8a 100644 --- a/OpenCL/m09810_a3-optimized.cl +++ b/OpenCL/m09810_a3-optimized.cl @@ -30,15 +30,12 @@ typedef struct oldoffice34 } oldoffice34_t; -DECLSPEC void m09810m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09810m (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice34_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * esalt */ @@ -69,11 +66,11 @@ DECLSPEC void m09810m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons key[2] = 0; key[3] = 0; - rc4_init_128 (S, key); + rc4_init_128 (S, key, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); u32 w0_t[4]; u32 w1_t[4]; @@ -112,21 +109,18 @@ DECLSPEC void m09810m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } } -DECLSPEC void m09810s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09810s (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice34_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * esalt */ @@ -169,11 +163,11 @@ DECLSPEC void m09810s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons key[2] = 0; key[3] = 0; - rc4_init_128 (S, key); + rc4_init_128 (S, key, lid); u32 out[4]; - u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out); + u8 j = rc4_next_16 (S, 0, 0, encryptedVerifier, out, lid); u32 w0_t[4]; u32 w1_t[4]; @@ -212,7 +206,7 @@ DECLSPEC void m09810s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons digest[2] = hc_swap32_S (digest[2]); digest[3] = hc_swap32_S (digest[3]); - rc4_next_16 (S, 16, j, digest, out); + rc4_next_16 (S, 16, j, digest, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } @@ -224,7 +218,9 @@ KERNEL_FQ void m09810_m04 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -264,7 +260,7 @@ KERNEL_FQ void m09810_m04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09810m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09810m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09810_m08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -273,7 +269,9 @@ KERNEL_FQ void m09810_m08 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -313,7 +311,7 @@ KERNEL_FQ void m09810_m08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09810m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09810m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09810_m16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -322,7 +320,9 @@ KERNEL_FQ void m09810_m16 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -362,7 +362,7 @@ KERNEL_FQ void m09810_m16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09810m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09810m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09810_s04 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -371,7 +371,9 @@ KERNEL_FQ void m09810_s04 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -411,7 +413,7 @@ KERNEL_FQ void m09810_s04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09810s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09810s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09810_s08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -420,7 +422,9 @@ KERNEL_FQ void m09810_s08 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -460,7 +464,7 @@ KERNEL_FQ void m09810_s08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09810s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09810s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09810_s16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -469,7 +473,9 @@ KERNEL_FQ void m09810_s16 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -509,5 +515,5 @@ KERNEL_FQ void m09810_s16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09810s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09810s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m09820_a0-optimized.cl b/OpenCL/m09820_a0-optimized.cl index b55e8c33d..72f6f76e4 100644 --- a/OpenCL/m09820_a0-optimized.cl +++ b/OpenCL/m09820_a0-optimized.cl @@ -206,7 +206,7 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -217,7 +217,7 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 out[4]; - u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out); + u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -234,7 +234,7 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { @@ -447,7 +447,7 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -458,7 +458,7 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) u32 out[4]; - u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out); + u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -475,7 +475,7 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_RULES_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { diff --git a/OpenCL/m09820_a1-optimized.cl b/OpenCL/m09820_a1-optimized.cl index 9ba995c95..f9ca9ca67 100644 --- a/OpenCL/m09820_a1-optimized.cl +++ b/OpenCL/m09820_a1-optimized.cl @@ -254,7 +254,7 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_ESALT (oldoffice34_t)) // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -265,7 +265,7 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 out[4]; - u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out); + u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -282,7 +282,7 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { @@ -545,7 +545,7 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -556,7 +556,7 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) u32 out[4]; - u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out); + u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -573,7 +573,7 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { diff --git a/OpenCL/m09820_a3-optimized.cl b/OpenCL/m09820_a3-optimized.cl index 1918567f0..30cce5704 100644 --- a/OpenCL/m09820_a3-optimized.cl +++ b/OpenCL/m09820_a3-optimized.cl @@ -32,15 +32,12 @@ typedef struct oldoffice34 } oldoffice34_t; -DECLSPEC void m09820m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09820m (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice34_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -174,7 +171,7 @@ DECLSPEC void m09820m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -185,7 +182,7 @@ DECLSPEC void m09820m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons u32 out[4]; - u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out); + u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -202,7 +199,7 @@ DECLSPEC void m09820m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { @@ -224,15 +221,12 @@ DECLSPEC void m09820m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons } } -DECLSPEC void m09820s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09820s (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (oldoffice34_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -377,7 +371,7 @@ DECLSPEC void m09820s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons // second block decrypt: - rc4_init_128 (S, digest); + rc4_init_128 (S, digest, lid); u32 secondBlockData[4]; @@ -388,7 +382,7 @@ DECLSPEC void m09820s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons u32 out[4]; - u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out); + u32 j = rc4_next_16 (S, 0, 0, secondBlockData, out, lid); int null_bytes = 0; @@ -405,7 +399,7 @@ DECLSPEC void m09820s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons secondBlockData[2] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[6]; secondBlockData[3] = esalt_bufs[DIGESTS_OFFSET_HOST].secondBlockData[7]; - rc4_next_16 (S, 16, j, secondBlockData, out); + rc4_next_16 (S, 16, j, secondBlockData, out, lid); for (int k = 0; k < 4; k++) { @@ -431,7 +425,9 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -471,7 +467,7 @@ KERNEL_FQ void m09820_m04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09820m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09820m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09820_m08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -480,7 +476,9 @@ KERNEL_FQ void m09820_m08 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -520,7 +518,7 @@ KERNEL_FQ void m09820_m08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09820m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09820m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09820_m16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -529,7 +527,9 @@ KERNEL_FQ void m09820_m16 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -569,7 +569,7 @@ KERNEL_FQ void m09820_m16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09820m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09820m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -578,7 +578,9 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -618,7 +620,7 @@ KERNEL_FQ void m09820_s04 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09820s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09820s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09820_s08 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -627,7 +629,9 @@ KERNEL_FQ void m09820_s08 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -667,7 +671,7 @@ KERNEL_FQ void m09820_s08 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09820s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09820s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09820_s16 (KERN_ATTR_ESALT (oldoffice34_t)) @@ -676,7 +680,9 @@ KERNEL_FQ void m09820_s16 (KERN_ATTR_ESALT (oldoffice34_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -716,5 +722,5 @@ KERNEL_FQ void m09820_s16 (KERN_ATTR_ESALT (oldoffice34_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m09820s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09820s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m09900_a3-optimized.cl b/OpenCL/m09900_a3-optimized.cl index 6c035699b..430a92cb5 100644 --- a/OpenCL/m09900_a3-optimized.cl +++ b/OpenCL/m09900_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void m09900m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m09900m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -298,15 +295,12 @@ DECLSPEC void m09900m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m09900s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m09900s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -600,7 +594,9 @@ KERNEL_FQ void m09900_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -629,7 +625,7 @@ KERNEL_FQ void m09900_m04 (KERN_ATTR_VECTOR ()) * main */ - m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09900_m08 (KERN_ATTR_VECTOR ()) @@ -638,7 +634,9 @@ KERNEL_FQ void m09900_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -667,7 +665,7 @@ KERNEL_FQ void m09900_m08 (KERN_ATTR_VECTOR ()) * main */ - m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09900_m16 (KERN_ATTR_VECTOR ()) @@ -676,7 +674,9 @@ KERNEL_FQ void m09900_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -705,7 +705,7 @@ KERNEL_FQ void m09900_m16 (KERN_ATTR_VECTOR ()) * main */ - m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09900m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09900_s04 (KERN_ATTR_VECTOR ()) @@ -714,7 +714,9 @@ KERNEL_FQ void m09900_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -743,7 +745,7 @@ KERNEL_FQ void m09900_s04 (KERN_ATTR_VECTOR ()) * main */ - m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09900_s08 (KERN_ATTR_VECTOR ()) @@ -752,7 +754,9 @@ KERNEL_FQ void m09900_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -781,7 +785,7 @@ KERNEL_FQ void m09900_s08 (KERN_ATTR_VECTOR ()) * main */ - m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m09900_s16 (KERN_ATTR_VECTOR ()) @@ -790,7 +794,9 @@ KERNEL_FQ void m09900_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -819,5 +825,5 @@ KERNEL_FQ void m09900_s16 (KERN_ATTR_VECTOR ()) * main */ - m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m09900s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m10100_a3-optimized.cl b/OpenCL/m10100_a3-optimized.cl index ea916893a..fc3e4d61f 100644 --- a/OpenCL/m10100_a3-optimized.cl +++ b/OpenCL/m10100_a3-optimized.cl @@ -32,15 +32,12 @@ (v1) ^= (v2); \ (v2) = hc_rotl64 ((v2), 32) -DECLSPEC void m10100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10100m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -126,15 +123,12 @@ DECLSPEC void m10100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m10100s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10100s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -238,7 +232,9 @@ KERNEL_FQ void m10100_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -267,7 +263,7 @@ KERNEL_FQ void m10100_m04 (KERN_ATTR_VECTOR ()) * main */ - m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10100_m08 (KERN_ATTR_VECTOR ()) @@ -276,7 +272,9 @@ KERNEL_FQ void m10100_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -305,7 +303,7 @@ KERNEL_FQ void m10100_m08 (KERN_ATTR_VECTOR ()) * main */ - m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10100_m16 (KERN_ATTR_VECTOR ()) @@ -314,7 +312,9 @@ KERNEL_FQ void m10100_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -343,7 +343,7 @@ KERNEL_FQ void m10100_m16 (KERN_ATTR_VECTOR ()) * main */ - m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10100m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10100_s04 (KERN_ATTR_VECTOR ()) @@ -352,7 +352,9 @@ KERNEL_FQ void m10100_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -381,7 +383,7 @@ KERNEL_FQ void m10100_s04 (KERN_ATTR_VECTOR ()) * main */ - m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10100_s08 (KERN_ATTR_VECTOR ()) @@ -390,7 +392,9 @@ KERNEL_FQ void m10100_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -419,7 +423,7 @@ KERNEL_FQ void m10100_s08 (KERN_ATTR_VECTOR ()) * main */ - m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10100_s16 (KERN_ATTR_VECTOR ()) @@ -428,7 +432,9 @@ KERNEL_FQ void m10100_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -457,5 +463,5 @@ KERNEL_FQ void m10100_s16 (KERN_ATTR_VECTOR ()) * main */ - m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10100s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m10400_a0-optimized.cl b/OpenCL/m10400_a0-optimized.cl index ba146b5dd..9d3a1cb7b 100644 --- a/OpenCL/m10400_a0-optimized.cl +++ b/OpenCL/m10400_a0-optimized.cl @@ -214,11 +214,11 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_m04 (KERN_ATTR_RULES_ digest[2] = 0; digest[3] = 0; - rc4_init_40 (S, digest); + rc4_init_40 (S, digest, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } @@ -416,11 +416,11 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_s04 (KERN_ATTR_RULES_ digest[2] = 0; digest[3] = 0; - rc4_init_40 (S, digest); + rc4_init_40 (S, digest, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } diff --git a/OpenCL/m10400_a1-optimized.cl b/OpenCL/m10400_a1-optimized.cl index 4b48c52bb..96eb3a5c3 100644 --- a/OpenCL/m10400_a1-optimized.cl +++ b/OpenCL/m10400_a1-optimized.cl @@ -272,11 +272,11 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_m04 (KERN_ATTR_ESALT digest[2] = 0; digest[3] = 0; - rc4_init_40 (S, digest); + rc4_init_40 (S, digest, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } @@ -534,11 +534,11 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_s04 (KERN_ATTR_ESALT digest[2] = 0; digest[3] = 0; - rc4_init_40 (S, digest); + rc4_init_40 (S, digest, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } diff --git a/OpenCL/m10400_a3-optimized.cl b/OpenCL/m10400_a3-optimized.cl index dc89870a4..0abdf96b6 100644 --- a/OpenCL/m10400_a3-optimized.cl +++ b/OpenCL/m10400_a3-optimized.cl @@ -40,15 +40,12 @@ typedef struct pdf } pdf_t; -DECLSPEC void m10400m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10400m (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (pdf_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * constant */ @@ -206,25 +203,22 @@ DECLSPEC void m10400m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons digest[2] = 0; digest[3] = 0; - rc4_init_40 (S, digest); + rc4_init_40 (S, digest, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } } -DECLSPEC void m10400s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10400s (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (pdf_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * constant */ @@ -394,11 +388,11 @@ DECLSPEC void m10400s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons digest[2] = 0; digest[3] = 0; - rc4_init_40 (S, digest); + rc4_init_40 (S, digest, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } @@ -410,7 +404,9 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_m04 (KERN_ATTR_ESALT * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -450,7 +446,7 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_m04 (KERN_ATTR_ESALT LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10400m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10400m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_m08 (KERN_ATTR_ESALT (pdf_t)) @@ -459,7 +455,9 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_m08 (KERN_ATTR_ESALT * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -499,7 +497,7 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_m08 (KERN_ATTR_ESALT LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10400m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10400m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_m16 (KERN_ATTR_ESALT (pdf_t)) @@ -508,7 +506,9 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_m16 (KERN_ATTR_ESALT * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -548,7 +548,7 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_m16 (KERN_ATTR_ESALT LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10400m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10400m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_s04 (KERN_ATTR_ESALT (pdf_t)) @@ -557,7 +557,9 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_s04 (KERN_ATTR_ESALT * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -597,7 +599,7 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_s04 (KERN_ATTR_ESALT LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10400s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10400s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_s08 (KERN_ATTR_ESALT (pdf_t)) @@ -606,7 +608,9 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_s08 (KERN_ATTR_ESALT * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -646,7 +650,7 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10400_s08 (KERN_ATTR_ESALT LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10400s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10400s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10400_s16 (KERN_ATTR_ESALT (pdf_t)) @@ -655,7 +659,9 @@ KERNEL_FQ void m10400_s16 (KERN_ATTR_ESALT (pdf_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -695,5 +701,5 @@ KERNEL_FQ void m10400_s16 (KERN_ATTR_ESALT (pdf_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10400s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10400s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m10410_a0-optimized.cl b/OpenCL/m10410_a0-optimized.cl index 21da0fa84..072072d11 100644 --- a/OpenCL/m10410_a0-optimized.cl +++ b/OpenCL/m10410_a0-optimized.cl @@ -111,11 +111,11 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_m04 (KERN_ATTR_RULES_ * pdf */ - rc4_init_40 (S, w0); + rc4_init_40 (S, w0, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } @@ -210,11 +210,11 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_s04 (KERN_ATTR_RULES_ * pdf */ - rc4_init_40 (S, w0); + rc4_init_40 (S, w0, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } diff --git a/OpenCL/m10410_a1-optimized.cl b/OpenCL/m10410_a1-optimized.cl index 2db109b97..c4c96d701 100644 --- a/OpenCL/m10410_a1-optimized.cl +++ b/OpenCL/m10410_a1-optimized.cl @@ -178,11 +178,11 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_m04 (KERN_ATTR_ESALT * pdf */ - rc4_init_40 (S, w0); + rc4_init_40 (S, w0, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } @@ -346,11 +346,11 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_s04 (KERN_ATTR_ESALT * pdf */ - rc4_init_40 (S, w0); + rc4_init_40 (S, w0, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } diff --git a/OpenCL/m10410_a3-optimized.cl b/OpenCL/m10410_a3-optimized.cl index 74a271215..f9dc3a12c 100644 --- a/OpenCL/m10410_a3-optimized.cl +++ b/OpenCL/m10410_a3-optimized.cl @@ -40,15 +40,12 @@ typedef struct pdf } pdf_t; -DECLSPEC void m10410m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10410m (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (pdf_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * constant */ @@ -83,25 +80,22 @@ DECLSPEC void m10410m (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons * pdf */ - rc4_init_40 (S, w0); + rc4_init_40 (S, w0, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_M_SIMD (out[0], out[1], out[2], out[3]); } } -DECLSPEC void m10410s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10410s (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (pdf_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * constant */ @@ -148,11 +142,11 @@ DECLSPEC void m10410s (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, cons * pdf */ - rc4_init_40 (S, w0); + rc4_init_40 (S, w0, lid); u32 out[4]; - rc4_next_16 (S, 0, 0, padding, out); + rc4_next_16 (S, 0, 0, padding, out, lid); COMPARE_S_SIMD (out[0], out[1], out[2], out[3]); } @@ -164,7 +158,9 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_m04 (KERN_ATTR_ESALT * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -204,7 +200,7 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_m04 (KERN_ATTR_ESALT LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10410m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10410m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_m08 (KERN_ATTR_ESALT (pdf_t)) @@ -213,7 +209,9 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_m08 (KERN_ATTR_ESALT * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -253,7 +251,7 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_m08 (KERN_ATTR_ESALT LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10410m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10410m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_m16 (KERN_ATTR_ESALT (pdf_t)) @@ -262,7 +260,9 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_m16 (KERN_ATTR_ESALT * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -302,7 +302,7 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_m16 (KERN_ATTR_ESALT LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10410m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10410m (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_s04 (KERN_ATTR_ESALT (pdf_t)) @@ -311,7 +311,9 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_s04 (KERN_ATTR_ESALT * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -351,7 +353,7 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_s04 (KERN_ATTR_ESALT LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10410s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10410s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_s08 (KERN_ATTR_ESALT (pdf_t)) @@ -360,7 +362,9 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_s08 (KERN_ATTR_ESALT * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -400,7 +404,7 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_s08 (KERN_ATTR_ESALT LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10410s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10410s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_s16 (KERN_ATTR_ESALT (pdf_t)) @@ -409,7 +413,9 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_s16 (KERN_ATTR_ESALT * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -449,5 +455,5 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m10410_s16 (KERN_ATTR_ESALT LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m10410s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10410s (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m10420_a3-optimized.cl b/OpenCL/m10420_a3-optimized.cl index 172bb4f5e..e897f3a4e 100644 --- a/OpenCL/m10420_a3-optimized.cl +++ b/OpenCL/m10420_a3-optimized.cl @@ -50,15 +50,12 @@ typedef struct pdf } pdf_t; -DECLSPEC void m10420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10420m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (pdf_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * U_buf */ @@ -203,15 +200,12 @@ DECLSPEC void m10420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m10420s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10420s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (pdf_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * U_buf */ @@ -374,7 +368,9 @@ KERNEL_FQ void m10420_m04 (KERN_ATTR_ESALT (pdf_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -412,7 +408,7 @@ KERNEL_FQ void m10420_m04 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10420_m08 (KERN_ATTR_ESALT (pdf_t)) @@ -421,7 +417,9 @@ KERNEL_FQ void m10420_m08 (KERN_ATTR_ESALT (pdf_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -459,7 +457,7 @@ KERNEL_FQ void m10420_m08 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10420_m16 (KERN_ATTR_ESALT (pdf_t)) @@ -468,7 +466,9 @@ KERNEL_FQ void m10420_m16 (KERN_ATTR_ESALT (pdf_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -506,7 +506,7 @@ KERNEL_FQ void m10420_m16 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10420m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10420_s04 (KERN_ATTR_ESALT (pdf_t)) @@ -515,7 +515,9 @@ KERNEL_FQ void m10420_s04 (KERN_ATTR_ESALT (pdf_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -553,7 +555,7 @@ KERNEL_FQ void m10420_s04 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10420_s08 (KERN_ATTR_ESALT (pdf_t)) @@ -562,7 +564,9 @@ KERNEL_FQ void m10420_s08 (KERN_ATTR_ESALT (pdf_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -600,7 +604,7 @@ KERNEL_FQ void m10420_s08 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10420_s16 (KERN_ATTR_ESALT (pdf_t)) @@ -609,7 +613,9 @@ KERNEL_FQ void m10420_s16 (KERN_ATTR_ESALT (pdf_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -647,5 +653,5 @@ KERNEL_FQ void m10420_s16 (KERN_ATTR_ESALT (pdf_t)) * main */ - m10420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10420s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m10500-pure.cl b/OpenCL/m10500-pure.cl index ec101f828..10cabef9a 100644 --- a/OpenCL/m10500-pure.cl +++ b/OpenCL/m10500-pure.cl @@ -317,9 +317,9 @@ KERNEL_FQ void m10500_loop (KERN_ATTR_TMPS_ESALT (pdf14_tmp_t, pdf_t)) tmp[2] = digest[2] ^ xv; tmp[3] = digest[3] ^ xv; - rc4_init_128 (S, tmp); + rc4_init_128 (S, tmp, lid); - rc4_next_16 (S, 0, 0, out, out); + rc4_next_16 (S, 0, 0, out, out, lid); } } diff --git a/OpenCL/m10700-optimized.cl b/OpenCL/m10700-optimized.cl index c08e8e2d2..3d0942f45 100644 --- a/OpenCL/m10700-optimized.cl +++ b/OpenCL/m10700-optimized.cl @@ -82,7 +82,7 @@ typedef struct } ctx_t; -DECLSPEC void orig_sha256_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void orig_sha256_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest) { u32 t0[4]; u32 t1[4]; @@ -109,7 +109,7 @@ DECLSPEC void orig_sha256_transform (const u32 *w0, const u32 *w1, const u32 *w2 sha256_transform (t0, t1, t2, t3, digest); } -DECLSPEC void orig_sha384_transform (const u64 *w0, const u64 *w1, const u64 *w2, const u64 *w3, u64 *digest) +DECLSPEC void orig_sha384_transform (PRIVATE_AS const u64 *w0, PRIVATE_AS const u64 *w1, PRIVATE_AS const u64 *w2, PRIVATE_AS const u64 *w3, PRIVATE_AS u64 *digest) { u32 t0[4]; u32 t1[4]; @@ -156,7 +156,7 @@ DECLSPEC void orig_sha384_transform (const u64 *w0, const u64 *w1, const u64 *w2 sha384_transform (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC void orig_sha512_transform (const u64 *w0, const u64 *w1, const u64 *w2, const u64 *w3, u64 *digest) +DECLSPEC void orig_sha512_transform (PRIVATE_AS const u64 *w0, PRIVATE_AS const u64 *w1, PRIVATE_AS const u64 *w2, PRIVATE_AS const u64 *w3, PRIVATE_AS u64 *digest) { u32 t0[4]; u32 t1[4]; @@ -222,7 +222,7 @@ DECLSPEC void orig_sha512_transform (const u64 *w0, const u64 *w1, const u64 *w2 #define WORDMAXSZ4 (WORDMAXSZ / 4) #define AESSZ4 (AESSZ / 4) -DECLSPEC void make_sc (LOCAL_AS u32 *sc, const u32 *pw, const u32 pw_len, const u32 *bl, const u32 bl_len) +DECLSPEC void make_sc (LOCAL_AS u32 *sc, PRIVATE_AS const u32 *pw, const u32 pw_len, PRIVATE_AS const u32 *bl, const u32 bl_len) { const u32 bd = bl_len / 4; @@ -274,7 +274,7 @@ DECLSPEC void make_sc (LOCAL_AS u32 *sc, const u32 *pw, const u32 pw_len, const } } -DECLSPEC void make_pt_with_offset (u32 *pt, const u32 offset, LOCAL_AS const u32 *sc, const u32 pwbl_len) +DECLSPEC void make_pt_with_offset (PRIVATE_AS u32 *pt, const u32 offset, LOCAL_AS const u32 *sc, const u32 pwbl_len) { const u32 m = offset % pwbl_len; @@ -304,7 +304,7 @@ DECLSPEC void make_pt_with_offset (u32 *pt, const u32 offset, LOCAL_AS const u32 #endif } -DECLSPEC void make_w_with_offset (ctx_t *ctx, const u32 W_len, const u32 offset, LOCAL_AS const u32 *sc, const u32 pwbl_len, u32 *iv, const u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void make_w_with_offset (PRIVATE_AS ctx_t *ctx, const u32 W_len, const u32 offset, LOCAL_AS const u32 *sc, const u32 pwbl_len, PRIVATE_AS u32 *iv, PRIVATE_AS const u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { for (u32 k = 0, wk = 0; k < W_len; k += AESSZ, wk += AESSZ4) { @@ -326,7 +326,7 @@ DECLSPEC void make_w_with_offset (ctx_t *ctx, const u32 W_len, const u32 offset, } } -DECLSPEC HC_INLINE u32 do_round (LOCAL_AS u32 *sc, const u32 *pw, const u32 pw_len, ctx_t *ctx, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC HC_INLINE u32 do_round (LOCAL_AS u32 *sc, PRIVATE_AS const u32 *pw, const u32 pw_len, PRIVATE_AS ctx_t *ctx, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { // make scratch buffer diff --git a/OpenCL/m10700-pure.cl b/OpenCL/m10700-pure.cl index 3be079fb1..8a315a506 100644 --- a/OpenCL/m10700-pure.cl +++ b/OpenCL/m10700-pure.cl @@ -20,11 +20,11 @@ #define COMPARE_S STR(INCLUDE_PATH/inc_comp_single.cl) #define COMPARE_M STR(INCLUDE_PATH/inc_comp_multi.cl) -#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) -#define GETCHAR(a,p) ((u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((PRIVATE_AS u8 *)(a))[(p)] = (u8) (c) +#define GETCHAR(a,p) ((PRIVATE_AS u8 *)(a))[(p)] -#define PUTCHAR_BE(a,p,c) ((u8 *)(a))[(p) ^ 3] = (u8) (c) -#define GETCHAR_BE(a,p) ((u8 *)(a))[(p) ^ 3] +#define PUTCHAR_BE(a,p,c) ((PRIVATE_AS u8 *)(a))[(p) ^ 3] = (u8) (c) +#define GETCHAR_BE(a,p) ((PRIVATE_AS u8 *)(a))[(p) ^ 3] typedef struct pdf { @@ -60,7 +60,7 @@ typedef struct pdf17l8_tmp } pdf17l8_tmp_t; -DECLSPEC void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes128_encrypt_cbc (PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 data[4]; @@ -87,7 +87,7 @@ DECLSPEC void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, out[3] = hc_swap32_S (out[3]); } -DECLSPEC u32 sha256_update_aes_64 (sha256_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC u32 sha256_update_aes_64 (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len, PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ex = 0; @@ -172,7 +172,7 @@ DECLSPEC u32 sha256_update_aes_64 (sha256_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, return ex; } -DECLSPEC void sha256_update_aes (sha256_ctx_t *ctx, const u32 *w, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha256_update_aes (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 w0[4]; u32 w1[4]; @@ -224,7 +224,7 @@ DECLSPEC void sha256_update_aes (sha256_ctx_t *ctx, const u32 *w, const int len, sha256_update_aes_64 (ctx, w0, w1, w2, w3, len - pos1, aes_ks, aes_iv, s_te0, s_te1, s_te2, s_te3, s_te4); } -DECLSPEC void sha256_final_aes (sha256_ctx_t *ctx, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha256_final_aes (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { int pos = ctx->len & 63; @@ -260,7 +260,7 @@ DECLSPEC void sha256_final_aes (sha256_ctx_t *ctx, const u32 *aes_ks, u32 *aes_i sha256_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); } -DECLSPEC u32 sha384_update_aes_128 (sha384_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC u32 sha384_update_aes_128 (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len, PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ex = 0; @@ -401,7 +401,7 @@ DECLSPEC u32 sha384_update_aes_128 (sha384_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2 return ex; } -DECLSPEC void sha384_update_aes (sha384_ctx_t *ctx, const u32 *w, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha384_update_aes (PRIVATE_AS sha384_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 w0[4]; u32 w1[4]; @@ -489,7 +489,7 @@ DECLSPEC void sha384_update_aes (sha384_ctx_t *ctx, const u32 *w, const int len, sha384_update_aes_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1, aes_ks, aes_iv, s_te0, s_te1, s_te2, s_te3, s_te4); } -DECLSPEC u32 sha384_final_aes (sha384_ctx_t *ctx, const u32 ex, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC u32 sha384_final_aes (PRIVATE_AS sha384_ctx_t *ctx, const u32 ex, PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ret = ex; @@ -553,7 +553,7 @@ DECLSPEC u32 sha384_final_aes (sha384_ctx_t *ctx, const u32 ex, const u32 *aes_k return ret; } -DECLSPEC u32 sha512_update_aes_128 (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC u32 sha512_update_aes_128 (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len, PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ex = 0; @@ -694,7 +694,7 @@ DECLSPEC u32 sha512_update_aes_128 (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2 return ex; } -DECLSPEC void sha512_update_aes (sha512_ctx_t *ctx, const u32 *w, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha512_update_aes (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len, PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 w0[4]; u32 w1[4]; @@ -782,7 +782,7 @@ DECLSPEC void sha512_update_aes (sha512_ctx_t *ctx, const u32 *w, const int len, sha512_update_aes_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1, aes_ks, aes_iv, s_te0, s_te1, s_te2, s_te3, s_te4); } -DECLSPEC u32 sha512_final_aes (sha512_ctx_t *ctx, const u32 ex, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC u32 sha512_final_aes (PRIVATE_AS sha512_ctx_t *ctx, const u32 ex, PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ret = ex; @@ -846,7 +846,7 @@ DECLSPEC u32 sha512_final_aes (sha512_ctx_t *ctx, const u32 ex, const u32 *aes_k return ret; } -DECLSPEC int find_sum (const u32 *w, const u32 pw_len, u32 *bb, const u32 *aes_ks, const u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC int find_sum (PRIVATE_AS const u32 *w, const u32 pw_len, PRIVATE_AS u32 *bb, PRIVATE_AS const u32 *aes_ks, PRIVATE_AS const u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 data[4]; @@ -887,7 +887,7 @@ DECLSPEC int find_sum (const u32 *w, const u32 pw_len, u32 *bb, const u32 *aes_k return sum; } -DECLSPEC u32 do_round (const u32 *w, const u32 pw_len, pdf17l8_tmp_t *tmp, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC u32 do_round (PRIVATE_AS const u32 *w, const u32 pw_len, PRIVATE_AS pdf17l8_tmp_t *tmp, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { // get previous hash (already padded) diff --git a/OpenCL/m10800_a0-optimized.cl b/OpenCL/m10800_a0-optimized.cl index 5bcb49bbf..d3b06bbf7 100644 --- a/OpenCL/m10800_a0-optimized.cl +++ b/OpenCL/m10800_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10800_a1-optimized.cl b/OpenCL/m10800_a1-optimized.cl index 5bfb2fe1b..ea495a89e 100644 --- a/OpenCL/m10800_a1-optimized.cl +++ b/OpenCL/m10800_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10800_a3-optimized.cl b/OpenCL/m10800_a3-optimized.cl index 5e03fe863..1e7cf1797 100644 --- a/OpenCL/m10800_a3-optimized.cl +++ b/OpenCL/m10800_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = 0; } -DECLSPEC void m10800m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10800m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -188,15 +185,12 @@ DECLSPEC void m10800m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m10800s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10800s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -271,7 +265,9 @@ KERNEL_FQ void m10800_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -300,7 +296,7 @@ KERNEL_FQ void m10800_m04 (KERN_ATTR_VECTOR ()) * main */ - m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10800_m08 (KERN_ATTR_VECTOR ()) @@ -309,7 +305,9 @@ KERNEL_FQ void m10800_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -338,7 +336,7 @@ KERNEL_FQ void m10800_m08 (KERN_ATTR_VECTOR ()) * main */ - m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10800_m16 (KERN_ATTR_VECTOR ()) @@ -347,7 +345,9 @@ KERNEL_FQ void m10800_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -376,7 +376,7 @@ KERNEL_FQ void m10800_m16 (KERN_ATTR_VECTOR ()) * main */ - m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10800_s04 (KERN_ATTR_VECTOR ()) @@ -385,7 +385,9 @@ KERNEL_FQ void m10800_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -414,7 +416,7 @@ KERNEL_FQ void m10800_s04 (KERN_ATTR_VECTOR ()) * main */ - m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10800_s08 (KERN_ATTR_VECTOR ()) @@ -423,7 +425,9 @@ KERNEL_FQ void m10800_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -452,7 +456,7 @@ KERNEL_FQ void m10800_s08 (KERN_ATTR_VECTOR ()) * main */ - m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10800_s16 (KERN_ATTR_VECTOR ()) @@ -461,7 +465,9 @@ KERNEL_FQ void m10800_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -490,5 +496,5 @@ KERNEL_FQ void m10800_s16 (KERN_ATTR_VECTOR ()) * main */ - m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m10810_a0-optimized.cl b/OpenCL/m10810_a0-optimized.cl index fe9f9ec08..eb760a854 100644 --- a/OpenCL/m10810_a0-optimized.cl +++ b/OpenCL/m10810_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10810_a1-optimized.cl b/OpenCL/m10810_a1-optimized.cl index 91341ddfc..ba11ec552 100644 --- a/OpenCL/m10810_a1-optimized.cl +++ b/OpenCL/m10810_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10810_a3-optimized.cl b/OpenCL/m10810_a3-optimized.cl index 62dbc26ff..71d812b8b 100644 --- a/OpenCL/m10810_a3-optimized.cl +++ b/OpenCL/m10810_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = 0; } -DECLSPEC void m10810m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10810m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -239,15 +236,12 @@ DECLSPEC void m10810m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m10810s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10810s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -322,7 +316,9 @@ KERNEL_FQ void m10810_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -351,7 +347,7 @@ KERNEL_FQ void m10810_m04 (KERN_ATTR_VECTOR ()) * main */ - m10810m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10810m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10810_m08 (KERN_ATTR_VECTOR ()) @@ -360,7 +356,9 @@ KERNEL_FQ void m10810_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -389,7 +387,7 @@ KERNEL_FQ void m10810_m08 (KERN_ATTR_VECTOR ()) * main */ - m10810m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10810m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10810_m16 (KERN_ATTR_VECTOR ()) @@ -398,7 +396,9 @@ KERNEL_FQ void m10810_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -427,7 +427,7 @@ KERNEL_FQ void m10810_m16 (KERN_ATTR_VECTOR ()) * main */ - m10810m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10810m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10810_s04 (KERN_ATTR_VECTOR ()) @@ -436,7 +436,9 @@ KERNEL_FQ void m10810_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -465,7 +467,7 @@ KERNEL_FQ void m10810_s04 (KERN_ATTR_VECTOR ()) * main */ - m10810s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10810s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10810_s08 (KERN_ATTR_VECTOR ()) @@ -474,7 +476,9 @@ KERNEL_FQ void m10810_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -503,7 +507,7 @@ KERNEL_FQ void m10810_s08 (KERN_ATTR_VECTOR ()) * main */ - m10810s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10810s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10810_s16 (KERN_ATTR_VECTOR ()) @@ -512,7 +516,9 @@ KERNEL_FQ void m10810_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -541,5 +547,5 @@ KERNEL_FQ void m10810_s16 (KERN_ATTR_VECTOR ()) * main */ - m10810s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10810s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m10820_a0-optimized.cl b/OpenCL/m10820_a0-optimized.cl index 49a947de6..99f233f7b 100644 --- a/OpenCL/m10820_a0-optimized.cl +++ b/OpenCL/m10820_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10820_a1-optimized.cl b/OpenCL/m10820_a1-optimized.cl index d11eda853..39e864cb4 100644 --- a/OpenCL/m10820_a1-optimized.cl +++ b/OpenCL/m10820_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10820_a3-optimized.cl b/OpenCL/m10820_a3-optimized.cl index 38eecb839..f8eff6d78 100644 --- a/OpenCL/m10820_a3-optimized.cl +++ b/OpenCL/m10820_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = 0; } -DECLSPEC void m10820m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m10820m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -241,15 +238,12 @@ DECLSPEC void m10820m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) } } -DECLSPEC void m10820s (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m10820s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -377,7 +371,9 @@ KERNEL_FQ void m10820_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -406,7 +402,7 @@ KERNEL_FQ void m10820_m04 (KERN_ATTR_BASIC ()) * main */ - m10820m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10820m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10820_m08 (KERN_ATTR_BASIC ()) @@ -415,7 +411,9 @@ KERNEL_FQ void m10820_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -444,7 +442,7 @@ KERNEL_FQ void m10820_m08 (KERN_ATTR_BASIC ()) * main */ - m10820m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10820m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10820_m16 (KERN_ATTR_BASIC ()) @@ -453,7 +451,9 @@ KERNEL_FQ void m10820_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -482,7 +482,7 @@ KERNEL_FQ void m10820_m16 (KERN_ATTR_BASIC ()) * main */ - m10820m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10820m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10820_s04 (KERN_ATTR_BASIC ()) @@ -491,7 +491,9 @@ KERNEL_FQ void m10820_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -520,7 +522,7 @@ KERNEL_FQ void m10820_s04 (KERN_ATTR_BASIC ()) * main */ - m10820s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10820s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10820_s08 (KERN_ATTR_BASIC ()) @@ -529,7 +531,9 @@ KERNEL_FQ void m10820_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -558,7 +562,7 @@ KERNEL_FQ void m10820_s08 (KERN_ATTR_BASIC ()) * main */ - m10820s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10820s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10820_s16 (KERN_ATTR_BASIC ()) @@ -567,7 +571,9 @@ KERNEL_FQ void m10820_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -596,5 +602,5 @@ KERNEL_FQ void m10820_s16 (KERN_ATTR_BASIC ()) * main */ - m10820s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10820s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m10830_a0-optimized.cl b/OpenCL/m10830_a0-optimized.cl index 80b8b4a16..9ac0c1de2 100644 --- a/OpenCL/m10830_a0-optimized.cl +++ b/OpenCL/m10830_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10830_a1-optimized.cl b/OpenCL/m10830_a1-optimized.cl index 4761912f5..3b7d8c6ab 100644 --- a/OpenCL/m10830_a1-optimized.cl +++ b/OpenCL/m10830_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10830_a3-optimized.cl b/OpenCL/m10830_a3-optimized.cl index 8b0765236..9f74849d9 100644 --- a/OpenCL/m10830_a3-optimized.cl +++ b/OpenCL/m10830_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = 0; } -DECLSPEC void m10830m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10830m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -239,15 +236,12 @@ DECLSPEC void m10830m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m10830s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10830s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -322,7 +316,9 @@ KERNEL_FQ void m10830_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -351,7 +347,7 @@ KERNEL_FQ void m10830_m04 (KERN_ATTR_VECTOR ()) * main */ - m10830m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10830m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10830_m08 (KERN_ATTR_VECTOR ()) @@ -360,7 +356,9 @@ KERNEL_FQ void m10830_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -389,7 +387,7 @@ KERNEL_FQ void m10830_m08 (KERN_ATTR_VECTOR ()) * main */ - m10830m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10830m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10830_m16 (KERN_ATTR_VECTOR ()) @@ -398,7 +396,9 @@ KERNEL_FQ void m10830_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -427,7 +427,7 @@ KERNEL_FQ void m10830_m16 (KERN_ATTR_VECTOR ()) * main */ - m10830m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10830m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10830_s04 (KERN_ATTR_VECTOR ()) @@ -436,7 +436,9 @@ KERNEL_FQ void m10830_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -465,7 +467,7 @@ KERNEL_FQ void m10830_s04 (KERN_ATTR_VECTOR ()) * main */ - m10830s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10830s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10830_s08 (KERN_ATTR_VECTOR ()) @@ -474,7 +476,9 @@ KERNEL_FQ void m10830_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -503,7 +507,7 @@ KERNEL_FQ void m10830_s08 (KERN_ATTR_VECTOR ()) * main */ - m10830s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10830s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10830_s16 (KERN_ATTR_VECTOR ()) @@ -512,7 +516,9 @@ KERNEL_FQ void m10830_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -541,5 +547,5 @@ KERNEL_FQ void m10830_s16 (KERN_ATTR_VECTOR ()) * main */ - m10830s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10830s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m10840_a0-optimized.cl b/OpenCL/m10840_a0-optimized.cl index 7461c57ab..cf50f3558 100644 --- a/OpenCL/m10840_a0-optimized.cl +++ b/OpenCL/m10840_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10840_a1-optimized.cl b/OpenCL/m10840_a1-optimized.cl index fc2930404..c415bb272 100644 --- a/OpenCL/m10840_a1-optimized.cl +++ b/OpenCL/m10840_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10840_a3-optimized.cl b/OpenCL/m10840_a3-optimized.cl index 47ac4e89a..4c7656278 100644 --- a/OpenCL/m10840_a3-optimized.cl +++ b/OpenCL/m10840_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = 0; } -DECLSPEC void m10840m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m10840m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -241,15 +238,12 @@ DECLSPEC void m10840m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) } } -DECLSPEC void m10840s (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m10840s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -377,7 +371,9 @@ KERNEL_FQ void m10840_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -406,7 +402,7 @@ KERNEL_FQ void m10840_m04 (KERN_ATTR_BASIC ()) * main */ - m10840m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10840m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10840_m08 (KERN_ATTR_BASIC ()) @@ -415,7 +411,9 @@ KERNEL_FQ void m10840_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -444,7 +442,7 @@ KERNEL_FQ void m10840_m08 (KERN_ATTR_BASIC ()) * main */ - m10840m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10840m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10840_m16 (KERN_ATTR_BASIC ()) @@ -453,7 +451,9 @@ KERNEL_FQ void m10840_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -482,7 +482,7 @@ KERNEL_FQ void m10840_m16 (KERN_ATTR_BASIC ()) * main */ - m10840m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10840m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10840_s04 (KERN_ATTR_BASIC ()) @@ -491,7 +491,9 @@ KERNEL_FQ void m10840_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -520,7 +522,7 @@ KERNEL_FQ void m10840_s04 (KERN_ATTR_BASIC ()) * main */ - m10840s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10840s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10840_s08 (KERN_ATTR_BASIC ()) @@ -529,7 +531,9 @@ KERNEL_FQ void m10840_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -558,7 +562,7 @@ KERNEL_FQ void m10840_s08 (KERN_ATTR_BASIC ()) * main */ - m10840s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10840s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10840_s16 (KERN_ATTR_BASIC ()) @@ -567,7 +571,9 @@ KERNEL_FQ void m10840_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -596,5 +602,5 @@ KERNEL_FQ void m10840_s16 (KERN_ATTR_BASIC ()) * main */ - m10840s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10840s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m10870_a0-optimized.cl b/OpenCL/m10870_a0-optimized.cl index 5bbcfcc34..efdf2045a 100644 --- a/OpenCL/m10870_a0-optimized.cl +++ b/OpenCL/m10870_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10870_a1-optimized.cl b/OpenCL/m10870_a1-optimized.cl index a12a526a5..d9398ae18 100644 --- a/OpenCL/m10870_a1-optimized.cl +++ b/OpenCL/m10870_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10870_a3-optimized.cl b/OpenCL/m10870_a3-optimized.cl index 5605f7260..039fd076d 100644 --- a/OpenCL/m10870_a3-optimized.cl +++ b/OpenCL/m10870_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha384.cl) #endif -DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = 0; } -DECLSPEC void m10870m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10870m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -188,15 +185,12 @@ DECLSPEC void m10870m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m10870s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10870s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -271,7 +265,9 @@ KERNEL_FQ void m10870_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -300,7 +296,7 @@ KERNEL_FQ void m10870_m04 (KERN_ATTR_VECTOR ()) * main */ - m10870m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10870m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10870_m08 (KERN_ATTR_VECTOR ()) @@ -309,7 +305,9 @@ KERNEL_FQ void m10870_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -338,7 +336,7 @@ KERNEL_FQ void m10870_m08 (KERN_ATTR_VECTOR ()) * main */ - m10870m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10870m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10870_m16 (KERN_ATTR_VECTOR ()) @@ -347,7 +345,9 @@ KERNEL_FQ void m10870_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -376,7 +376,7 @@ KERNEL_FQ void m10870_m16 (KERN_ATTR_VECTOR ()) * main */ - m10870m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10870m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10870_s04 (KERN_ATTR_VECTOR ()) @@ -385,7 +385,9 @@ KERNEL_FQ void m10870_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -414,7 +416,7 @@ KERNEL_FQ void m10870_s04 (KERN_ATTR_VECTOR ()) * main */ - m10870s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10870s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10870_s08 (KERN_ATTR_VECTOR ()) @@ -423,7 +425,9 @@ KERNEL_FQ void m10870_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -452,7 +456,7 @@ KERNEL_FQ void m10870_s08 (KERN_ATTR_VECTOR ()) * main */ - m10870s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10870s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m10870_s16 (KERN_ATTR_VECTOR ()) @@ -461,7 +465,9 @@ KERNEL_FQ void m10870_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -490,5 +496,5 @@ KERNEL_FQ void m10870_s16 (KERN_ATTR_VECTOR ()) * main */ - m10870s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m10870s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m10900-pure.cl b/OpenCL/m10900-pure.cl index 3159c2f40..a815a10cd 100644 --- a/OpenCL/m10900-pure.cl +++ b/OpenCL/m10900-pure.cl @@ -36,7 +36,7 @@ typedef struct pbkdf2_sha256 } pbkdf2_sha256_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m11000_a3-optimized.cl b/OpenCL/m11000_a3-optimized.cl index 81f7bc7ba..592308e80 100644 --- a/OpenCL/m11000_a3-optimized.cl +++ b/OpenCL/m11000_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void m11000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11000m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -282,15 +279,12 @@ DECLSPEC void m11000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m11000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11000s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -565,7 +559,9 @@ KERNEL_FQ void m11000_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -603,7 +599,7 @@ KERNEL_FQ void m11000_m04 (KERN_ATTR_BASIC ()) * main */ - m11000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11000_m08 (KERN_ATTR_BASIC ()) @@ -612,7 +608,9 @@ KERNEL_FQ void m11000_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -650,7 +648,7 @@ KERNEL_FQ void m11000_m08 (KERN_ATTR_BASIC ()) * main */ - m11000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11000_m16 (KERN_ATTR_BASIC ()) @@ -659,7 +657,9 @@ KERNEL_FQ void m11000_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -697,7 +697,7 @@ KERNEL_FQ void m11000_m16 (KERN_ATTR_BASIC ()) * main */ - m11000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11000m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11000_s04 (KERN_ATTR_BASIC ()) @@ -706,7 +706,9 @@ KERNEL_FQ void m11000_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -744,7 +746,7 @@ KERNEL_FQ void m11000_s04 (KERN_ATTR_BASIC ()) * main */ - m11000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11000_s08 (KERN_ATTR_BASIC ()) @@ -753,7 +755,9 @@ KERNEL_FQ void m11000_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -791,7 +795,7 @@ KERNEL_FQ void m11000_s08 (KERN_ATTR_BASIC ()) * main */ - m11000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11000_s16 (KERN_ATTR_BASIC ()) @@ -800,7 +804,9 @@ KERNEL_FQ void m11000_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -838,5 +844,5 @@ KERNEL_FQ void m11000_s16 (KERN_ATTR_BASIC ()) * main */ - m11000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11000s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m11100_a3-optimized.cl b/OpenCL/m11100_a3-optimized.cl index f13471512..00523db69 100644 --- a/OpenCL/m11100_a3-optimized.cl +++ b/OpenCL/m11100_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m11100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m11100m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * challenge */ @@ -334,15 +331,12 @@ DECLSPEC void m11100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m11100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m11100s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * challenge */ @@ -660,8 +654,8 @@ KERNEL_FQ void m11100_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -721,7 +715,7 @@ KERNEL_FQ void m11100_m04 (KERN_ATTR_BASIC ()) * main */ - m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m11100_m08 (KERN_ATTR_BASIC ()) @@ -730,8 +724,8 @@ KERNEL_FQ void m11100_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -791,7 +785,7 @@ KERNEL_FQ void m11100_m08 (KERN_ATTR_BASIC ()) * main */ - m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m11100_m16 (KERN_ATTR_BASIC ()) @@ -800,8 +794,8 @@ KERNEL_FQ void m11100_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -861,7 +855,7 @@ KERNEL_FQ void m11100_m16 (KERN_ATTR_BASIC ()) * main */ - m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m11100m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m11100_s04 (KERN_ATTR_BASIC ()) @@ -870,8 +864,8 @@ KERNEL_FQ void m11100_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -931,7 +925,7 @@ KERNEL_FQ void m11100_s04 (KERN_ATTR_BASIC ()) * main */ - m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m11100_s08 (KERN_ATTR_BASIC ()) @@ -940,8 +934,8 @@ KERNEL_FQ void m11100_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1001,7 +995,7 @@ KERNEL_FQ void m11100_s08 (KERN_ATTR_BASIC ()) * main */ - m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m11100_s16 (KERN_ATTR_BASIC ()) @@ -1010,8 +1004,8 @@ KERNEL_FQ void m11100_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1071,5 +1065,5 @@ KERNEL_FQ void m11100_s16 (KERN_ATTR_BASIC ()) * main */ - m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m11100s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m11200_a3-optimized.cl b/OpenCL/m11200_a3-optimized.cl index 95d167329..3565cd999 100644 --- a/OpenCL/m11200_a3-optimized.cl +++ b/OpenCL/m11200_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m11200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11200m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -447,15 +444,12 @@ DECLSPEC void m11200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m11200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11200s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -895,7 +889,9 @@ KERNEL_FQ void m11200_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -937,7 +933,7 @@ KERNEL_FQ void m11200_m04 (KERN_ATTR_BASIC ()) * main */ - m11200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11200_m08 (KERN_ATTR_BASIC ()) @@ -946,7 +942,9 @@ KERNEL_FQ void m11200_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -988,7 +986,7 @@ KERNEL_FQ void m11200_m08 (KERN_ATTR_BASIC ()) * main */ - m11200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11200_m16 (KERN_ATTR_BASIC ()) @@ -997,7 +995,9 @@ KERNEL_FQ void m11200_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -1039,7 +1039,7 @@ KERNEL_FQ void m11200_m16 (KERN_ATTR_BASIC ()) * main */ - m11200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11200_s04 (KERN_ATTR_BASIC ()) @@ -1048,7 +1048,9 @@ KERNEL_FQ void m11200_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -1090,7 +1092,7 @@ KERNEL_FQ void m11200_s04 (KERN_ATTR_BASIC ()) * main */ - m11200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11200_s08 (KERN_ATTR_BASIC ()) @@ -1099,7 +1101,9 @@ KERNEL_FQ void m11200_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -1141,7 +1145,7 @@ KERNEL_FQ void m11200_s08 (KERN_ATTR_BASIC ()) * main */ - m11200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11200_s16 (KERN_ATTR_BASIC ()) @@ -1150,7 +1154,9 @@ KERNEL_FQ void m11200_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -1192,5 +1198,5 @@ KERNEL_FQ void m11200_s16 (KERN_ATTR_BASIC ()) * main */ - m11200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m11300-pure.cl b/OpenCL/m11300-pure.cl index e7a06402e..32d66b574 100644 --- a/OpenCL/m11300-pure.cl +++ b/OpenCL/m11300-pure.cl @@ -34,7 +34,7 @@ typedef struct bitcoin_wallet } bitcoin_wallet_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m11500_a0-optimized.cl b/OpenCL/m11500_a0-optimized.cl index 2479e7e63..7160095ae 100644 --- a/OpenCL/m11500_a0-optimized.cl +++ b/OpenCL/m11500_a0-optimized.cl @@ -110,7 +110,7 @@ DECLSPEC u32x round_crc32 (u32x a, const u32x v) return a; } -DECLSPEC u32x crc32 (const u32x *w, const u32 pw_len, const u32 iv) +DECLSPEC u32x crc32 (PRIVATE_AS const u32x *w, const u32 pw_len, const u32 iv) { u32x a = ~iv; diff --git a/OpenCL/m11500_a1-optimized.cl b/OpenCL/m11500_a1-optimized.cl index adb8810c7..486e5f030 100644 --- a/OpenCL/m11500_a1-optimized.cl +++ b/OpenCL/m11500_a1-optimized.cl @@ -108,7 +108,7 @@ DECLSPEC u32x round_crc32 (u32x a, const u32x v) return a; } -DECLSPEC u32x crc32 (const u32x *w, const u32 pw_len, const u32 iv) +DECLSPEC u32x crc32 (PRIVATE_AS const u32x *w, const u32 pw_len, const u32 iv) { u32x a = ~iv; diff --git a/OpenCL/m11500_a3-optimized.cl b/OpenCL/m11500_a3-optimized.cl index 27971bea6..a94f3310e 100644 --- a/OpenCL/m11500_a3-optimized.cl +++ b/OpenCL/m11500_a3-optimized.cl @@ -108,7 +108,7 @@ DECLSPEC u32x round_crc32 (u32x a, const u32x v) return a; } -DECLSPEC u32x crc32 (const u32x *w, const u32 pw_len, const u32 iv) +DECLSPEC u32x crc32 (PRIVATE_AS const u32x *w, const u32 pw_len, const u32 iv) { u32x a = ~iv; @@ -136,15 +136,12 @@ DECLSPEC u32x crc32 (const u32x *w, const u32 pw_len, const u32 iv) return ~a; } -DECLSPEC void m11500m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11500m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -194,15 +191,12 @@ DECLSPEC void m11500m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) } } -DECLSPEC void m11500s (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11500s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -270,7 +264,9 @@ KERNEL_FQ void m11500_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -299,7 +295,7 @@ KERNEL_FQ void m11500_m04 (KERN_ATTR_BASIC ()) * main */ - m11500m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11500m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11500_m08 (KERN_ATTR_BASIC ()) @@ -308,7 +304,9 @@ KERNEL_FQ void m11500_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -337,7 +335,7 @@ KERNEL_FQ void m11500_m08 (KERN_ATTR_BASIC ()) * main */ - m11500m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11500m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11500_m16 (KERN_ATTR_BASIC ()) @@ -346,7 +344,9 @@ KERNEL_FQ void m11500_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -375,7 +375,7 @@ KERNEL_FQ void m11500_m16 (KERN_ATTR_BASIC ()) * main */ - m11500m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11500m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11500_s04 (KERN_ATTR_BASIC ()) @@ -384,7 +384,9 @@ KERNEL_FQ void m11500_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -413,7 +415,7 @@ KERNEL_FQ void m11500_s04 (KERN_ATTR_BASIC ()) * main */ - m11500s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11500s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11500_s08 (KERN_ATTR_BASIC ()) @@ -422,7 +424,9 @@ KERNEL_FQ void m11500_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -451,7 +455,7 @@ KERNEL_FQ void m11500_s08 (KERN_ATTR_BASIC ()) * main */ - m11500s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11500s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11500_s16 (KERN_ATTR_BASIC ()) @@ -460,7 +464,9 @@ KERNEL_FQ void m11500_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -489,5 +495,5 @@ KERNEL_FQ void m11500_s16 (KERN_ATTR_BASIC ()) * main */ - m11500s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11500s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m11600-optimized.cl b/OpenCL/m11600-optimized.cl index dae802290..f5315d63a 100644 --- a/OpenCL/m11600-optimized.cl +++ b/OpenCL/m11600-optimized.cl @@ -35,11 +35,11 @@ typedef struct } seven_zip_hook_t; -#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) -#define GETCHAR(a,p) ((u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((PRIVATE_AS u8 *)(a))[(p)] = (u8) (c) +#define GETCHAR(a,p) ((PRIVATE_AS u8 *)(a))[(p)] -#define PUTCHAR_BE(a,p,c) ((u8 *)(a))[(p) ^ 3] = (u8) (c) -#define GETCHAR_BE(a,p) ((u8 *)(a))[(p) ^ 3] +#define PUTCHAR_BE(a,p,c) ((PRIVATE_AS u8 *)(a))[(p) ^ 3] = (u8) (c) +#define GETCHAR_BE(a,p) ((PRIVATE_AS u8 *)(a))[(p) ^ 3] #define MIN(a,b) (((a) < (b)) ? (a) : (b)) @@ -87,7 +87,7 @@ KERNEL_FQ void m11600_loop (KERN_ATTR_TMPS_HOOKS (seven_zip_tmp_t, seven_zip_hoo u32 largeblock[LARGEBLOCK_ELEMS]; - u8 *ptr = (u8 *) largeblock; + PRIVATE_AS u8 *ptr = (PRIVATE_AS u8 *) largeblock; for (u32 i = 0; i < LARGEBLOCK_ELEMS; i++) largeblock[i] = 0; diff --git a/OpenCL/m11600-pure.cl b/OpenCL/m11600-pure.cl index 5af78a9c3..f5591794d 100644 --- a/OpenCL/m11600-pure.cl +++ b/OpenCL/m11600-pure.cl @@ -35,7 +35,7 @@ typedef struct } seven_zip_hook_t; -DECLSPEC void memcat8c_be (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len, const u32 append, u32 *digest) +DECLSPEC void memcat8c_be (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 len, const u32 append, PRIVATE_AS u32 *digest) { const u32 func_len = len & 63; diff --git a/OpenCL/m11700_a0-optimized.cl b/OpenCL/m11700_a0-optimized.cl index abf6e0a49..00bd210de 100644 --- a/OpenCL/m11700_a0-optimized.cl +++ b/OpenCL/m11700_a0-optimized.cl @@ -22,7 +22,7 @@ #define INITVAL 0x0101010101010101UL -DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; diff --git a/OpenCL/m11700_a1-optimized.cl b/OpenCL/m11700_a1-optimized.cl index 81e110723..f71981a7d 100644 --- a/OpenCL/m11700_a1-optimized.cl +++ b/OpenCL/m11700_a1-optimized.cl @@ -20,7 +20,7 @@ #define INITVAL 0x0101010101010101UL -DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; diff --git a/OpenCL/m11700_a3-optimized.cl b/OpenCL/m11700_a3-optimized.cl index 91c50e91b..604597a04 100644 --- a/OpenCL/m11700_a3-optimized.cl +++ b/OpenCL/m11700_a3-optimized.cl @@ -20,7 +20,7 @@ #define INITVAL 0x0101010101010101UL -DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; @@ -79,15 +79,12 @@ DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[25 } } -DECLSPEC void m11700m (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11700m (LOCAL_AS u64 (*s_sbob_sl64)[256], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -162,15 +159,12 @@ DECLSPEC void m11700m (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_le } } -DECLSPEC void m11700s (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11700s (LOCAL_AS u64 (*s_sbob_sl64)[256], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -263,8 +257,8 @@ KERNEL_FQ void m11700_m04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -318,7 +312,7 @@ KERNEL_FQ void m11700_m04 (KERN_ATTR_BASIC ()) * main */ - m11700m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11700m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11700_m08 (KERN_ATTR_BASIC ()) @@ -327,8 +321,8 @@ KERNEL_FQ void m11700_m08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -382,7 +376,7 @@ KERNEL_FQ void m11700_m08 (KERN_ATTR_BASIC ()) * main */ - m11700m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11700m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11700_m16 (KERN_ATTR_BASIC ()) @@ -391,8 +385,8 @@ KERNEL_FQ void m11700_m16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -446,7 +440,7 @@ KERNEL_FQ void m11700_m16 (KERN_ATTR_BASIC ()) * main */ - m11700m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11700m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11700_s04 (KERN_ATTR_BASIC ()) @@ -455,8 +449,8 @@ KERNEL_FQ void m11700_s04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -510,7 +504,7 @@ KERNEL_FQ void m11700_s04 (KERN_ATTR_BASIC ()) * main */ - m11700s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11700s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11700_s08 (KERN_ATTR_BASIC ()) @@ -519,8 +513,8 @@ KERNEL_FQ void m11700_s08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -574,7 +568,7 @@ KERNEL_FQ void m11700_s08 (KERN_ATTR_BASIC ()) * main */ - m11700s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11700s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11700_s16 (KERN_ATTR_BASIC ()) @@ -583,8 +577,8 @@ KERNEL_FQ void m11700_s16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -638,5 +632,5 @@ KERNEL_FQ void m11700_s16 (KERN_ATTR_BASIC ()) * main */ - m11700s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11700s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m11800_a0-optimized.cl b/OpenCL/m11800_a0-optimized.cl index f200511fc..1a7859327 100644 --- a/OpenCL/m11800_a0-optimized.cl +++ b/OpenCL/m11800_a0-optimized.cl @@ -22,7 +22,7 @@ #define INITVAL 0 -DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; diff --git a/OpenCL/m11800_a1-optimized.cl b/OpenCL/m11800_a1-optimized.cl index d25ef08d9..04e61b866 100644 --- a/OpenCL/m11800_a1-optimized.cl +++ b/OpenCL/m11800_a1-optimized.cl @@ -20,7 +20,7 @@ #define INITVAL 0 -DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; diff --git a/OpenCL/m11800_a3-optimized.cl b/OpenCL/m11800_a3-optimized.cl index 68a2514e7..4e23e31f6 100644 --- a/OpenCL/m11800_a3-optimized.cl +++ b/OpenCL/m11800_a3-optimized.cl @@ -20,7 +20,7 @@ #define INITVAL 0 -DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; @@ -79,15 +79,12 @@ DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[25 } } -DECLSPEC void m11800m (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11800m (LOCAL_AS u64 (*s_sbob_sl64)[256], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -162,15 +159,12 @@ DECLSPEC void m11800m (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_le } } -DECLSPEC void m11800s (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11800s (LOCAL_AS u64 (*s_sbob_sl64)[256], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -263,8 +257,8 @@ KERNEL_FQ void m11800_m04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -318,7 +312,7 @@ KERNEL_FQ void m11800_m04 (KERN_ATTR_BASIC ()) * main */ - m11800m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11800m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11800_m08 (KERN_ATTR_BASIC ()) @@ -327,8 +321,8 @@ KERNEL_FQ void m11800_m08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -382,7 +376,7 @@ KERNEL_FQ void m11800_m08 (KERN_ATTR_BASIC ()) * main */ - m11800m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11800m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11800_m16 (KERN_ATTR_BASIC ()) @@ -391,8 +385,8 @@ KERNEL_FQ void m11800_m16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -446,7 +440,7 @@ KERNEL_FQ void m11800_m16 (KERN_ATTR_BASIC ()) * main */ - m11800m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11800m (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11800_s04 (KERN_ATTR_BASIC ()) @@ -455,8 +449,8 @@ KERNEL_FQ void m11800_s04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -510,7 +504,7 @@ KERNEL_FQ void m11800_s04 (KERN_ATTR_BASIC ()) * main */ - m11800s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11800s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11800_s08 (KERN_ATTR_BASIC ()) @@ -519,8 +513,8 @@ KERNEL_FQ void m11800_s08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -574,7 +568,7 @@ KERNEL_FQ void m11800_s08 (KERN_ATTR_BASIC ()) * main */ - m11800s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11800s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m11800_s16 (KERN_ATTR_BASIC ()) @@ -583,8 +577,8 @@ KERNEL_FQ void m11800_s16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -638,5 +632,5 @@ KERNEL_FQ void m11800_s16 (KERN_ATTR_BASIC ()) * main */ - m11800s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m11800s (s_sbob_sl64, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m11900-pure.cl b/OpenCL/m11900-pure.cl index dc85e2433..9cea46a8d 100644 --- a/OpenCL/m11900-pure.cl +++ b/OpenCL/m11900-pure.cl @@ -36,7 +36,7 @@ typedef struct pbkdf2_md5_tmp } pbkdf2_md5_tmp_t; -DECLSPEC void hmac_md5_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m12000-pure.cl b/OpenCL/m12000-pure.cl index ede11f0b3..459f2f93e 100644 --- a/OpenCL/m12000-pure.cl +++ b/OpenCL/m12000-pure.cl @@ -36,7 +36,7 @@ typedef struct pbkdf2_sha1 } pbkdf2_sha1_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m12300-pure.cl b/OpenCL/m12300-pure.cl index 0856b0a3a..b95097ad6 100644 --- a/OpenCL/m12300-pure.cl +++ b/OpenCL/m12300-pure.cl @@ -30,7 +30,7 @@ typedef struct oraclet_tmp } oraclet_tmp_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m12400-pure.cl b/OpenCL/m12400-pure.cl index 2bfd622e9..f0b707c96 100644 --- a/OpenCL/m12400-pure.cl +++ b/OpenCL/m12400-pure.cl @@ -361,7 +361,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) (S)[(n)][(i)] -DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -430,7 +430,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 } } -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32 rounds, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, u32 mask, u32 rounds, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E0 = ((mask >> 0) & 0x003f) | ((mask >> 4) & 0x3f00); diff --git a/OpenCL/m12500-optimized.cl b/OpenCL/m12500-optimized.cl index 710acd18e..5ec0fc428 100644 --- a/OpenCL/m12500-optimized.cl +++ b/OpenCL/m12500-optimized.cl @@ -20,11 +20,11 @@ #define ROUNDS 0x40000 -#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) -#define GETCHAR(a,p) ((u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((PRIVATE_AS u8 *)(a))[(p)] = (u8) (c) +#define GETCHAR(a,p) ((PRIVATE_AS u8 *)(a))[(p)] -#define PUTCHAR_BE(a,p,c) ((u8 *)(a))[(p) ^ 3] = (u8) (c) -#define GETCHAR_BE(a,p) ((u8 *)(a))[(p) ^ 3] +#define PUTCHAR_BE(a,p,c) ((PRIVATE_AS u8 *)(a))[(p) ^ 3] = (u8) (c) +#define GETCHAR_BE(a,p) ((PRIVATE_AS u8 *)(a))[(p) ^ 3] #define MIN(a,b) (((a) < (b)) ? (a) : (b)) diff --git a/OpenCL/m12500-pure.cl b/OpenCL/m12500-pure.cl index da9f0f8cc..cc9139dff 100644 --- a/OpenCL/m12500-pure.cl +++ b/OpenCL/m12500-pure.cl @@ -30,7 +30,7 @@ typedef struct rar3_tmp } rar3_tmp_t; -DECLSPEC void memcat8c_be (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len, const u32 append, u32 *digest) +DECLSPEC void memcat8c_be (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 len, const u32 append, PRIVATE_AS u32 *digest) { const u32 func_len = len & 63; @@ -109,7 +109,7 @@ DECLSPEC void memcat8c_be (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len, co // only change in this function compared to OpenCL/inc_hash_sha1.cl is that it returns // the expanded 64 byte buffer w0_t..wf_t in t[]: -DECLSPEC void sha1_transform_rar29 (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest, u32 *t) +DECLSPEC void sha1_transform_rar29 (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *t) { u32 a = digest[0]; u32 b = digest[1]; @@ -458,7 +458,7 @@ DECLSPEC void sha1_transform_rar29 (const u32 *w0, const u32 *w1, const u32 *w2, // only change in this function compared to OpenCL/inc_hash_sha1.cl is that // it calls our modified sha1_transform_rar29 () function -DECLSPEC void sha1_update_64_rar29 (sha1_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int bytes, u32 *t) +DECLSPEC void sha1_update_64_rar29 (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int bytes, PRIVATE_AS u32 *t) { if (bytes == 0) return; @@ -588,7 +588,7 @@ DECLSPEC void sha1_update_64_rar29 (sha1_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, // main change in this function compared to OpenCL/inc_hash_sha1.cl is that // we call sha1_update_64_rar29 () and sometimes replace w[] -DECLSPEC void sha1_update_rar29 (sha1_ctx_t *ctx, u32 *w, const int len) +DECLSPEC void sha1_update_rar29 (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS u32 *w, const int len) { u32 w0[4]; u32 w1[4]; diff --git a/OpenCL/m12600_a3-optimized.cl b/OpenCL/m12600_a3-optimized.cl index 3dc3d2b9e..80475006a 100644 --- a/OpenCL/m12600_a3-optimized.cl +++ b/OpenCL/m12600_a3-optimized.cl @@ -30,15 +30,12 @@ #define uint_to_hex_upper8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m12600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m12600m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -321,15 +318,12 @@ DECLSPEC void m12600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m12600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m12600s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -633,8 +627,8 @@ KERNEL_FQ void m12600_m04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -694,7 +688,7 @@ KERNEL_FQ void m12600_m04 (KERN_ATTR_BASIC ()) * main */ - m12600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m12600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m12600_m08 (KERN_ATTR_BASIC ()) @@ -703,8 +697,8 @@ KERNEL_FQ void m12600_m08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -764,7 +758,7 @@ KERNEL_FQ void m12600_m08 (KERN_ATTR_BASIC ()) * main */ - m12600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m12600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m12600_m16 (KERN_ATTR_BASIC ()) @@ -773,8 +767,8 @@ KERNEL_FQ void m12600_m16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -834,7 +828,7 @@ KERNEL_FQ void m12600_m16 (KERN_ATTR_BASIC ()) * main */ - m12600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m12600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m12600_s04 (KERN_ATTR_BASIC ()) @@ -843,8 +837,8 @@ KERNEL_FQ void m12600_s04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -904,7 +898,7 @@ KERNEL_FQ void m12600_s04 (KERN_ATTR_BASIC ()) * main */ - m12600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m12600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m12600_s08 (KERN_ATTR_BASIC ()) @@ -913,8 +907,8 @@ KERNEL_FQ void m12600_s08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -974,7 +968,7 @@ KERNEL_FQ void m12600_s08 (KERN_ATTR_BASIC ()) * main */ - m12600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m12600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m12600_s16 (KERN_ATTR_BASIC ()) @@ -983,8 +977,8 @@ KERNEL_FQ void m12600_s16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1044,5 +1038,5 @@ KERNEL_FQ void m12600_s16 (KERN_ATTR_BASIC ()) * main */ - m12600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m12600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m12700-pure.cl b/OpenCL/m12700-pure.cl index 7f37ea59e..cf9f33e9d 100644 --- a/OpenCL/m12700-pure.cl +++ b/OpenCL/m12700-pure.cl @@ -45,7 +45,7 @@ DECLSPEC int is_valid_char (const u32 v) return 1; } -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m12800-pure.cl b/OpenCL/m12800-pure.cl index e5f8d8b74..4b7f3f990 100644 --- a/OpenCL/m12800-pure.cl +++ b/OpenCL/m12800-pure.cl @@ -37,7 +37,7 @@ typedef struct pbkdf2_sha256 } pbkdf2_sha256_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m12900-pure.cl b/OpenCL/m12900-pure.cl index 54ae567ee..4bec789bb 100644 --- a/OpenCL/m12900-pure.cl +++ b/OpenCL/m12900-pure.cl @@ -36,7 +36,7 @@ typedef struct pbkdf2_sha256 } pbkdf2_sha256_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13000-pure.cl b/OpenCL/m13000-pure.cl index e8c871307..e9fd5be93 100644 --- a/OpenCL/m13000-pure.cl +++ b/OpenCL/m13000-pure.cl @@ -30,7 +30,7 @@ typedef struct pbkdf2_sha256_tmp } pbkdf2_sha256_tmp_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13100_a0-optimized.cl b/OpenCL/m13100_a0-optimized.cl index edf491fc4..226032507 100644 --- a/OpenCL/m13100_a0-optimized.cl +++ b/OpenCL/m13100_a0-optimized.cl @@ -31,7 +31,7 @@ typedef struct krb5tgs } krb5tgs_t; -DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -82,7 +82,7 @@ DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad, PRIVATE_AS u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -116,9 +116,9 @@ DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; u32 out1[4]; @@ -137,15 +137,15 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 next headers follow the same ASN1 "type-length-data" scheme */ - j = rc4_next_16_global (S, i, j, edata2 + 0, out0); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 0, out0, lid); i += 16; if (((out0[2] & 0xff00ffff) != 0x30008163) && ((out0[2] & 0x0000ffff) != 0x00008263)) return 0; - j = rc4_next_16_global (S, i, j, edata2 + 4, out1); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 4, out1, lid); i += 16; if (((out1[0] & 0x00ffffff) != 0x00000503) && (out1[0] != 0x050307A0)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); i = 0; j = 0; @@ -183,10 +183,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_transform (w0, w1, w2, w3, ipad); } @@ -210,7 +210,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); @@ -223,8 +223,8 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); @@ -237,9 +237,9 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); @@ -252,10 +252,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); @@ -320,7 +320,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, const u32 pw_len, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { /** * pads @@ -534,7 +534,7 @@ KERNEL_FQ void m13100_m04 (KERN_ATTR_RULES_ESALT (krb5tgs_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -630,7 +630,7 @@ KERNEL_FQ void m13100_s04 (KERN_ATTR_RULES_ESALT (krb5tgs_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m13100_a0-pure.cl b/OpenCL/m13100_a0-pure.cl index 869ef18a0..dc3385c17 100644 --- a/OpenCL/m13100_a0-pure.cl +++ b/OpenCL/m13100_a0-pure.cl @@ -30,9 +30,9 @@ typedef struct krb5tgs } krb5tgs_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; u32 out1[4]; @@ -51,15 +51,15 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 next headers follow the same ASN1 "type-length-data" scheme */ - j = rc4_next_16_global (S, i, j, edata2 + 0, out0); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 0, out0, lid); i += 16; if (((out0[2] & 0xff00ffff) != 0x30008163) && ((out0[2] & 0x0000ffff) != 0x00008263)) return 0; - j = rc4_next_16_global (S, i, j, edata2 + 4, out1); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 4, out1, lid); i += 16; if (((out1[0] & 0x00ffffff) != 0x00000503) && (out1[0] != 0x050307A0)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); i = 0; j = 0; @@ -96,10 +96,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_hmac_update_64 (&ctx, w0, w1, w2, w3, 64); } @@ -123,31 +123,31 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); } @@ -164,7 +164,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *K, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -318,7 +318,7 @@ KERNEL_FQ void m13100_mxx (KERN_ATTR_RULES_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -378,7 +378,7 @@ KERNEL_FQ void m13100_sxx (KERN_ATTR_RULES_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m13100_a1-optimized.cl b/OpenCL/m13100_a1-optimized.cl index d84a5cd63..b0c75a1c3 100644 --- a/OpenCL/m13100_a1-optimized.cl +++ b/OpenCL/m13100_a1-optimized.cl @@ -29,7 +29,7 @@ typedef struct krb5tgs } krb5tgs_t; -DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -80,7 +80,7 @@ DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad, PRIVATE_AS u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -114,9 +114,9 @@ DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; u32 out1[4]; @@ -135,15 +135,15 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 next headers follow the same ASN1 "type-length-data" scheme */ - j = rc4_next_16_global (S, i, j, edata2 + 0, out0); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 0, out0, lid); i += 16; if (((out0[2] & 0xff00ffff) != 0x30008163) && ((out0[2] & 0x0000ffff) != 0x00008263)) return 0; - j = rc4_next_16_global (S, i, j, edata2 + 4, out1); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 4, out1, lid); i += 16; if (((out1[0] & 0x00ffffff) != 0x00000503) && (out1[0] != 0x050307A0)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); i = 0; j = 0; @@ -181,10 +181,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_transform (w0, w1, w2, w3, ipad); } @@ -208,7 +208,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); @@ -221,8 +221,8 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); @@ -235,9 +235,9 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); @@ -250,10 +250,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); @@ -318,7 +318,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, const u32 pw_len, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { /** * pads @@ -581,7 +581,7 @@ KERNEL_FQ void m13100_m04 (KERN_ATTR_ESALT (krb5tgs_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -726,7 +726,7 @@ KERNEL_FQ void m13100_s04 (KERN_ATTR_ESALT (krb5tgs_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m13100_a1-pure.cl b/OpenCL/m13100_a1-pure.cl index 42dad3d79..524379c8c 100644 --- a/OpenCL/m13100_a1-pure.cl +++ b/OpenCL/m13100_a1-pure.cl @@ -28,9 +28,9 @@ typedef struct krb5tgs } krb5tgs_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; u32 out1[4]; @@ -49,15 +49,15 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 next headers follow the same ASN1 "type-length-data" scheme */ - j = rc4_next_16_global (S, i, j, edata2 + 0, out0); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 0, out0, lid); i += 16; if (((out0[2] & 0xff00ffff) != 0x30008163) && ((out0[2] & 0x0000ffff) != 0x00008263)) return 0; - j = rc4_next_16_global (S, i, j, edata2 + 4, out1); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 4, out1, lid); i += 16; if (((out1[0] & 0x00ffffff) != 0x00000503) && (out1[0] != 0x050307A0)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); i = 0; j = 0; @@ -94,10 +94,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_hmac_update_64 (&ctx, w0, w1, w2, w3, 64); } @@ -121,31 +121,31 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); } @@ -162,7 +162,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *K, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -314,7 +314,7 @@ KERNEL_FQ void m13100_mxx (KERN_ATTR_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -372,7 +372,7 @@ KERNEL_FQ void m13100_sxx (KERN_ATTR_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m13100_a3-optimized.cl b/OpenCL/m13100_a3-optimized.cl index 43ced3f3b..0a240db75 100644 --- a/OpenCL/m13100_a3-optimized.cl +++ b/OpenCL/m13100_a3-optimized.cl @@ -29,7 +29,7 @@ typedef struct krb5tgs } krb5tgs_t; -DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -80,7 +80,7 @@ DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad, PRIVATE_AS u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -114,9 +114,9 @@ DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; u32 out1[4]; @@ -135,15 +135,15 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 next headers follow the same ASN1 "type-length-data" scheme */ - j = rc4_next_16_global (S, i, j, edata2 + 0, out0); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 0, out0, lid); i += 16; if (((out0[2] & 0xff00ffff) != 0x30008163) && ((out0[2] & 0x0000ffff) != 0x00008263)) return 0; - j = rc4_next_16_global (S, i, j, edata2 + 4, out1); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 4, out1, lid); i += 16; if (((out1[0] & 0x00ffffff) != 0x00000503) && (out1[0] != 0x050307A0)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); i = 0; j = 0; @@ -181,10 +181,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_transform (w0, w1, w2, w3, ipad); } @@ -208,7 +208,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); @@ -221,8 +221,8 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); @@ -235,9 +235,9 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); @@ -250,10 +250,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); @@ -318,7 +318,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, const u32 pw_len, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { /** * pads @@ -454,15 +454,12 @@ DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, cons hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest); } -DECLSPEC void m13100 (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (krb5tgs_t)) +DECLSPEC void m13100 (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (krb5tgs_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -503,7 +500,7 @@ DECLSPEC void m13100 (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -519,8 +516,9 @@ KERNEL_FQ void m13100_m04 (KERN_ATTR_ESALT (krb5tgs_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -560,7 +558,7 @@ KERNEL_FQ void m13100_m04 (KERN_ATTR_ESALT (krb5tgs_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m13100 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13100 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13100_m08 (KERN_ATTR_ESALT (krb5tgs_t)) @@ -569,8 +567,9 @@ KERNEL_FQ void m13100_m08 (KERN_ATTR_ESALT (krb5tgs_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -610,7 +609,7 @@ KERNEL_FQ void m13100_m08 (KERN_ATTR_ESALT (krb5tgs_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m13100 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13100 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13100_m16 (KERN_ATTR_ESALT (krb5tgs_t)) @@ -623,8 +622,9 @@ KERNEL_FQ void m13100_s04 (KERN_ATTR_ESALT (krb5tgs_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -664,7 +664,7 @@ KERNEL_FQ void m13100_s04 (KERN_ATTR_ESALT (krb5tgs_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m13100 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13100 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13100_s08 (KERN_ATTR_ESALT (krb5tgs_t)) @@ -673,8 +673,9 @@ KERNEL_FQ void m13100_s08 (KERN_ATTR_ESALT (krb5tgs_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -714,7 +715,7 @@ KERNEL_FQ void m13100_s08 (KERN_ATTR_ESALT (krb5tgs_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m13100 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13100 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13100_s16 (KERN_ATTR_ESALT (krb5tgs_t)) diff --git a/OpenCL/m13100_a3-pure.cl b/OpenCL/m13100_a3-pure.cl index 123a32b25..42e820601 100644 --- a/OpenCL/m13100_a3-pure.cl +++ b/OpenCL/m13100_a3-pure.cl @@ -28,9 +28,9 @@ typedef struct krb5tgs } krb5tgs_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; u32 out1[4]; @@ -49,15 +49,15 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 next headers follow the same ASN1 "type-length-data" scheme */ - j = rc4_next_16_global (S, i, j, edata2 + 0, out0); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 0, out0, lid); i += 16; if (((out0[2] & 0xff00ffff) != 0x30008163) && ((out0[2] & 0x0000ffff) != 0x00008263)) return 0; - j = rc4_next_16_global (S, i, j, edata2 + 4, out1); i += 16; + j = rc4_next_16_global (S, i, j, edata2 + 4, out1, lid); i += 16; if (((out1[0] & 0x00ffffff) != 0x00000503) && (out1[0] != 0x050307A0)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); i = 0; j = 0; @@ -94,10 +94,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_hmac_update_64 (&ctx, w0, w1, w2, w3, 64); } @@ -121,31 +121,31 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); } @@ -162,7 +162,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *K, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -327,7 +327,7 @@ KERNEL_FQ void m13100_mxx (KERN_ATTR_VECTOR_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -398,7 +398,7 @@ KERNEL_FQ void m13100_sxx (KERN_ATTR_VECTOR_ESALT (krb5tgs_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m13300_a3-optimized.cl b/OpenCL/m13300_a3-optimized.cl index 9e0cae70e..f5205d5b0 100644 --- a/OpenCL/m13300_a3-optimized.cl +++ b/OpenCL/m13300_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m13300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m13300m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -268,15 +265,12 @@ DECLSPEC void m13300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m13300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m13300s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -537,7 +531,9 @@ KERNEL_FQ void m13300_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -566,7 +562,7 @@ KERNEL_FQ void m13300_m04 (KERN_ATTR_VECTOR ()) * main */ - m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13300_m08 (KERN_ATTR_VECTOR ()) @@ -575,7 +571,9 @@ KERNEL_FQ void m13300_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -604,7 +602,7 @@ KERNEL_FQ void m13300_m08 (KERN_ATTR_VECTOR ()) * main */ - m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13300_m16 (KERN_ATTR_VECTOR ()) @@ -613,7 +611,9 @@ KERNEL_FQ void m13300_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -642,7 +642,7 @@ KERNEL_FQ void m13300_m16 (KERN_ATTR_VECTOR ()) * main */ - m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13300m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13300_s04 (KERN_ATTR_VECTOR ()) @@ -651,7 +651,9 @@ KERNEL_FQ void m13300_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -680,7 +682,7 @@ KERNEL_FQ void m13300_s04 (KERN_ATTR_VECTOR ()) * main */ - m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13300_s08 (KERN_ATTR_VECTOR ()) @@ -689,7 +691,9 @@ KERNEL_FQ void m13300_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -718,7 +722,7 @@ KERNEL_FQ void m13300_s08 (KERN_ATTR_VECTOR ()) * main */ - m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13300_s16 (KERN_ATTR_VECTOR ()) @@ -727,7 +731,9 @@ KERNEL_FQ void m13300_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -756,5 +762,5 @@ KERNEL_FQ void m13300_s16 (KERN_ATTR_VECTOR ()) * main */ - m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13300s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m13500_a3-optimized.cl b/OpenCL/m13500_a3-optimized.cl index 18a20ffec..6dc096867 100644 --- a/OpenCL/m13500_a3-optimized.cl +++ b/OpenCL/m13500_a3-optimized.cl @@ -28,15 +28,12 @@ typedef struct pstoken } pstoken_t; -DECLSPEC void m13500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pstoken_t)) +DECLSPEC void m13500m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (pstoken_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -421,15 +418,12 @@ DECLSPEC void m13500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m13500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pstoken_t)) +DECLSPEC void m13500s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (pstoken_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -832,7 +826,9 @@ KERNEL_FQ void m13500_m04 (KERN_ATTR_ESALT (pstoken_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -870,7 +866,7 @@ KERNEL_FQ void m13500_m04 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13500_m08 (KERN_ATTR_ESALT (pstoken_t)) @@ -879,7 +875,9 @@ KERNEL_FQ void m13500_m08 (KERN_ATTR_ESALT (pstoken_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -917,7 +915,7 @@ KERNEL_FQ void m13500_m08 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13500_m16 (KERN_ATTR_ESALT (pstoken_t)) @@ -926,7 +924,9 @@ KERNEL_FQ void m13500_m16 (KERN_ATTR_ESALT (pstoken_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -964,7 +964,7 @@ KERNEL_FQ void m13500_m16 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13500_s04 (KERN_ATTR_ESALT (pstoken_t)) @@ -973,7 +973,9 @@ KERNEL_FQ void m13500_s04 (KERN_ATTR_ESALT (pstoken_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -1011,7 +1013,7 @@ KERNEL_FQ void m13500_s04 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13500_s08 (KERN_ATTR_ESALT (pstoken_t)) @@ -1020,7 +1022,9 @@ KERNEL_FQ void m13500_s08 (KERN_ATTR_ESALT (pstoken_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -1058,7 +1062,7 @@ KERNEL_FQ void m13500_s08 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13500_s16 (KERN_ATTR_ESALT (pstoken_t)) @@ -1067,7 +1071,9 @@ KERNEL_FQ void m13500_s16 (KERN_ATTR_ESALT (pstoken_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -1105,5 +1111,5 @@ KERNEL_FQ void m13500_s16 (KERN_ATTR_ESALT (pstoken_t)) * main */ - m13500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m13600-pure.cl b/OpenCL/m13600-pure.cl index 59c11231a..e53e88133 100644 --- a/OpenCL/m13600-pure.cl +++ b/OpenCL/m13600-pure.cl @@ -46,7 +46,7 @@ typedef struct zip2 } zip2_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13711-pure.cl b/OpenCL/m13711-pure.cl index d23be9de1..69d7be07c 100644 --- a/OpenCL/m13711-pure.cl +++ b/OpenCL/m13711-pure.cl @@ -92,7 +92,7 @@ DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 return -1; } -DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13712-pure.cl b/OpenCL/m13712-pure.cl index e67864d8e..dc455232e 100644 --- a/OpenCL/m13712-pure.cl +++ b/OpenCL/m13712-pure.cl @@ -143,7 +143,7 @@ DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 return -1; } -DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13713-pure.cl b/OpenCL/m13713-pure.cl index 53649ca32..bcf57964e 100644 --- a/OpenCL/m13713-pure.cl +++ b/OpenCL/m13713-pure.cl @@ -208,7 +208,7 @@ DECLSPEC int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 return -1; } -DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13721-pure.cl b/OpenCL/m13721-pure.cl index b0f58fb13..d9ccdaad1 100644 --- a/OpenCL/m13721-pure.cl +++ b/OpenCL/m13721-pure.cl @@ -92,7 +92,7 @@ DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 return -1; } -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13722-pure.cl b/OpenCL/m13722-pure.cl index 47998e363..4087fdcf7 100644 --- a/OpenCL/m13722-pure.cl +++ b/OpenCL/m13722-pure.cl @@ -143,7 +143,7 @@ DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 return -1; } -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13723-pure.cl b/OpenCL/m13723-pure.cl index 6490df68e..2cff7fb81 100644 --- a/OpenCL/m13723-pure.cl +++ b/OpenCL/m13723-pure.cl @@ -208,7 +208,7 @@ DECLSPEC int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 return -1; } -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13731-pure.cl b/OpenCL/m13731-pure.cl index bf98c38d4..9a781fb99 100644 --- a/OpenCL/m13731-pure.cl +++ b/OpenCL/m13731-pure.cl @@ -92,7 +92,7 @@ DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 return -1; } -DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void hmac_whirlpool_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m13732-pure.cl b/OpenCL/m13732-pure.cl index 206216c35..d0f74de09 100644 --- a/OpenCL/m13732-pure.cl +++ b/OpenCL/m13732-pure.cl @@ -143,7 +143,7 @@ DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 return -1; } -DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void hmac_whirlpool_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m13733-pure.cl b/OpenCL/m13733-pure.cl index 569313b6b..8664ac77b 100644 --- a/OpenCL/m13733-pure.cl +++ b/OpenCL/m13733-pure.cl @@ -208,7 +208,7 @@ DECLSPEC int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 return -1; } -DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) +DECLSPEC void hmac_whirlpool_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest, SHM_TYPE u64 *s_MT0, SHM_TYPE u64 *s_MT1, SHM_TYPE u64 *s_MT2, SHM_TYPE u64 *s_MT3, SHM_TYPE u64 *s_MT4, SHM_TYPE u64 *s_MT5, SHM_TYPE u64 *s_MT6, SHM_TYPE u64 *s_MT7) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m13751-pure.cl b/OpenCL/m13751-pure.cl index 115b522b3..6b5684280 100644 --- a/OpenCL/m13751-pure.cl +++ b/OpenCL/m13751-pure.cl @@ -92,7 +92,7 @@ DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 return -1; } -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13752-pure.cl b/OpenCL/m13752-pure.cl index e6ea42d3c..dbbfb5512 100644 --- a/OpenCL/m13752-pure.cl +++ b/OpenCL/m13752-pure.cl @@ -143,7 +143,7 @@ DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 return -1; } -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13753-pure.cl b/OpenCL/m13753-pure.cl index 17fa289a2..b5a3202fc 100644 --- a/OpenCL/m13753-pure.cl +++ b/OpenCL/m13753-pure.cl @@ -208,7 +208,7 @@ DECLSPEC int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 return -1; } -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13771-pure.cl b/OpenCL/m13771-pure.cl index 747c85194..6071f1288 100644 --- a/OpenCL/m13771-pure.cl +++ b/OpenCL/m13771-pure.cl @@ -95,7 +95,7 @@ DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 return -1; } -DECLSPEC void hmac_streebog512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad_hash, u64x *opad_hash, u64x *ipad_raw, u64x *opad_raw, u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void hmac_streebog512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad_hash, PRIVATE_AS u64x *opad_hash, PRIVATE_AS u64x *ipad_raw, PRIVATE_AS u64x *opad_raw, PRIVATE_AS u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) { const u64x nullbuf[8] = { 0 }; u64x counterbuf[8] = { 0 }; diff --git a/OpenCL/m13772-pure.cl b/OpenCL/m13772-pure.cl index aa2c62f47..6467d8a86 100644 --- a/OpenCL/m13772-pure.cl +++ b/OpenCL/m13772-pure.cl @@ -146,7 +146,7 @@ DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 return -1; } -DECLSPEC void hmac_streebog512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad_hash, u64x *opad_hash, u64x *ipad_raw, u64x *opad_raw, u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void hmac_streebog512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad_hash, PRIVATE_AS u64x *opad_hash, PRIVATE_AS u64x *ipad_raw, PRIVATE_AS u64x *opad_raw, PRIVATE_AS u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) { const u64x nullbuf[8] = { 0 }; u64x counterbuf[8] = { 0 }; diff --git a/OpenCL/m13773-pure.cl b/OpenCL/m13773-pure.cl index d064626e2..cf608e6f5 100644 --- a/OpenCL/m13773-pure.cl +++ b/OpenCL/m13773-pure.cl @@ -211,7 +211,7 @@ DECLSPEC int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 return -1; } -DECLSPEC void hmac_streebog512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad_hash, u64x *opad_hash, u64x *ipad_raw, u64x *opad_raw, u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void hmac_streebog512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u64x *ipad_hash, PRIVATE_AS u64x *opad_hash, PRIVATE_AS u64x *ipad_raw, PRIVATE_AS u64x *opad_raw, PRIVATE_AS u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) { const u64x nullbuf[8] = { 0 }; u64x counterbuf[8] = { 0 }; diff --git a/OpenCL/m13800_a0-optimized.cl b/OpenCL/m13800_a0-optimized.cl index b95443640..6510c5b7a 100644 --- a/OpenCL/m13800_a0-optimized.cl +++ b/OpenCL/m13800_a0-optimized.cl @@ -26,12 +26,12 @@ typedef struct win8phone } win8phone_t; -DECLSPEC void sha256_transform_transport_vector (const u32x *w, u32x *digest) +DECLSPEC void sha256_transform_transport_vector (PRIVATE_AS const u32x *w, PRIVATE_AS u32x *digest) { sha256_transform_vector (w + 0, w + 4, w + 8, w + 12, digest); } -DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry) +DECLSPEC void memcat64c_be (PRIVATE_AS u32x *block, const u32 offset, PRIVATE_AS u32x *carry) { const u32 mod = offset & 3; const u32 div = offset / 4; diff --git a/OpenCL/m13800_a1-optimized.cl b/OpenCL/m13800_a1-optimized.cl index 0448c43fb..d09732a10 100644 --- a/OpenCL/m13800_a1-optimized.cl +++ b/OpenCL/m13800_a1-optimized.cl @@ -24,12 +24,12 @@ typedef struct win8phone } win8phone_t; -DECLSPEC void sha256_transform_transport_vector (const u32x *w, u32x *digest) +DECLSPEC void sha256_transform_transport_vector (PRIVATE_AS const u32x *w, PRIVATE_AS u32x *digest) { sha256_transform_vector (w + 0, w + 4, w + 8, w + 12, digest); } -DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry) +DECLSPEC void memcat64c_be (PRIVATE_AS u32x *block, const u32 offset, PRIVATE_AS u32x *carry) { const u32 mod = offset & 3; const u32 div = offset / 4; diff --git a/OpenCL/m13800_a3-optimized.cl b/OpenCL/m13800_a3-optimized.cl index e18b009a8..b94222518 100644 --- a/OpenCL/m13800_a3-optimized.cl +++ b/OpenCL/m13800_a3-optimized.cl @@ -23,12 +23,12 @@ typedef struct win8phone } win8phone_t; -DECLSPEC void sha256_transform_transport_vector (const u32x *w, u32x *digest) +DECLSPEC void sha256_transform_transport_vector (PRIVATE_AS const u32x *w, PRIVATE_AS u32x *digest) { sha256_transform_vector (w + 0, w + 4, w + 8, w + 12, digest); } -DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry) +DECLSPEC void memcat64c_be (PRIVATE_AS u32x *block, const u32 offset, PRIVATE_AS u32x *carry) { const u32 mod = offset & 3; const u32 div = offset / 4; @@ -410,15 +410,12 @@ DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry) } } -DECLSPEC void m13800m (LOCAL_AS u32 *s_esalt, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (win8phone_t)) +DECLSPEC void m13800m (LOCAL_AS u32 *s_esalt, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR_ESALT (win8phone_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -558,15 +555,12 @@ DECLSPEC void m13800m (LOCAL_AS u32 *s_esalt, u32 *w, const u32 pw_len, KERN_ATT } } -DECLSPEC void m13800s (LOCAL_AS u32 *s_esalt, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (win8phone_t)) +DECLSPEC void m13800s (LOCAL_AS u32 *s_esalt, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR_ESALT (win8phone_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -724,8 +718,8 @@ KERNEL_FQ void m13800_m04 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -772,7 +766,7 @@ KERNEL_FQ void m13800_m04 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13800_m08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) @@ -781,8 +775,8 @@ KERNEL_FQ void m13800_m08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -829,7 +823,7 @@ KERNEL_FQ void m13800_m08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13800_m16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) @@ -838,8 +832,8 @@ KERNEL_FQ void m13800_m16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -886,7 +880,7 @@ KERNEL_FQ void m13800_m16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13800m (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13800_s04 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) @@ -895,8 +889,8 @@ KERNEL_FQ void m13800_s04 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -943,7 +937,7 @@ KERNEL_FQ void m13800_s04 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13800_s08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) @@ -952,8 +946,8 @@ KERNEL_FQ void m13800_s08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1000,7 +994,7 @@ KERNEL_FQ void m13800_s08 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m13800_s16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) @@ -1009,8 +1003,8 @@ KERNEL_FQ void m13800_s16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1057,5 +1051,5 @@ KERNEL_FQ void m13800_s16 (KERN_ATTR_VECTOR_ESALT (win8phone_t)) * main */ - m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m13800s (s_esalt, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m13900_a3-optimized.cl b/OpenCL/m13900_a3-optimized.cl index a4fcac465..caee25815 100644 --- a/OpenCL/m13900_a3-optimized.cl +++ b/OpenCL/m13900_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8_le(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m13900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m13900m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -212,15 +209,12 @@ DECLSPEC void m13900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m13900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m13900s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -424,8 +418,8 @@ KERNEL_FQ void m13900_m04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -485,7 +479,7 @@ KERNEL_FQ void m13900_m04 (KERN_ATTR_BASIC ()) * main */ - m13900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m13900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m13900_m08 (KERN_ATTR_BASIC ()) @@ -494,8 +488,8 @@ KERNEL_FQ void m13900_m08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -555,7 +549,7 @@ KERNEL_FQ void m13900_m08 (KERN_ATTR_BASIC ()) * main */ - m13900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m13900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m13900_m16 (KERN_ATTR_BASIC ()) @@ -564,8 +558,8 @@ KERNEL_FQ void m13900_m16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -625,7 +619,7 @@ KERNEL_FQ void m13900_m16 (KERN_ATTR_BASIC ()) * main */ - m13900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m13900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m13900_s04 (KERN_ATTR_BASIC ()) @@ -634,8 +628,8 @@ KERNEL_FQ void m13900_s04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -695,7 +689,7 @@ KERNEL_FQ void m13900_s04 (KERN_ATTR_BASIC ()) * main */ - m13900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m13900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m13900_s08 (KERN_ATTR_BASIC ()) @@ -704,8 +698,8 @@ KERNEL_FQ void m13900_s08 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -765,7 +759,7 @@ KERNEL_FQ void m13900_s08 (KERN_ATTR_BASIC ()) * main */ - m13900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m13900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m13900_s16 (KERN_ATTR_BASIC ()) @@ -774,8 +768,8 @@ KERNEL_FQ void m13900_s16 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -835,5 +829,5 @@ KERNEL_FQ void m13900_s16 (KERN_ATTR_BASIC ()) * main */ - m13900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m13900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m14000_a0-pure.cl b/OpenCL/m14000_a0-pure.cl index efe8be232..dc6d1a014 100644 --- a/OpenCL/m14000_a0-pure.cl +++ b/OpenCL/m14000_a0-pure.cl @@ -384,7 +384,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX1(i,S) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32 *data, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -428,7 +428,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; diff --git a/OpenCL/m14000_a1-pure.cl b/OpenCL/m14000_a1-pure.cl index 34f88198a..c5c5a7f65 100644 --- a/OpenCL/m14000_a1-pure.cl +++ b/OpenCL/m14000_a1-pure.cl @@ -374,7 +374,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX1(i,S) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32 *data, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -418,7 +418,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; diff --git a/OpenCL/m14000_a3-pure.cl b/OpenCL/m14000_a3-pure.cl index 11508f92a..14b973c02 100644 --- a/OpenCL/m14000_a3-pure.cl +++ b/OpenCL/m14000_a3-pure.cl @@ -58,7 +58,7 @@ #define LUT(a,b,c,d,e) u32 a; asm ("lop3.b32 %0, %1, %2, %3, "#e";" : "=r"(a): "r"(b), "r"(c), "r"(d)); -DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(xAA55AA5500550055, a1, a4, a6, 0xC1) LUT(xA55AA55AF0F5F0F5, a3, a6, xAA55AA5500550055, 0x9E) @@ -92,7 +92,7 @@ DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(xEEEEEEEE99999999, a1, a2, a6, 0x97) LUT(xFFFFEEEE66666666, a5, a6, xEEEEEEEE99999999, 0x67) @@ -125,7 +125,7 @@ DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(xA50FA50FA50FA50F, a1, a3, a4, 0xC9) LUT(xF0F00F0FF0F0F0F0, a3, a5, a6, 0x4B) @@ -159,7 +159,7 @@ DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(x55F055F055F055F0, a1, a3, a4, 0x72) LUT(xA500F5F0A500F5F0, a3, a5, x55F055F055F055F0, 0xAD) @@ -186,7 +186,7 @@ DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(xA0A0A0A0FFFFFFFF, a1, a3, a6, 0xAB) LUT(xFFFF00005555FFFF, a1, a5, a6, 0xB9) @@ -220,7 +220,7 @@ DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(x5050F5F55050F5F5, a1, a3, a5, 0xB2) LUT(x6363C6C66363C6C6, a1, a2, x5050F5F55050F5F5, 0x66) @@ -253,7 +253,7 @@ DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(x88AA88AA88AA88AA, a1, a2, a4, 0x0B) LUT(xAAAAFF00AAAAFF00, a1, a4, a5, 0x27) @@ -286,7 +286,7 @@ DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x4; } -DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { LUT(xEEEE3333EEEE3333, a1, a2, a5, 0x9D) LUT(xBBBBBBBBBBBBBBBB, a1, a1, a2, 0x83) @@ -344,7 +344,7 @@ DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -419,7 +419,7 @@ DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -490,7 +490,7 @@ DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -561,7 +561,7 @@ DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out3 ^= x21; } -DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -615,7 +615,7 @@ DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -688,7 +688,7 @@ DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -761,7 +761,7 @@ DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out1 ^= x01; } -DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -832,7 +832,7 @@ DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -925,7 +925,7 @@ DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -1000,7 +1000,7 @@ DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -1071,7 +1071,7 @@ DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -1142,7 +1142,7 @@ DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out3 ^= x21; } -DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -1196,7 +1196,7 @@ DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out4 ^= x31; } -DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -1269,7 +1269,7 @@ DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -1342,7 +1342,7 @@ DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out1 ^= x01; } -DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -1413,7 +1413,7 @@ DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const *out2 ^= x11; } -DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2, PRIVATE_AS u32 *out3, PRIVATE_AS u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -1532,7 +1532,7 @@ DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const #define KEYSET07 { k00 = K31; k01 = K35; k02 = K52; k03 = K43; k04 = K08; k05 = K37; k06 = K51; k07 = K15; k08 = K49; k09 = K30; k10 = K07; k11 = K02; k12 = K50; k13 = K21; k14 = K45; k15 = K44; k16 = K29; k17 = K16; k18 = K42; k19 = K23; k20 = K22; k21 = K14; k22 = K38; k23 = K01; k24 = K10; k25 = K47; k26 = K53; k27 = K11; k28 = K27; k29 = K26; k30 = K05; k31 = K17; k32 = K54; k33 = K41; k34 = K39; k35 = K20; k36 = K48; k37 = K13; k38 = K24; k39 = K19; k40 = K32; k41 = K40; k42 = K34; k43 = K03; k44 = K06; k45 = K18; k46 = K12; k47 = K46; } #define KEYSET17 { k00 = K15; k01 = K51; k02 = K36; k03 = K02; k04 = K49; k05 = K21; k06 = K35; k07 = K31; k08 = K08; k09 = K14; k10 = K23; k11 = K43; k12 = K09; k13 = K37; k14 = K29; k15 = K28; k16 = K45; k17 = K00; k18 = K01; k19 = K07; k20 = K38; k21 = K30; k22 = K22; k23 = K42; k24 = K26; k25 = K04; k26 = K41; k27 = K54; k28 = K39; k29 = K10; k30 = K48; k31 = K33; k32 = K11; k33 = K53; k34 = K27; k35 = K32; k36 = K05; k37 = K25; k38 = K40; k39 = K03; k40 = K20; k41 = K24; k42 = K46; k43 = K19; k44 = K18; k45 = K06; k46 = K55; k47 = K34; } -DECLSPEC void DES (const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) +DECLSPEC void DES (const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, PRIVATE_AS u32 *D00, PRIVATE_AS u32 *D01, PRIVATE_AS u32 *D02, PRIVATE_AS u32 *D03, PRIVATE_AS u32 *D04, PRIVATE_AS u32 *D05, PRIVATE_AS u32 *D06, PRIVATE_AS u32 *D07, PRIVATE_AS u32 *D08, PRIVATE_AS u32 *D09, PRIVATE_AS u32 *D10, PRIVATE_AS u32 *D11, PRIVATE_AS u32 *D12, PRIVATE_AS u32 *D13, PRIVATE_AS u32 *D14, PRIVATE_AS u32 *D15, PRIVATE_AS u32 *D16, PRIVATE_AS u32 *D17, PRIVATE_AS u32 *D18, PRIVATE_AS u32 *D19, PRIVATE_AS u32 *D20, PRIVATE_AS u32 *D21, PRIVATE_AS u32 *D22, PRIVATE_AS u32 *D23, PRIVATE_AS u32 *D24, PRIVATE_AS u32 *D25, PRIVATE_AS u32 *D26, PRIVATE_AS u32 *D27, PRIVATE_AS u32 *D28, PRIVATE_AS u32 *D29, PRIVATE_AS u32 *D30, PRIVATE_AS u32 *D31, PRIVATE_AS u32 *D32, PRIVATE_AS u32 *D33, PRIVATE_AS u32 *D34, PRIVATE_AS u32 *D35, PRIVATE_AS u32 *D36, PRIVATE_AS u32 *D37, PRIVATE_AS u32 *D38, PRIVATE_AS u32 *D39, PRIVATE_AS u32 *D40, PRIVATE_AS u32 *D41, PRIVATE_AS u32 *D42, PRIVATE_AS u32 *D43, PRIVATE_AS u32 *D44, PRIVATE_AS u32 *D45, PRIVATE_AS u32 *D46, PRIVATE_AS u32 *D47, PRIVATE_AS u32 *D48, PRIVATE_AS u32 *D49, PRIVATE_AS u32 *D50, PRIVATE_AS u32 *D51, PRIVATE_AS u32 *D52, PRIVATE_AS u32 *D53, PRIVATE_AS u32 *D54, PRIVATE_AS u32 *D55, PRIVATE_AS u32 *D56, PRIVATE_AS u32 *D57, PRIVATE_AS u32 *D58, PRIVATE_AS u32 *D59, PRIVATE_AS u32 *D60, PRIVATE_AS u32 *D61, PRIVATE_AS u32 *D62, PRIVATE_AS u32 *D63) { KXX_DECL u32 k00, k01, k02, k03, k04, k05; KXX_DECL u32 k06, k07, k08, k09, k10, k11; @@ -1638,7 +1638,7 @@ DECLSPEC void DES (const u32 K00, const u32 K01, const u32 K02, const u32 K03, c } } -DECLSPEC void transpose32c (u32 *data) +DECLSPEC void transpose32c (PRIVATE_AS u32 *data) { #define swap(x,y,j,m) \ t = ((x) ^ ((y) >> (j))) & (m); \ @@ -1733,7 +1733,7 @@ DECLSPEC void transpose32c (u32 *data) // transpose bitslice mod : attention race conditions, need different buffers for *in and *out // -KERNEL_FQ void m14000_tm (GLOBAL_AS u32 *mod, GLOBAL_AS bs_word_t *words_buf_b) +KERNEL_FQ void m14000_tm (KERN_ATTR_TM) { const u64 gid = get_global_id (0); diff --git a/OpenCL/m14100_a0-pure.cl b/OpenCL/m14100_a0-pure.cl index e939680cb..e99f68e73 100644 --- a/OpenCL/m14100_a0-pure.cl +++ b/OpenCL/m14100_a0-pure.cl @@ -384,7 +384,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX1(i,S) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32 *data, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -428,7 +428,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC void _des_crypt_decrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_decrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32 *data, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -472,7 +472,7 @@ DECLSPEC void _des_crypt_decrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; diff --git a/OpenCL/m14100_a1-pure.cl b/OpenCL/m14100_a1-pure.cl index 7c420ef4d..9c2fd7ae9 100644 --- a/OpenCL/m14100_a1-pure.cl +++ b/OpenCL/m14100_a1-pure.cl @@ -374,7 +374,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX1(i,S) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32 *data, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -418,7 +418,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC void _des_crypt_decrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_decrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32 *data, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -462,7 +462,7 @@ DECLSPEC void _des_crypt_decrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; diff --git a/OpenCL/m14100_a3-pure.cl b/OpenCL/m14100_a3-pure.cl index 0c0337b0e..659edb81e 100644 --- a/OpenCL/m14100_a3-pure.cl +++ b/OpenCL/m14100_a3-pure.cl @@ -374,7 +374,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX1(i,S) make_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], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32x *iv, PRIVATE_AS u32x *data, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32x r = hc_rotl32 (data[0], 3u); u32x l = hc_rotl32 (data[1], 3u); @@ -418,7 +418,7 @@ DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCA iv[1] = hc_rotl32 (r, 29u); } -DECLSPEC void _des_crypt_decrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_decrypt (PRIVATE_AS u32x *iv, PRIVATE_AS u32x *data, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32x r = hc_rotl32 (data[0], 3u); u32x l = hc_rotl32 (data[1], 3u); @@ -462,7 +462,7 @@ DECLSPEC void _des_crypt_decrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCA iv[1] = hc_rotl32 (r, 29u); } -DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32x tt; @@ -534,15 +534,12 @@ DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS } } -DECLSPEC void m14100m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m14100m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -623,15 +620,12 @@ DECLSPEC void m14100m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], } } -DECLSPEC void m14100s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m14100s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -745,8 +739,8 @@ KERNEL_FQ void m14100_mxx (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -810,7 +804,7 @@ KERNEL_FQ void m14100_mxx (KERN_ATTR_BASIC ()) * main */ - m14100m (s_SPtrans, s_skb, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m14100m (s_SPtrans, s_skb, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m14100_sxx (KERN_ATTR_BASIC ()) @@ -819,8 +813,8 @@ KERNEL_FQ void m14100_sxx (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -884,5 +878,5 @@ KERNEL_FQ void m14100_sxx (KERN_ATTR_BASIC ()) * main */ - m14100s (s_SPtrans, s_skb, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m14100s (s_SPtrans, s_skb, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m14400_a0-optimized.cl b/OpenCL/m14400_a0-optimized.cl index 3adbbce34..ae55005e3 100644 --- a/OpenCL/m14400_a0-optimized.cl +++ b/OpenCL/m14400_a0-optimized.cl @@ -29,7 +29,7 @@ #define uint_to_hex_lower8_le(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 src_r0) +DECLSPEC void append_4 (const u32 offset, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 src_r0) { u32 tmp[2]; @@ -101,7 +101,7 @@ DECLSPEC void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, co } } -DECLSPEC void shift_2 (u32 *w0, u32 *w1, u32 *w2, u32 *w3) +DECLSPEC void shift_2 (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3) { w3[3] = w3[2] >> 16 | w3[3] << 16; w3[2] = w3[1] >> 16 | w3[2] << 16; diff --git a/OpenCL/m14400_a1-optimized.cl b/OpenCL/m14400_a1-optimized.cl index 230972481..2ae451316 100644 --- a/OpenCL/m14400_a1-optimized.cl +++ b/OpenCL/m14400_a1-optimized.cl @@ -29,7 +29,7 @@ #define uint_to_hex_lower8_le(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 src_r0) +DECLSPEC void append_4 (const u32 offset, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 src_r0) { u32 tmp[2]; @@ -101,7 +101,7 @@ DECLSPEC void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, co } } -DECLSPEC void shift_2 (u32 *w0, u32 *w1, u32 *w2, u32 *w3) +DECLSPEC void shift_2 (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3) { w3[3] = w3[2] >> 16 | w3[3] << 16; w3[2] = w3[1] >> 16 | w3[2] << 16; diff --git a/OpenCL/m14400_a3-optimized.cl b/OpenCL/m14400_a3-optimized.cl index 55ccf0f5d..1a648e847 100644 --- a/OpenCL/m14400_a3-optimized.cl +++ b/OpenCL/m14400_a3-optimized.cl @@ -29,7 +29,7 @@ #define uint_to_hex_lower8_le(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 src_r0) +DECLSPEC void append_4 (const u32 offset, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 src_r0) { u32 tmp[2]; @@ -101,7 +101,7 @@ DECLSPEC void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, co } } -DECLSPEC void shift_2 (u32 *w0, u32 *w1, u32 *w2, u32 *w3) +DECLSPEC void shift_2 (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3) { w3[3] = w3[2] >> 16 | w3[3] << 16; w3[2] = w3[1] >> 16 | w3[2] << 16; @@ -121,15 +121,12 @@ DECLSPEC void shift_2 (u32 *w0, u32 *w1, u32 *w2, u32 *w3) w0[0] = 0 | w0[0] << 16; } -DECLSPEC void m14400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m14400m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -370,15 +367,12 @@ DECLSPEC void m14400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m14400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m14400s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -637,8 +631,8 @@ KERNEL_FQ void m14400_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -698,7 +692,7 @@ KERNEL_FQ void m14400_m04 (KERN_ATTR_BASIC ()) * main */ - m14400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m14400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m14400_m08 (KERN_ATTR_BASIC ()) @@ -707,8 +701,8 @@ KERNEL_FQ void m14400_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -768,7 +762,7 @@ KERNEL_FQ void m14400_m08 (KERN_ATTR_BASIC ()) * main */ - m14400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m14400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m14400_m16 (KERN_ATTR_BASIC ()) @@ -777,8 +771,8 @@ KERNEL_FQ void m14400_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -838,7 +832,7 @@ KERNEL_FQ void m14400_m16 (KERN_ATTR_BASIC ()) * main */ - m14400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m14400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m14400_s04 (KERN_ATTR_BASIC ()) @@ -847,8 +841,8 @@ KERNEL_FQ void m14400_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -908,7 +902,7 @@ KERNEL_FQ void m14400_s04 (KERN_ATTR_BASIC ()) * main */ - m14400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m14400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m14400_s08 (KERN_ATTR_BASIC ()) @@ -917,8 +911,8 @@ KERNEL_FQ void m14400_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -978,7 +972,7 @@ KERNEL_FQ void m14400_s08 (KERN_ATTR_BASIC ()) * main */ - m14400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m14400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m14400_s16 (KERN_ATTR_BASIC ()) @@ -987,8 +981,8 @@ KERNEL_FQ void m14400_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1048,5 +1042,5 @@ KERNEL_FQ void m14400_s16 (KERN_ATTR_BASIC ()) * main */ - m14400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m14400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m14611-pure.cl b/OpenCL/m14611-pure.cl index c1cbc445f..8ea5469ba 100644 --- a/OpenCL/m14611-pure.cl +++ b/OpenCL/m14611-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14612-pure.cl b/OpenCL/m14612-pure.cl index 04d57b32b..623cef1f2 100644 --- a/OpenCL/m14612-pure.cl +++ b/OpenCL/m14612-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14613-pure.cl b/OpenCL/m14613-pure.cl index d629d55b2..e0da32e5b 100644 --- a/OpenCL/m14613-pure.cl +++ b/OpenCL/m14613-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14621-pure.cl b/OpenCL/m14621-pure.cl index cda96a5cb..67b5e1d95 100644 --- a/OpenCL/m14621-pure.cl +++ b/OpenCL/m14621-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14622-pure.cl b/OpenCL/m14622-pure.cl index 69b93ab2e..1a530d2f4 100644 --- a/OpenCL/m14622-pure.cl +++ b/OpenCL/m14622-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14623-pure.cl b/OpenCL/m14623-pure.cl index 0a5629e53..bb2cd1ae6 100644 --- a/OpenCL/m14623-pure.cl +++ b/OpenCL/m14623-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14631-pure.cl b/OpenCL/m14631-pure.cl index 102bde4b1..2791ca5a5 100644 --- a/OpenCL/m14631-pure.cl +++ b/OpenCL/m14631-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14632-pure.cl b/OpenCL/m14632-pure.cl index a321cb787..4882c190f 100644 --- a/OpenCL/m14632-pure.cl +++ b/OpenCL/m14632-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14633-pure.cl b/OpenCL/m14633-pure.cl index 7fdeb32da..909b6d1aa 100644 --- a/OpenCL/m14633-pure.cl +++ b/OpenCL/m14633-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14641-pure.cl b/OpenCL/m14641-pure.cl index 7eb3ccd34..994a8a345 100644 --- a/OpenCL/m14641-pure.cl +++ b/OpenCL/m14641-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14642-pure.cl b/OpenCL/m14642-pure.cl index f45a66ff7..0b14823fa 100644 --- a/OpenCL/m14642-pure.cl +++ b/OpenCL/m14642-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14643-pure.cl b/OpenCL/m14643-pure.cl index 6f72cc186..d0bf1706e 100644 --- a/OpenCL/m14643-pure.cl +++ b/OpenCL/m14643-pure.cl @@ -98,7 +98,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14700-pure.cl b/OpenCL/m14700-pure.cl index 5b77a7c17..8f52fc462 100644 --- a/OpenCL/m14700-pure.cl +++ b/OpenCL/m14700-pure.cl @@ -38,7 +38,7 @@ typedef struct pbkdf2_sha1_tmp } pbkdf2_sha1_tmp_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14800-pure.cl b/OpenCL/m14800-pure.cl index 924619cbc..d75afe79e 100644 --- a/OpenCL/m14800-pure.cl +++ b/OpenCL/m14800-pure.cl @@ -36,7 +36,7 @@ typedef struct pbkdf2_sha256_tmp } pbkdf2_sha256_tmp_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -72,7 +72,7 @@ DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14900_a0-optimized.cl b/OpenCL/m14900_a0-optimized.cl index cbabfed09..affa60ee9 100644 --- a/OpenCL/m14900_a0-optimized.cl +++ b/OpenCL/m14900_a0-optimized.cl @@ -55,7 +55,7 @@ CONSTANT_VK u8a c_ftable[256] = 0xbd, 0xa8, 0x3a, 0x01, 0x05, 0x59, 0x2a, 0x46 }; -DECLSPEC void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) +DECLSPEC void g (LOCAL_AS u8 *s_ftable, PRIVATE_AS const u32 *key, const int k, PRIVATE_AS const u32 *wx, PRIVATE_AS u32 *out) { const u32 g1 = wx[1]; const u32 g2 = wx[0]; @@ -68,7 +68,7 @@ DECLSPEC void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 * out[1] = g5; } -DECLSPEC u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, const u32 *key) +DECLSPEC u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, PRIVATE_AS const u32 *key) { u32 wl[2]; u32 wr[2]; diff --git a/OpenCL/m14900_a1-optimized.cl b/OpenCL/m14900_a1-optimized.cl index 0a9941206..7c1ee48ba 100644 --- a/OpenCL/m14900_a1-optimized.cl +++ b/OpenCL/m14900_a1-optimized.cl @@ -53,7 +53,7 @@ CONSTANT_VK u8a c_ftable[256] = 0xbd, 0xa8, 0x3a, 0x01, 0x05, 0x59, 0x2a, 0x46 }; -DECLSPEC void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) +DECLSPEC void g (LOCAL_AS u8 *s_ftable, PRIVATE_AS const u32 *key, const int k, PRIVATE_AS const u32 *wx, PRIVATE_AS u32 *out) { const u32 g1 = wx[1]; const u32 g2 = wx[0]; @@ -66,7 +66,7 @@ DECLSPEC void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 * out[1] = g5; } -DECLSPEC u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, const u32 *key) +DECLSPEC u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, PRIVATE_AS const u32 *key) { u32 wl[2]; u32 wr[2]; diff --git a/OpenCL/m14900_a3-optimized.cl b/OpenCL/m14900_a3-optimized.cl index 182936c11..a8a092034 100644 --- a/OpenCL/m14900_a3-optimized.cl +++ b/OpenCL/m14900_a3-optimized.cl @@ -53,7 +53,7 @@ CONSTANT_VK u8a c_ftable[256] = 0xbd, 0xa8, 0x3a, 0x01, 0x05, 0x59, 0x2a, 0x46 }; -DECLSPEC void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) +DECLSPEC void g (LOCAL_AS u8 *s_ftable, PRIVATE_AS const u32 *key, const int k, PRIVATE_AS const u32 *wx, PRIVATE_AS u32 *out) { const u32 g1 = wx[1]; const u32 g2 = wx[0]; @@ -66,7 +66,7 @@ DECLSPEC void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 * out[1] = g5; } -DECLSPEC u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, const u32 *key) +DECLSPEC u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, PRIVATE_AS const u32 *key) { u32 wl[2]; u32 wr[2]; @@ -106,15 +106,12 @@ DECLSPEC u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, const u32 *key) return r; } -DECLSPEC void m14900m (LOCAL_AS u8 *s_ftable, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m14900m (LOCAL_AS u8 *s_ftable, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -154,15 +151,12 @@ DECLSPEC void m14900m (LOCAL_AS u8 *s_ftable, u32 *w0, u32 *w1, u32 *w2, u32 *w3 } } -DECLSPEC void m14900s (LOCAL_AS u8 *s_ftable, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m14900s (LOCAL_AS u8 *s_ftable, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -220,8 +214,8 @@ KERNEL_FQ void m14900_m04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -277,7 +271,7 @@ KERNEL_FQ void m14900_m04 (KERN_ATTR_BASIC ()) * main */ - m14900m (s_ftable, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m14900m (s_ftable, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m14900_m08 (KERN_ATTR_BASIC ()) @@ -294,8 +288,8 @@ KERNEL_FQ void m14900_s04 (KERN_ATTR_BASIC ()) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -351,7 +345,7 @@ KERNEL_FQ void m14900_s04 (KERN_ATTR_BASIC ()) * main */ - m14900s (s_ftable, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m14900s (s_ftable, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m14900_s08 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m15000_a0-optimized.cl b/OpenCL/m15000_a0-optimized.cl index beee3acac..19fe93ade 100644 --- a/OpenCL/m15000_a0-optimized.cl +++ b/OpenCL/m15000_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS const u32x *w4, PRIVATE_AS const u32x *w5, PRIVATE_AS const u32x *w6, PRIVATE_AS const u32x *w7, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m15000_a1-optimized.cl b/OpenCL/m15000_a1-optimized.cl index ce34656ae..22dbd3523 100644 --- a/OpenCL/m15000_a1-optimized.cl +++ b/OpenCL/m15000_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS const u32x *w4, PRIVATE_AS const u32x *w5, PRIVATE_AS const u32x *w6, PRIVATE_AS const u32x *w7, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m15000_a3-optimized.cl b/OpenCL/m15000_a3-optimized.cl index 363cd7b3c..312c2d767 100644 --- a/OpenCL/m15000_a3-optimized.cl +++ b/OpenCL/m15000_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS const u32x *w4, PRIVATE_AS const u32x *w5, PRIVATE_AS const u32x *w6, PRIVATE_AS const u32x *w7, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -116,15 +116,12 @@ DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = h; } -DECLSPEC void m15000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m15000m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -275,15 +272,12 @@ DECLSPEC void m15000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m15000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m15000s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -452,7 +446,9 @@ KERNEL_FQ void m15000_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -481,7 +477,7 @@ KERNEL_FQ void m15000_m04 (KERN_ATTR_VECTOR ()) * main */ - m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m15000_m08 (KERN_ATTR_VECTOR ()) @@ -490,7 +486,9 @@ KERNEL_FQ void m15000_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -519,7 +517,7 @@ KERNEL_FQ void m15000_m08 (KERN_ATTR_VECTOR ()) * main */ - m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m15000_m16 (KERN_ATTR_VECTOR ()) @@ -528,7 +526,9 @@ KERNEL_FQ void m15000_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -557,7 +557,7 @@ KERNEL_FQ void m15000_m16 (KERN_ATTR_VECTOR ()) * main */ - m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m15000_s04 (KERN_ATTR_VECTOR ()) @@ -566,7 +566,9 @@ KERNEL_FQ void m15000_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -595,7 +597,7 @@ KERNEL_FQ void m15000_s04 (KERN_ATTR_VECTOR ()) * main */ - m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m15000_s08 (KERN_ATTR_VECTOR ()) @@ -604,7 +606,9 @@ KERNEL_FQ void m15000_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -633,7 +637,7 @@ KERNEL_FQ void m15000_s08 (KERN_ATTR_VECTOR ()) * main */ - m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m15000_s16 (KERN_ATTR_VECTOR ()) @@ -642,7 +646,9 @@ KERNEL_FQ void m15000_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -671,5 +677,5 @@ KERNEL_FQ void m15000_s16 (KERN_ATTR_VECTOR ()) * main */ - m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m15100-pure.cl b/OpenCL/m15100-pure.cl index 0d918a7f2..026af0989 100644 --- a/OpenCL/m15100-pure.cl +++ b/OpenCL/m15100-pure.cl @@ -31,7 +31,7 @@ typedef struct pbkdf1_sha1_tmp } pbkdf1_sha1_tmp_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m15300-pure.cl b/OpenCL/m15300-pure.cl index 668686012..d3b022f7a 100644 --- a/OpenCL/m15300-pure.cl +++ b/OpenCL/m15300-pure.cl @@ -53,7 +53,7 @@ typedef struct dpapimk_tmp_v1 } dpapimk_tmp_v1_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m15400_a0-optimized.cl b/OpenCL/m15400_a0-optimized.cl index c5c2eb392..cd066a916 100644 --- a/OpenCL/m15400_a0-optimized.cl +++ b/OpenCL/m15400_a0-optimized.cl @@ -44,7 +44,7 @@ typedef struct chacha20 x[b] = hc_rotl32 (x[b] ^ x[c], 7); \ } while (0); -DECLSPEC void chacha20_transform (const u32x *w0, const u32x *w1, const u32 *position, const u32 offset, const u32 *iv, const u32 *plain, u32x *digest) +DECLSPEC void chacha20_transform (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32 *position, const u32 offset, PRIVATE_AS const u32 *iv, PRIVATE_AS const u32 *plain, PRIVATE_AS u32x *digest) { /** * Key expansion diff --git a/OpenCL/m15400_a1-optimized.cl b/OpenCL/m15400_a1-optimized.cl index 1365dd819..8c26c6685 100644 --- a/OpenCL/m15400_a1-optimized.cl +++ b/OpenCL/m15400_a1-optimized.cl @@ -42,7 +42,7 @@ typedef struct chacha20 x[b] = hc_rotl32 (x[b] ^ x[c], 7); \ } while (0); -DECLSPEC void chacha20_transform (const u32x *w0, const u32x *w1, const u32 *position, const u32 offset, const u32 *iv, const u32 *plain, u32x *digest) +DECLSPEC void chacha20_transform (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32 *position, const u32 offset, PRIVATE_AS const u32 *iv, PRIVATE_AS const u32 *plain, PRIVATE_AS u32x *digest) { /** * Key expansion diff --git a/OpenCL/m15400_a3-optimized.cl b/OpenCL/m15400_a3-optimized.cl index 2317a3a99..502fec55a 100644 --- a/OpenCL/m15400_a3-optimized.cl +++ b/OpenCL/m15400_a3-optimized.cl @@ -42,7 +42,7 @@ typedef struct chacha20 x[b] = hc_rotl32 (x[b] ^ x[c], 7); \ } while (0); -DECLSPEC void chacha20_transform (const u32x *w0, const u32x *w1, const u32 *position, const u32 offset, const u32 *iv, const u32 *plain, u32x *digest) +DECLSPEC void chacha20_transform (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32 *position, const u32 offset, PRIVATE_AS const u32 *iv, PRIVATE_AS const u32 *plain, PRIVATE_AS u32x *digest) { /** * Key expansion diff --git a/OpenCL/m15500_a3-optimized.cl b/OpenCL/m15500_a3-optimized.cl index bdb78d696..b3f83568b 100644 --- a/OpenCL/m15500_a3-optimized.cl +++ b/OpenCL/m15500_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void m15500m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m15500m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -321,15 +318,12 @@ DECLSPEC void m15500m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m15500s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m15500s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * base */ @@ -595,7 +589,9 @@ KERNEL_FQ void m15500_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -624,7 +620,7 @@ KERNEL_FQ void m15500_m04 (KERN_ATTR_VECTOR ()) * main */ - m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m15500_m08 (KERN_ATTR_VECTOR ()) @@ -633,7 +629,9 @@ KERNEL_FQ void m15500_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -662,7 +660,7 @@ KERNEL_FQ void m15500_m08 (KERN_ATTR_VECTOR ()) * main */ - m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m15500_m16 (KERN_ATTR_VECTOR ()) @@ -671,7 +669,9 @@ KERNEL_FQ void m15500_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -700,7 +700,7 @@ KERNEL_FQ void m15500_m16 (KERN_ATTR_VECTOR ()) * main */ - m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15500m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m15500_s04 (KERN_ATTR_VECTOR ()) @@ -709,7 +709,9 @@ KERNEL_FQ void m15500_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -738,7 +740,7 @@ KERNEL_FQ void m15500_s04 (KERN_ATTR_VECTOR ()) * main */ - m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m15500_s08 (KERN_ATTR_VECTOR ()) @@ -747,7 +749,9 @@ KERNEL_FQ void m15500_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -776,7 +780,7 @@ KERNEL_FQ void m15500_s08 (KERN_ATTR_VECTOR ()) * main */ - m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m15500_s16 (KERN_ATTR_VECTOR ()) @@ -785,7 +789,9 @@ KERNEL_FQ void m15500_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -814,5 +820,5 @@ KERNEL_FQ void m15500_s16 (KERN_ATTR_VECTOR ()) * main */ - m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m15500s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m15600-pure.cl b/OpenCL/m15600-pure.cl index dbd847c84..99227d6cb 100644 --- a/OpenCL/m15600-pure.cl +++ b/OpenCL/m15600-pure.cl @@ -85,7 +85,7 @@ CONSTANT_VK u64a keccakf_rndc[24] = st[4 + s] ^= ~bc0 & bc1; \ } -DECLSPEC void keccak_transform_S (u64 *st) +DECLSPEC void keccak_transform_S (PRIVATE_AS u64 *st) { const u8 keccakf_rotc[24] = { @@ -166,7 +166,7 @@ DECLSPEC void keccak_transform_S (u64 *st) } } -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m15700-pure.cl b/OpenCL/m15700-pure.cl index 86cac1122..3227c7c3f 100644 --- a/OpenCL/m15700-pure.cl +++ b/OpenCL/m15700-pure.cl @@ -89,6 +89,27 @@ DECLSPEC uint4 hc_swap32_4 (uint4 v) X2 = make_uint4 (X2.z, X2.w, X2.x, X2.y); \ X3 = make_uint4 (X3.w, X3.x, X3.y, X3.z); \ } +#elif defined IS_METAL +#define SALSA20_2R() \ +{ \ + ADD_ROTATE_XOR (X1, X0, X3, 7); \ + ADD_ROTATE_XOR (X2, X1, X0, 9); \ + ADD_ROTATE_XOR (X3, X2, X1, 13); \ + ADD_ROTATE_XOR (X0, X3, X2, 18); \ + \ + X1 = X1.wxyz; \ + X2 = X2.zwxy; \ + X3 = X3.yzwx; \ + \ + ADD_ROTATE_XOR (X3, X0, X1, 7); \ + ADD_ROTATE_XOR (X2, X3, X0, 9); \ + ADD_ROTATE_XOR (X1, X2, X3, 13); \ + ADD_ROTATE_XOR (X0, X1, X2, 18); \ + \ + X1 = X1.yzwx; \ + X2 = X2.zwxy; \ + X3 = X3.wxyz; \ +} #else #define SALSA20_2R() \ { \ @@ -115,7 +136,7 @@ DECLSPEC uint4 hc_swap32_4 (uint4 v) #define Coord(xd4,y,z) (((xd4) * ySIZE * zSIZE) + ((y) * zSIZE) + (z)) #define CO Coord(xd4,y,z) -DECLSPEC void salsa_r (uint4 *TI) +DECLSPEC void salsa_r (PRIVATE_AS uint4 *TI) { uint4 R0 = TI[STATE_CNT4 - 4]; uint4 R1 = TI[STATE_CNT4 - 3]; @@ -186,12 +207,12 @@ DECLSPEC void salsa_r (uint4 *TI) #endif } -DECLSPEC void scrypt_smix_init (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix_init (PRIVATE_AS uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3, const u64 gid) { const u32 ySIZE = SCRYPT_N / SCRYPT_TMTO; const u32 zSIZE = STATE_CNT4; - const u32 x = get_global_id (0); + const u32 x = (u32) gid; const u32 xd4 = x / 4; const u32 xm4 = x & 3; @@ -214,12 +235,12 @@ DECLSPEC void scrypt_smix_init (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 * } } -DECLSPEC void scrypt_smix_loop (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix_loop (PRIVATE_AS uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3, const u64 gid) { const u32 ySIZE = SCRYPT_N / SCRYPT_TMTO; const u32 zSIZE = STATE_CNT4; - const u32 x = get_global_id (0); + const u32 x = (u32) gid; const u32 xd4 = x / 4; const u32 xm4 = x & 3; @@ -304,7 +325,7 @@ CONSTANT_VK u64a keccakf_rndc[24] = KECCAK_RNDC_20, KECCAK_RNDC_21, KECCAK_RNDC_22, KECCAK_RNDC_23 }; -DECLSPEC void keccak_transform_S (u64 *st) +DECLSPEC void keccak_transform_S (PRIVATE_AS u64 *st) { const u8 keccakf_rotc[24] = { @@ -515,7 +536,7 @@ KERNEL_FQ void m15700_loop_prepare (KERN_ATTR_TMPS (scrypt_tmp_t)) for (int z = 0; z < STATE_CNT4; z++) X[z] = P[z]; - scrypt_smix_init (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf); + scrypt_smix_init (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf, gid); for (int z = 0; z < STATE_CNT4; z++) P[z] = X[z]; } @@ -540,7 +561,7 @@ KERNEL_FQ void m15700_loop (KERN_ATTR_TMPS (scrypt_tmp_t)) for (int z = 0; z < STATE_CNT4; z++) X[z] = P[z]; - scrypt_smix_loop (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf); + scrypt_smix_loop (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf, gid); for (int z = 0; z < STATE_CNT4; z++) P[z] = X[z]; } diff --git a/OpenCL/m15900-pure.cl b/OpenCL/m15900-pure.cl index 765a44009..99e3be621 100644 --- a/OpenCL/m15900-pure.cl +++ b/OpenCL/m15900-pure.cl @@ -54,7 +54,7 @@ typedef struct dpapimk } dpapimk_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m16000_a0-pure.cl b/OpenCL/m16000_a0-pure.cl index b8a40c6b8..130c620bc 100644 --- a/OpenCL/m16000_a0-pure.cl +++ b/OpenCL/m16000_a0-pure.cl @@ -358,7 +358,7 @@ CONSTANT_VK u32a c_tripcode_salt[128] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -427,7 +427,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u } } -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, u32 mask, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E1 = (mask >> 2) & 0x3f0; const u32 E0 = mask & 0x3f; diff --git a/OpenCL/m16000_a1-pure.cl b/OpenCL/m16000_a1-pure.cl index 5574dc4b3..365f8b1bd 100644 --- a/OpenCL/m16000_a1-pure.cl +++ b/OpenCL/m16000_a1-pure.cl @@ -356,7 +356,7 @@ CONSTANT_VK u32a c_tripcode_salt[128] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -425,7 +425,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u } } -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, u32 mask, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E1 = (mask >> 2) & 0x3f0; const u32 E0 = mask & 0x3f; diff --git a/OpenCL/m16000_a3-pure.cl b/OpenCL/m16000_a3-pure.cl index bebe5f777..31757067f 100644 --- a/OpenCL/m16000_a3-pure.cl +++ b/OpenCL/m16000_a3-pure.cl @@ -356,7 +356,7 @@ CONSTANT_VK u32a c_tripcode_salt[128] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -425,7 +425,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u } } -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, u32 mask, PRIVATE_AS u32x *Kc, PRIVATE_AS u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E1 = (mask >> 2) & 0x3f0; const u32 E0 = mask & 0x3f; diff --git a/OpenCL/m16100_a3-optimized.cl b/OpenCL/m16100_a3-optimized.cl index e01fbf317..80350c1b7 100644 --- a/OpenCL/m16100_a3-optimized.cl +++ b/OpenCL/m16100_a3-optimized.cl @@ -28,15 +28,12 @@ typedef struct tacacs_plus } tacacs_plus_t; -DECLSPEC void m16100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (tacacs_plus_t)) +DECLSPEC void m16100m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (tacacs_plus_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -281,15 +278,12 @@ DECLSPEC void m16100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m16100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (tacacs_plus_t)) +DECLSPEC void m16100s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (tacacs_plus_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -540,7 +534,9 @@ KERNEL_FQ void m16100_m04 (KERN_ATTR_ESALT (tacacs_plus_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -578,7 +574,7 @@ KERNEL_FQ void m16100_m04 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16100_m08 (KERN_ATTR_ESALT (tacacs_plus_t)) @@ -587,7 +583,9 @@ KERNEL_FQ void m16100_m08 (KERN_ATTR_ESALT (tacacs_plus_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -625,7 +623,7 @@ KERNEL_FQ void m16100_m08 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16100_m16 (KERN_ATTR_ESALT (tacacs_plus_t)) @@ -634,7 +632,9 @@ KERNEL_FQ void m16100_m16 (KERN_ATTR_ESALT (tacacs_plus_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -672,7 +672,7 @@ KERNEL_FQ void m16100_m16 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16100_s04 (KERN_ATTR_ESALT (tacacs_plus_t)) @@ -681,7 +681,9 @@ KERNEL_FQ void m16100_s04 (KERN_ATTR_ESALT (tacacs_plus_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -719,7 +721,7 @@ KERNEL_FQ void m16100_s04 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16100_s08 (KERN_ATTR_ESALT (tacacs_plus_t)) @@ -728,7 +730,9 @@ KERNEL_FQ void m16100_s08 (KERN_ATTR_ESALT (tacacs_plus_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -766,7 +770,7 @@ KERNEL_FQ void m16100_s08 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16100_s16 (KERN_ATTR_ESALT (tacacs_plus_t)) @@ -775,7 +779,9 @@ KERNEL_FQ void m16100_s16 (KERN_ATTR_ESALT (tacacs_plus_t)) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -813,5 +819,5 @@ KERNEL_FQ void m16100_s16 (KERN_ATTR_ESALT (tacacs_plus_t)) * main */ - m16100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m16200-pure.cl b/OpenCL/m16200-pure.cl index 7397fd070..888de87ec 100644 --- a/OpenCL/m16200-pure.cl +++ b/OpenCL/m16200-pure.cl @@ -40,7 +40,7 @@ typedef struct apple_secure_notes } apple_secure_notes_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m16300-pure.cl b/OpenCL/m16300-pure.cl index 55c22f3d2..5b8fc86d1 100644 --- a/OpenCL/m16300-pure.cl +++ b/OpenCL/m16300-pure.cl @@ -87,7 +87,7 @@ CONSTANT_VK u64a keccakf_rndc[24] = st[4 + s] ^= ~bc0 & bc1; \ } -DECLSPEC void keccak_transform_S (u64 *st) +DECLSPEC void keccak_transform_S (PRIVATE_AS u64 *st) { const u8 keccakf_rotc[24] = { @@ -168,7 +168,7 @@ DECLSPEC void keccak_transform_S (u64 *st) } } -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m16400_a0-pure.cl b/OpenCL/m16400_a0-pure.cl index b535a7e9f..a01d3d4eb 100644 --- a/OpenCL/m16400_a0-pure.cl +++ b/OpenCL/m16400_a0-pure.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void cram_md5_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void cram_md5_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest) { u32 a = digest[0]; u32 b = digest[1]; @@ -119,7 +119,7 @@ DECLSPEC void cram_md5_transform (const u32 *w0, const u32 *w1, const u32 *w2, c digest[3] += d; } -DECLSPEC void cram_md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void cram_md5_update_64 (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { if (len == 0) return; @@ -147,7 +147,7 @@ DECLSPEC void cram_md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 ctx->w3[3] |= w3[3]; } -DECLSPEC void cram_md5_update (md5_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void cram_md5_update (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -174,7 +174,7 @@ DECLSPEC void cram_md5_update (md5_ctx_t *ctx, const u32 *w, const int len) cram_md5_update_64 (ctx, w0, w1, w2, w3, len); } -DECLSPEC void cram_md5_final (md5_ctx_t *ctx) +DECLSPEC void cram_md5_final (PRIVATE_AS md5_ctx_t *ctx) { cram_md5_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); } diff --git a/OpenCL/m16400_a1-pure.cl b/OpenCL/m16400_a1-pure.cl index fe008cfbe..24de2e025 100644 --- a/OpenCL/m16400_a1-pure.cl +++ b/OpenCL/m16400_a1-pure.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void cram_md5_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void cram_md5_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest) { u32 a = digest[0]; u32 b = digest[1]; @@ -117,7 +117,7 @@ DECLSPEC void cram_md5_transform (const u32 *w0, const u32 *w1, const u32 *w2, c digest[3] += d; } -DECLSPEC void cram_md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void cram_md5_update_64 (PRIVATE_AS md5_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len) { if (len == 0) return; @@ -145,7 +145,7 @@ DECLSPEC void cram_md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 ctx->w3[3] |= w3[3]; } -DECLSPEC void cram_md5_update_global (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void cram_md5_update_global (PRIVATE_AS md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -172,7 +172,7 @@ DECLSPEC void cram_md5_update_global (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, co cram_md5_update_64 (ctx, w0, w1, w2, w3, len); } -DECLSPEC void cram_md5_final (md5_ctx_t *ctx) +DECLSPEC void cram_md5_final (PRIVATE_AS md5_ctx_t *ctx) { cram_md5_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); } diff --git a/OpenCL/m16400_a3-optimized.cl b/OpenCL/m16400_a3-optimized.cl index 7b302509c..b1550a6d1 100644 --- a/OpenCL/m16400_a3-optimized.cl +++ b/OpenCL/m16400_a3-optimized.cl @@ -34,15 +34,12 @@ a -= t; \ } -DECLSPEC void m16400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m16400m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * pad */ @@ -226,15 +223,12 @@ DECLSPEC void m16400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m16400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m16400s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * pad */ @@ -478,7 +472,9 @@ KERNEL_FQ void m16400_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -507,7 +503,7 @@ KERNEL_FQ void m16400_m04 (KERN_ATTR_VECTOR ()) * main */ - m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16400_m08 (KERN_ATTR_VECTOR ()) @@ -516,7 +512,9 @@ KERNEL_FQ void m16400_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -545,7 +543,7 @@ KERNEL_FQ void m16400_m08 (KERN_ATTR_VECTOR ()) * main */ - m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16400_m16 (KERN_ATTR_VECTOR ()) @@ -554,7 +552,9 @@ KERNEL_FQ void m16400_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -583,7 +583,7 @@ KERNEL_FQ void m16400_m16 (KERN_ATTR_VECTOR ()) * main */ - m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16400_s04 (KERN_ATTR_VECTOR ()) @@ -592,7 +592,9 @@ KERNEL_FQ void m16400_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -621,7 +623,7 @@ KERNEL_FQ void m16400_s04 (KERN_ATTR_VECTOR ()) * main */ - m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16400_s08 (KERN_ATTR_VECTOR ()) @@ -630,7 +632,9 @@ KERNEL_FQ void m16400_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -659,7 +663,7 @@ KERNEL_FQ void m16400_s08 (KERN_ATTR_VECTOR ()) * main */ - m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16400_s16 (KERN_ATTR_VECTOR ()) @@ -668,7 +672,9 @@ KERNEL_FQ void m16400_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -697,5 +703,5 @@ KERNEL_FQ void m16400_s16 (KERN_ATTR_VECTOR ()) * main */ - m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m16400_a3-pure.cl b/OpenCL/m16400_a3-pure.cl index 51d92a49a..ab8f8af56 100644 --- a/OpenCL/m16400_a3-pure.cl +++ b/OpenCL/m16400_a3-pure.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void cram_md5_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest) +DECLSPEC void cram_md5_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -117,7 +117,7 @@ DECLSPEC void cram_md5_transform_vector (const u32x *w0, const u32x *w1, const u digest[3] += d; } -DECLSPEC void cram_md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void cram_md5_update_vector_64 (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len) { if (len == 0) return; @@ -145,7 +145,7 @@ DECLSPEC void cram_md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x *w0, u32x * ctx->w3[3] |= w3[3]; } -DECLSPEC void cram_md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void cram_md5_update_vector (PRIVATE_AS md5_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -173,7 +173,7 @@ DECLSPEC void cram_md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, cons } -DECLSPEC void cram_md5_final_vector (md5_ctx_vector_t *ctx) +DECLSPEC void cram_md5_final_vector (PRIVATE_AS md5_ctx_vector_t *ctx) { cram_md5_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); } diff --git a/OpenCL/m16600_a3-optimized.cl b/OpenCL/m16600_a3-optimized.cl index fe8d91019..177d948b4 100644 --- a/OpenCL/m16600_a3-optimized.cl +++ b/OpenCL/m16600_a3-optimized.cl @@ -26,14 +26,12 @@ typedef struct electrum_wallet } electrum_wallet_t; -DECLSPEC void m16600 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_ESALT (electrum_wallet_t)) +DECLSPEC void m16600 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_ESALT (electrum_wallet_t)) { /** - * base + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * data */ @@ -215,8 +213,8 @@ KERNEL_FQ void m16600_m04 (KERN_ATTR_ESALT (electrum_wallet_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -301,7 +299,7 @@ KERNEL_FQ void m16600_m04 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16600_m08 (KERN_ATTR_ESALT (electrum_wallet_t)) @@ -310,8 +308,8 @@ KERNEL_FQ void m16600_m08 (KERN_ATTR_ESALT (electrum_wallet_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -396,7 +394,7 @@ KERNEL_FQ void m16600_m08 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16600_m16 (KERN_ATTR_ESALT (electrum_wallet_t)) @@ -405,8 +403,8 @@ KERNEL_FQ void m16600_m16 (KERN_ATTR_ESALT (electrum_wallet_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -491,7 +489,7 @@ KERNEL_FQ void m16600_m16 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16600_s04 (KERN_ATTR_ESALT (electrum_wallet_t)) @@ -500,8 +498,8 @@ KERNEL_FQ void m16600_s04 (KERN_ATTR_ESALT (electrum_wallet_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -586,7 +584,7 @@ KERNEL_FQ void m16600_s04 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16600_s08 (KERN_ATTR_ESALT (electrum_wallet_t)) @@ -595,8 +593,8 @@ KERNEL_FQ void m16600_s08 (KERN_ATTR_ESALT (electrum_wallet_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -681,7 +679,7 @@ KERNEL_FQ void m16600_s08 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m16600_s16 (KERN_ATTR_ESALT (electrum_wallet_t)) @@ -690,8 +688,8 @@ KERNEL_FQ void m16600_s16 (KERN_ATTR_ESALT (electrum_wallet_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -776,5 +774,5 @@ KERNEL_FQ void m16600_s16 (KERN_ATTR_ESALT (electrum_wallet_t)) * main */ - m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m16600 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m16900-pure.cl b/OpenCL/m16900-pure.cl index 61c5e6c93..22c321054 100644 --- a/OpenCL/m16900-pure.cl +++ b/OpenCL/m16900-pure.cl @@ -39,7 +39,7 @@ typedef struct ansible_vault } ansible_vault_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m17010-pure.cl b/OpenCL/m17010-pure.cl index d70fc1450..d9d1a4c49 100644 --- a/OpenCL/m17010-pure.cl +++ b/OpenCL/m17010-pure.cl @@ -70,7 +70,7 @@ DECLSPEC u32 hc_bytealign_le_S (const u32 a, const u32 b, const int c) return r; } -DECLSPEC void memcat_le_S (u32 *block, const u32 offset, const u32 *append, u32 len) +DECLSPEC void memcat_le_S (PRIVATE_AS u32 *block, const u32 offset, PRIVATE_AS const u32 *append, u32 len) { const u32 start_index = (offset - 1) >> 2; const u32 count = ((offset + len + 3) >> 2) - start_index; @@ -85,7 +85,7 @@ DECLSPEC void memcat_le_S (u32 *block, const u32 offset, const u32 *append, u32 } } -DECLSPEC void memzero_le_S (u32 *block, const u32 start_offset, const u32 end_offset) +DECLSPEC void memzero_le_S (PRIVATE_AS u32 *block, const u32 start_offset, const u32 end_offset) { const u32 start_idx = start_offset / 4; @@ -102,7 +102,7 @@ DECLSPEC void memzero_le_S (u32 *block, const u32 start_offset, const u32 end_of } } -DECLSPEC void memzero_be_S (u32 *block, const u32 start_offset, const u32 end_offset) +DECLSPEC void memzero_be_S (PRIVATE_AS u32 *block, const u32 start_offset, const u32 end_offset) { const u32 start_idx = start_offset / 4; @@ -119,7 +119,7 @@ DECLSPEC void memzero_be_S (u32 *block, const u32 start_offset, const u32 end_of } } -DECLSPEC void aes128_decrypt_cfb (GLOBAL_AS const u32 *encrypted_data, int data_len, const u32 *iv, const u32 *key, u32 *decrypted_data, +DECLSPEC void aes128_decrypt_cfb (GLOBAL_AS const u32 *encrypted_data, int data_len, PRIVATE_AS const u32 *iv, PRIVATE_AS const u32 *key, PRIVATE_AS u32 *decrypted_data, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ks[44]; @@ -151,7 +151,7 @@ DECLSPEC void aes128_decrypt_cfb (GLOBAL_AS const u32 *encrypted_data, int data_ } } -DECLSPEC void aes256_decrypt_cfb (GLOBAL_AS const u32 *encrypted_data, int data_len, const u32 *iv, const u32 *key, u32 *decrypted_data, +DECLSPEC void aes256_decrypt_cfb (GLOBAL_AS const u32 *encrypted_data, int data_len, PRIVATE_AS const u32 *iv, PRIVATE_AS const u32 *key, PRIVATE_AS u32 *decrypted_data, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ks[60]; @@ -183,7 +183,7 @@ DECLSPEC void aes256_decrypt_cfb (GLOBAL_AS const u32 *encrypted_data, int data_ } } -DECLSPEC int check_decoded_data (u32 *decoded_data, const u32 decoded_data_size) +DECLSPEC int check_decoded_data (PRIVATE_AS u32 *decoded_data, const u32 decoded_data_size) { // Check the SHA-1 of the decrypted data which is stored at the end of the decrypted data const u32 sha1_byte_off = (decoded_data_size - 20); diff --git a/OpenCL/m17200_a1-pure.cl b/OpenCL/m17200_a1-pure.cl index 95bc9981c..81d462289 100644 --- a/OpenCL/m17200_a1-pure.cl +++ b/OpenCL/m17200_a1-pure.cl @@ -319,7 +319,7 @@ CONSTANT_VK code distfix[32] = { {22,5,193},{64,5,0} }; -DECLSPEC int check_inflate_code2 (u8 *next) +DECLSPEC int check_inflate_code2 (PRIVATE_AS u8 *next) { u32 bits, hold, thisget, have, i; int left; @@ -406,7 +406,7 @@ DECLSPEC int check_inflate_code2 (u8 *next) } -DECLSPEC int check_inflate_code1 (u8 *next, int left) +DECLSPEC int check_inflate_code1 (PRIVATE_AS u8 *next, int left) { u32 whave = 0, op, bits, hold,len; code here1; diff --git a/OpenCL/m17220_a1-pure.cl b/OpenCL/m17220_a1-pure.cl index 33c4a0f52..62de5384c 100644 --- a/OpenCL/m17220_a1-pure.cl +++ b/OpenCL/m17220_a1-pure.cl @@ -317,7 +317,7 @@ CONSTANT_VK code distfix[32] = { {22,5,193},{64,5,0} }; -DECLSPEC int check_inflate_code2 (u8 *next) +DECLSPEC int check_inflate_code2 (PRIVATE_AS u8 *next) { u32 bits, hold, thisget, have, i; int left; @@ -404,7 +404,7 @@ DECLSPEC int check_inflate_code2 (u8 *next) } -DECLSPEC int check_inflate_code1 (u8 *next, int left) +DECLSPEC int check_inflate_code1 (PRIVATE_AS u8 *next, int left) { u32 whave = 0, op, bits, hold,len; code here1; diff --git a/OpenCL/m17225_a1-pure.cl b/OpenCL/m17225_a1-pure.cl index f69b76c2b..d0f2b991f 100644 --- a/OpenCL/m17225_a1-pure.cl +++ b/OpenCL/m17225_a1-pure.cl @@ -317,7 +317,7 @@ CONSTANT_VK code distfix[32] = { {22,5,193},{64,5,0} }; -DECLSPEC int check_inflate_code2 (u8 *next) +DECLSPEC int check_inflate_code2 (PRIVATE_AS u8 *next) { u32 bits, hold, thisget, have, i; int left; @@ -404,7 +404,7 @@ DECLSPEC int check_inflate_code2 (u8 *next) } -DECLSPEC int check_inflate_code1 (u8 *next, int left) +DECLSPEC int check_inflate_code1 (PRIVATE_AS u8 *next, int left) { u32 whave = 0, op, bits, hold,len; code here1; diff --git a/OpenCL/m17300_a3-optimized.cl b/OpenCL/m17300_a3-optimized.cl index a5153189a..5ecbb3549 100644 --- a/OpenCL/m17300_a3-optimized.cl +++ b/OpenCL/m17300_a3-optimized.cl @@ -30,15 +30,12 @@ CONSTANT_VK u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC void m17300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17300m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -216,15 +213,12 @@ DECLSPEC void m17300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m17300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17300s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -420,7 +414,9 @@ KERNEL_FQ void m17300_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -458,7 +454,7 @@ KERNEL_FQ void m17300_m04 (KERN_ATTR_BASIC ()) * main */ - m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17300_m08 (KERN_ATTR_BASIC ()) @@ -467,7 +463,9 @@ KERNEL_FQ void m17300_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +503,7 @@ KERNEL_FQ void m17300_m08 (KERN_ATTR_BASIC ()) * main */ - m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17300_m16 (KERN_ATTR_BASIC ()) @@ -514,7 +512,9 @@ KERNEL_FQ void m17300_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -552,7 +552,7 @@ KERNEL_FQ void m17300_m16 (KERN_ATTR_BASIC ()) * main */ - m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17300_s04 (KERN_ATTR_BASIC ()) @@ -561,7 +561,9 @@ KERNEL_FQ void m17300_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -599,7 +601,7 @@ KERNEL_FQ void m17300_s04 (KERN_ATTR_BASIC ()) * main */ - m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17300_s08 (KERN_ATTR_BASIC ()) @@ -608,7 +610,9 @@ KERNEL_FQ void m17300_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -646,7 +650,7 @@ KERNEL_FQ void m17300_s08 (KERN_ATTR_BASIC ()) * main */ - m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17300_s16 (KERN_ATTR_BASIC ()) @@ -655,7 +659,9 @@ KERNEL_FQ void m17300_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -693,5 +699,5 @@ KERNEL_FQ void m17300_s16 (KERN_ATTR_BASIC ()) * main */ - m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m17400_a3-optimized.cl b/OpenCL/m17400_a3-optimized.cl index 8ba47ace4..43871956e 100644 --- a/OpenCL/m17400_a3-optimized.cl +++ b/OpenCL/m17400_a3-optimized.cl @@ -30,15 +30,12 @@ CONSTANT_VK u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC void m17400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17400m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -216,15 +213,12 @@ DECLSPEC void m17400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m17400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17400s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -420,7 +414,9 @@ KERNEL_FQ void m17400_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -458,7 +454,7 @@ KERNEL_FQ void m17400_m04 (KERN_ATTR_BASIC ()) * main */ - m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17400_m08 (KERN_ATTR_BASIC ()) @@ -467,7 +463,9 @@ KERNEL_FQ void m17400_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +503,7 @@ KERNEL_FQ void m17400_m08 (KERN_ATTR_BASIC ()) * main */ - m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17400_m16 (KERN_ATTR_BASIC ()) @@ -514,7 +512,9 @@ KERNEL_FQ void m17400_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -552,7 +552,7 @@ KERNEL_FQ void m17400_m16 (KERN_ATTR_BASIC ()) * main */ - m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17400_s04 (KERN_ATTR_BASIC ()) @@ -561,7 +561,9 @@ KERNEL_FQ void m17400_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -599,7 +601,7 @@ KERNEL_FQ void m17400_s04 (KERN_ATTR_BASIC ()) * main */ - m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17400_s08 (KERN_ATTR_BASIC ()) @@ -608,7 +610,9 @@ KERNEL_FQ void m17400_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -646,7 +650,7 @@ KERNEL_FQ void m17400_s08 (KERN_ATTR_BASIC ()) * main */ - m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17400_s16 (KERN_ATTR_BASIC ()) @@ -655,7 +659,9 @@ KERNEL_FQ void m17400_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -693,5 +699,5 @@ KERNEL_FQ void m17400_s16 (KERN_ATTR_BASIC ()) * main */ - m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m17500_a3-optimized.cl b/OpenCL/m17500_a3-optimized.cl index 692ff4349..3ab135e22 100644 --- a/OpenCL/m17500_a3-optimized.cl +++ b/OpenCL/m17500_a3-optimized.cl @@ -30,15 +30,12 @@ CONSTANT_VK u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC void m17500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17500m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -216,15 +213,12 @@ DECLSPEC void m17500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m17500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17500s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -420,7 +414,9 @@ KERNEL_FQ void m17500_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -458,7 +454,7 @@ KERNEL_FQ void m17500_m04 (KERN_ATTR_BASIC ()) * main */ - m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17500_m08 (KERN_ATTR_BASIC ()) @@ -467,7 +463,9 @@ KERNEL_FQ void m17500_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +503,7 @@ KERNEL_FQ void m17500_m08 (KERN_ATTR_BASIC ()) * main */ - m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17500_m16 (KERN_ATTR_BASIC ()) @@ -514,7 +512,9 @@ KERNEL_FQ void m17500_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -552,7 +552,7 @@ KERNEL_FQ void m17500_m16 (KERN_ATTR_BASIC ()) * main */ - m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17500_s04 (KERN_ATTR_BASIC ()) @@ -561,7 +561,9 @@ KERNEL_FQ void m17500_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -599,7 +601,7 @@ KERNEL_FQ void m17500_s04 (KERN_ATTR_BASIC ()) * main */ - m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17500_s08 (KERN_ATTR_BASIC ()) @@ -608,7 +610,9 @@ KERNEL_FQ void m17500_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -646,7 +650,7 @@ KERNEL_FQ void m17500_s08 (KERN_ATTR_BASIC ()) * main */ - m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17500_s16 (KERN_ATTR_BASIC ()) @@ -655,7 +659,9 @@ KERNEL_FQ void m17500_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -693,5 +699,5 @@ KERNEL_FQ void m17500_s16 (KERN_ATTR_BASIC ()) * main */ - m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m17600_a3-optimized.cl b/OpenCL/m17600_a3-optimized.cl index 1dd8a81e8..5d592649c 100644 --- a/OpenCL/m17600_a3-optimized.cl +++ b/OpenCL/m17600_a3-optimized.cl @@ -30,15 +30,12 @@ CONSTANT_VK u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC void m17600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17600m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -216,15 +213,12 @@ DECLSPEC void m17600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m17600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17600s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -420,7 +414,9 @@ KERNEL_FQ void m17600_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -458,7 +454,7 @@ KERNEL_FQ void m17600_m04 (KERN_ATTR_BASIC ()) * main */ - m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17600_m08 (KERN_ATTR_BASIC ()) @@ -467,7 +463,9 @@ KERNEL_FQ void m17600_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +503,7 @@ KERNEL_FQ void m17600_m08 (KERN_ATTR_BASIC ()) * main */ - m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17600_m16 (KERN_ATTR_BASIC ()) @@ -514,7 +512,9 @@ KERNEL_FQ void m17600_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -552,7 +552,7 @@ KERNEL_FQ void m17600_m16 (KERN_ATTR_BASIC ()) * main */ - m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17600_s04 (KERN_ATTR_BASIC ()) @@ -561,7 +561,9 @@ KERNEL_FQ void m17600_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -599,7 +601,7 @@ KERNEL_FQ void m17600_s04 (KERN_ATTR_BASIC ()) * main */ - m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17600_s08 (KERN_ATTR_BASIC ()) @@ -608,7 +610,9 @@ KERNEL_FQ void m17600_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -646,7 +650,7 @@ KERNEL_FQ void m17600_s08 (KERN_ATTR_BASIC ()) * main */ - m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17600_s16 (KERN_ATTR_BASIC ()) @@ -655,7 +659,9 @@ KERNEL_FQ void m17600_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -693,5 +699,5 @@ KERNEL_FQ void m17600_s16 (KERN_ATTR_BASIC ()) * main */ - m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m17700_a3-optimized.cl b/OpenCL/m17700_a3-optimized.cl index 848c1601d..55c243b19 100644 --- a/OpenCL/m17700_a3-optimized.cl +++ b/OpenCL/m17700_a3-optimized.cl @@ -30,15 +30,12 @@ CONSTANT_VK u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC void m17300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17300m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -216,15 +213,12 @@ DECLSPEC void m17300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m17300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17300s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -420,7 +414,9 @@ KERNEL_FQ void m17700_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -458,7 +454,7 @@ KERNEL_FQ void m17700_m04 (KERN_ATTR_BASIC ()) * main */ - m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17700_m08 (KERN_ATTR_BASIC ()) @@ -467,7 +463,9 @@ KERNEL_FQ void m17700_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +503,7 @@ KERNEL_FQ void m17700_m08 (KERN_ATTR_BASIC ()) * main */ - m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17700_m16 (KERN_ATTR_BASIC ()) @@ -514,7 +512,9 @@ KERNEL_FQ void m17700_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -552,7 +552,7 @@ KERNEL_FQ void m17700_m16 (KERN_ATTR_BASIC ()) * main */ - m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17700_s04 (KERN_ATTR_BASIC ()) @@ -561,7 +561,9 @@ KERNEL_FQ void m17700_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -599,7 +601,7 @@ KERNEL_FQ void m17700_s04 (KERN_ATTR_BASIC ()) * main */ - m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17700_s08 (KERN_ATTR_BASIC ()) @@ -608,7 +610,9 @@ KERNEL_FQ void m17700_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -646,7 +650,7 @@ KERNEL_FQ void m17700_s08 (KERN_ATTR_BASIC ()) * main */ - m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17700_s16 (KERN_ATTR_BASIC ()) @@ -655,7 +659,9 @@ KERNEL_FQ void m17700_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -693,5 +699,5 @@ KERNEL_FQ void m17700_s16 (KERN_ATTR_BASIC ()) * main */ - m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m17800_a3-optimized.cl b/OpenCL/m17800_a3-optimized.cl index 2ce7f9b64..74cff9e22 100644 --- a/OpenCL/m17800_a3-optimized.cl +++ b/OpenCL/m17800_a3-optimized.cl @@ -30,15 +30,12 @@ CONSTANT_VK u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC void m17400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17400m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -216,15 +213,12 @@ DECLSPEC void m17400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m17400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17400s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -420,7 +414,9 @@ KERNEL_FQ void m17800_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -458,7 +454,7 @@ KERNEL_FQ void m17800_m04 (KERN_ATTR_BASIC ()) * main */ - m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17800_m08 (KERN_ATTR_BASIC ()) @@ -467,7 +463,9 @@ KERNEL_FQ void m17800_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +503,7 @@ KERNEL_FQ void m17800_m08 (KERN_ATTR_BASIC ()) * main */ - m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17800_m16 (KERN_ATTR_BASIC ()) @@ -514,7 +512,9 @@ KERNEL_FQ void m17800_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -552,7 +552,7 @@ KERNEL_FQ void m17800_m16 (KERN_ATTR_BASIC ()) * main */ - m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17800_s04 (KERN_ATTR_BASIC ()) @@ -561,7 +561,9 @@ KERNEL_FQ void m17800_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -599,7 +601,7 @@ KERNEL_FQ void m17800_s04 (KERN_ATTR_BASIC ()) * main */ - m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17800_s08 (KERN_ATTR_BASIC ()) @@ -608,7 +610,9 @@ KERNEL_FQ void m17800_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -646,7 +650,7 @@ KERNEL_FQ void m17800_s08 (KERN_ATTR_BASIC ()) * main */ - m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17800_s16 (KERN_ATTR_BASIC ()) @@ -655,7 +659,9 @@ KERNEL_FQ void m17800_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -693,5 +699,5 @@ KERNEL_FQ void m17800_s16 (KERN_ATTR_BASIC ()) * main */ - m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17400s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m17900_a3-optimized.cl b/OpenCL/m17900_a3-optimized.cl index 19106b487..eefa649f3 100644 --- a/OpenCL/m17900_a3-optimized.cl +++ b/OpenCL/m17900_a3-optimized.cl @@ -30,15 +30,12 @@ CONSTANT_VK u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC void m17500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17500m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -216,15 +213,12 @@ DECLSPEC void m17500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m17500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17500s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -420,7 +414,9 @@ KERNEL_FQ void m17900_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -458,7 +454,7 @@ KERNEL_FQ void m17900_m04 (KERN_ATTR_BASIC ()) * main */ - m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17900_m08 (KERN_ATTR_BASIC ()) @@ -467,7 +463,9 @@ KERNEL_FQ void m17900_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +503,7 @@ KERNEL_FQ void m17900_m08 (KERN_ATTR_BASIC ()) * main */ - m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17900_m16 (KERN_ATTR_BASIC ()) @@ -514,7 +512,9 @@ KERNEL_FQ void m17900_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -552,7 +552,7 @@ KERNEL_FQ void m17900_m16 (KERN_ATTR_BASIC ()) * main */ - m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17900_s04 (KERN_ATTR_BASIC ()) @@ -561,7 +561,9 @@ KERNEL_FQ void m17900_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -599,7 +601,7 @@ KERNEL_FQ void m17900_s04 (KERN_ATTR_BASIC ()) * main */ - m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17900_s08 (KERN_ATTR_BASIC ()) @@ -608,7 +610,9 @@ KERNEL_FQ void m17900_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -646,7 +650,7 @@ KERNEL_FQ void m17900_s08 (KERN_ATTR_BASIC ()) * main */ - m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m17900_s16 (KERN_ATTR_BASIC ()) @@ -655,7 +659,9 @@ KERNEL_FQ void m17900_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -693,5 +699,5 @@ KERNEL_FQ void m17900_s16 (KERN_ATTR_BASIC ()) * main */ - m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17500s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m18000_a3-optimized.cl b/OpenCL/m18000_a3-optimized.cl index d2e8a36fc..052e8b9c6 100644 --- a/OpenCL/m18000_a3-optimized.cl +++ b/OpenCL/m18000_a3-optimized.cl @@ -30,15 +30,12 @@ CONSTANT_VK u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC void m17600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17600m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -216,15 +213,12 @@ DECLSPEC void m17600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m17600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17600s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -420,7 +414,9 @@ KERNEL_FQ void m18000_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -458,7 +454,7 @@ KERNEL_FQ void m18000_m04 (KERN_ATTR_BASIC ()) * main */ - m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18000_m08 (KERN_ATTR_BASIC ()) @@ -467,7 +463,9 @@ KERNEL_FQ void m18000_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -505,7 +503,7 @@ KERNEL_FQ void m18000_m08 (KERN_ATTR_BASIC ()) * main */ - m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18000_m16 (KERN_ATTR_BASIC ()) @@ -514,7 +512,9 @@ KERNEL_FQ void m18000_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -552,7 +552,7 @@ KERNEL_FQ void m18000_m16 (KERN_ATTR_BASIC ()) * main */ - m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18000_s04 (KERN_ATTR_BASIC ()) @@ -561,7 +561,9 @@ KERNEL_FQ void m18000_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -599,7 +601,7 @@ KERNEL_FQ void m18000_s04 (KERN_ATTR_BASIC ()) * main */ - m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18000_s08 (KERN_ATTR_BASIC ()) @@ -608,7 +610,9 @@ KERNEL_FQ void m18000_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -646,7 +650,7 @@ KERNEL_FQ void m18000_s08 (KERN_ATTR_BASIC ()) * main */ - m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18000_s16 (KERN_ATTR_BASIC ()) @@ -655,7 +659,9 @@ KERNEL_FQ void m18000_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -693,5 +699,5 @@ KERNEL_FQ void m18000_s16 (KERN_ATTR_BASIC ()) * main */ - m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m17600s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m18200_a0-optimized.cl b/OpenCL/m18200_a0-optimized.cl index 765106f8e..8dbd05896 100644 --- a/OpenCL/m18200_a0-optimized.cl +++ b/OpenCL/m18200_a0-optimized.cl @@ -31,7 +31,7 @@ typedef struct krb5asrep } krb5asrep_t; -DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -82,7 +82,7 @@ DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad, PRIVATE_AS u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -116,9 +116,9 @@ DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; @@ -136,14 +136,14 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 length is on 3 bytes, the first byte is 0x82, and the fourth byte is 0x30 (class=SEQUENCE) */ - rc4_next_16_global (S, 0, 0, edata2 + 0, out0); + rc4_next_16_global (S, 0, 0, edata2 + 0, out0, lid); if (((out0[2] & 0x00ff80ff) != 0x00300079) && ((out0[2] & 0xFF00FFFF) != 0x30008179) && ((out0[2] & 0x0000FFFF) != 0x00008279 || (out0[3] & 0x000000FF) != 0x00000030)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u8 i = 0; u8 j = 0; @@ -181,10 +181,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_transform (w0, w1, w2, w3, ipad); } @@ -208,7 +208,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); @@ -221,8 +221,8 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); @@ -235,9 +235,9 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); @@ -250,10 +250,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); @@ -318,7 +318,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, const u32 pw_len, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { /** * pads @@ -532,7 +532,7 @@ KERNEL_FQ void m18200_m04 (KERN_ATTR_RULES_ESALT (krb5asrep_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -628,7 +628,7 @@ KERNEL_FQ void m18200_s04 (KERN_ATTR_RULES_ESALT (krb5asrep_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m18200_a0-pure.cl b/OpenCL/m18200_a0-pure.cl index 96d84a118..104780c2d 100644 --- a/OpenCL/m18200_a0-pure.cl +++ b/OpenCL/m18200_a0-pure.cl @@ -30,9 +30,9 @@ typedef struct krb5asrep } krb5asrep_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; @@ -50,14 +50,14 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 length is on 3 bytes, the first byte is 0x82, and the fourth byte is 0x30 (class=SEQUENCE) */ - rc4_next_16_global (S, 0, 0, edata2 + 0, out0); + rc4_next_16_global (S, 0, 0, edata2 + 0, out0, lid); if (((out0[2] & 0x00ff80ff) != 0x00300079) && ((out0[2] & 0xFF00FFFF) != 0x30008179) && ((out0[2] & 0x0000FFFF) != 0x00008279 || (out0[3] & 0x000000FF) != 0x00000030)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u8 i = 0; u8 j = 0; @@ -94,10 +94,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_hmac_update_64 (&ctx, w0, w1, w2, w3, 64); } @@ -121,31 +121,31 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); } @@ -162,7 +162,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *K, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -316,7 +316,7 @@ KERNEL_FQ void m18200_mxx (KERN_ATTR_RULES_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -376,7 +376,7 @@ KERNEL_FQ void m18200_sxx (KERN_ATTR_RULES_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m18200_a1-optimized.cl b/OpenCL/m18200_a1-optimized.cl index a709e7914..3fab383d5 100644 --- a/OpenCL/m18200_a1-optimized.cl +++ b/OpenCL/m18200_a1-optimized.cl @@ -29,7 +29,7 @@ typedef struct krb5asrep } krb5asrep_t; -DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -80,7 +80,7 @@ DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad, PRIVATE_AS u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -114,9 +114,9 @@ DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; @@ -134,14 +134,14 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 length is on 3 bytes, the first byte is 0x82, and the fourth byte is 0x30 (class=SEQUENCE) */ - rc4_next_16_global (S, 0, 0, edata2 + 0, out0); + rc4_next_16_global (S, 0, 0, edata2 + 0, out0, lid); if (((out0[2] & 0x00ff80ff) != 0x00300079) && ((out0[2] & 0xFF00FFFF) != 0x30008179) && ((out0[2] & 0x0000FFFF) != 0x00008279 || (out0[3] & 0x000000FF) != 0x00000030)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u8 i = 0; u8 j = 0; @@ -179,10 +179,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_transform (w0, w1, w2, w3, ipad); } @@ -206,7 +206,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); @@ -219,8 +219,8 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); @@ -233,9 +233,9 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); @@ -248,10 +248,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); @@ -316,7 +316,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, const u32 pw_len, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { /** * pads @@ -579,7 +579,7 @@ KERNEL_FQ void m18200_m04 (KERN_ATTR_ESALT (krb5asrep_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -724,7 +724,7 @@ KERNEL_FQ void m18200_s04 (KERN_ATTR_ESALT (krb5asrep_t)) tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m18200_a1-pure.cl b/OpenCL/m18200_a1-pure.cl index 307920684..295a22e96 100644 --- a/OpenCL/m18200_a1-pure.cl +++ b/OpenCL/m18200_a1-pure.cl @@ -28,9 +28,9 @@ typedef struct krb5asrep } krb5asrep_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; @@ -48,14 +48,14 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 length is on 3 bytes, the first byte is 0x82, and the fourth byte is 0x30 (class=SEQUENCE) */ - rc4_next_16_global (S, 0, 0, edata2 + 0, out0); + rc4_next_16_global (S, 0, 0, edata2 + 0, out0, lid); if (((out0[2] & 0x00ff80ff) != 0x00300079) && ((out0[2] & 0xFF00FFFF) != 0x30008179) && ((out0[2] & 0x0000FFFF) != 0x00008279 || (out0[3] & 0x000000FF) != 0x00000030)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u8 i = 0; u8 j = 0; @@ -92,10 +92,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_hmac_update_64 (&ctx, w0, w1, w2, w3, 64); } @@ -119,31 +119,31 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); } @@ -160,7 +160,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *K, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -312,7 +312,7 @@ KERNEL_FQ void m18200_mxx (KERN_ATTR_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -370,7 +370,7 @@ KERNEL_FQ void m18200_sxx (KERN_ATTR_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m18200_a3-optimized.cl b/OpenCL/m18200_a3-optimized.cl index b2272d6b6..1cb3233e0 100644 --- a/OpenCL/m18200_a3-optimized.cl +++ b/OpenCL/m18200_a3-optimized.cl @@ -29,7 +29,7 @@ typedef struct krb5asrep } krb5asrep_t; -DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -80,7 +80,7 @@ DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *ipad, PRIVATE_AS u32 *opad, PRIVATE_AS u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -114,9 +114,9 @@ DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 * md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; @@ -134,14 +134,14 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 length is on 3 bytes, the first byte is 0x82, and the fourth byte is 0x30 (class=SEQUENCE) */ - rc4_next_16_global (S, 0, 0, edata2 + 0, out0); + rc4_next_16_global (S, 0, 0, edata2 + 0, out0, lid); if (((out0[2] & 0x00ff80ff) != 0x00300079) && ((out0[2] & 0xFF00FFFF) != 0x30008179) && ((out0[2] & 0x0000FFFF) != 0x00008279 || (out0[3] & 0x000000FF) != 0x00000030)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u8 i = 0; u8 j = 0; @@ -179,10 +179,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_transform (w0, w1, w2, w3, ipad); } @@ -206,7 +206,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); @@ -219,8 +219,8 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); @@ -233,9 +233,9 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); @@ -248,10 +248,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); @@ -316,7 +316,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, const u32 pw_len, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { /** * pads @@ -452,15 +452,12 @@ DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, cons hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest); } -DECLSPEC void m18200 (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (krb5asrep_t)) +DECLSPEC void m18200 (LOCAL_AS u32 *S, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (krb5asrep_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -501,7 +498,7 @@ DECLSPEC void m18200 (LOCAL_AS u32 *S, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const tmp[2] = digest[2]; tmp[3] = digest[3]; - if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, tmp, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -517,8 +514,9 @@ KERNEL_FQ void m18200_m04 (KERN_ATTR_ESALT (krb5asrep_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -558,7 +556,7 @@ KERNEL_FQ void m18200_m04 (KERN_ATTR_ESALT (krb5asrep_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m18200 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m18200 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18200_m08 (KERN_ATTR_ESALT (krb5asrep_t)) @@ -567,8 +565,9 @@ KERNEL_FQ void m18200_m08 (KERN_ATTR_ESALT (krb5asrep_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -608,7 +607,7 @@ KERNEL_FQ void m18200_m08 (KERN_ATTR_ESALT (krb5asrep_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m18200 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m18200 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18200_m16 (KERN_ATTR_ESALT (krb5asrep_t)) @@ -621,8 +620,9 @@ KERNEL_FQ void m18200_s04 (KERN_ATTR_ESALT (krb5asrep_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -662,7 +662,7 @@ KERNEL_FQ void m18200_s04 (KERN_ATTR_ESALT (krb5asrep_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m18200 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m18200 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18200_s08 (KERN_ATTR_ESALT (krb5asrep_t)) @@ -671,8 +671,9 @@ KERNEL_FQ void m18200_s08 (KERN_ATTR_ESALT (krb5asrep_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -712,7 +713,7 @@ KERNEL_FQ void m18200_s08 (KERN_ATTR_ESALT (krb5asrep_t)) LOCAL_VK u32 S[64 * FIXED_LOCAL_SIZE]; - m18200 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m18200 (S, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18200_s16 (KERN_ATTR_ESALT (krb5asrep_t)) diff --git a/OpenCL/m18200_a3-pure.cl b/OpenCL/m18200_a3-pure.cl index 3acabe77e..50c99ebd3 100644 --- a/OpenCL/m18200_a3-pure.cl +++ b/OpenCL/m18200_a3-pure.cl @@ -28,9 +28,9 @@ typedef struct krb5asrep } krb5asrep_t; -DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, PRIVATE_AS u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, PRIVATE_AS const u32 *K2, PRIVATE_AS const u32 *checksum, const u64 lid) { - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u32 out0[4]; @@ -48,14 +48,14 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 length is on 3 bytes, the first byte is 0x82, and the fourth byte is 0x30 (class=SEQUENCE) */ - rc4_next_16_global (S, 0, 0, edata2 + 0, out0); + rc4_next_16_global (S, 0, 0, edata2 + 0, out0, lid); if (((out0[2] & 0x00ff80ff) != 0x00300079) && ((out0[2] & 0xFF00FFFF) != 0x30008179) && ((out0[2] & 0x0000FFFF) != 0x00008279 || (out0[3] & 0x000000FF) != 0x00000030)) return 0; - rc4_init_128 (S, data); + rc4_init_128 (S, data, lid); u8 i = 0; u8 j = 0; @@ -92,10 +92,10 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 for (edata2_left = edata2_len; edata2_left >= 64; edata2_left -= 64) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; md5_hmac_update_64 (&ctx, w0, w1, w2, w3, 64); } @@ -119,31 +119,31 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 if (edata2_left < 16) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w0, edata2_left & 0xf); } else if (edata2_left < 32) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w1, edata2_left & 0xf); } else if (edata2_left < 48) { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w2, edata2_left & 0xf); } else { - j = rc4_next_16_global (S, i, j, edata2, w0); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w1); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w2); i += 16; edata2 += 4; - j = rc4_next_16_global (S, i, j, edata2, w3); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w0, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w1, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w2, lid); i += 16; edata2 += 4; + j = rc4_next_16_global (S, i, j, edata2, w3, lid); i += 16; edata2 += 4; truncate_block_4x4_le_S (w3, edata2_left & 0xf); } @@ -160,7 +160,7 @@ DECLSPEC int decrypt_and_check (LOCAL_AS u32 *S, u32 *data, GLOBAL_AS const u32 return 1; } -DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (PRIVATE_AS const u32 *K, PRIVATE_AS const u32 *checksum, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -325,7 +325,7 @@ KERNEL_FQ void m18200_mxx (KERN_ATTR_VECTOR_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { @@ -396,7 +396,7 @@ KERNEL_FQ void m18200_sxx (KERN_ATTR_VECTOR_ESALT (krb5asrep_t)) kerb_prepare (ctx.h, checksum, digest, K2); - if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum) == 1) + if (decrypt_and_check (S, digest, esalt_bufs[DIGESTS_OFFSET_HOST].edata2, esalt_bufs[DIGESTS_OFFSET_HOST].edata2_len, K2, checksum, lid) == 1) { if (hc_atomic_inc (&hashes_shown[DIGESTS_OFFSET_HOST]) == 0) { diff --git a/OpenCL/m18300-pure.cl b/OpenCL/m18300-pure.cl index c085a87b3..a04c2c618 100644 --- a/OpenCL/m18300-pure.cl +++ b/OpenCL/m18300-pure.cl @@ -40,7 +40,7 @@ typedef struct apple_secure_notes } apple_secure_notes_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m18400-pure.cl b/OpenCL/m18400-pure.cl index 8f6b26576..779547609 100644 --- a/OpenCL/m18400-pure.cl +++ b/OpenCL/m18400-pure.cl @@ -41,7 +41,7 @@ typedef struct odf12 } odf12_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m18600-pure.cl b/OpenCL/m18600-pure.cl index 5f1d76e9a..fa9c7a5e8 100644 --- a/OpenCL/m18600-pure.cl +++ b/OpenCL/m18600-pure.cl @@ -418,7 +418,7 @@ DECLSPEC inline void SET_KEY32 (LOCAL_AS u32 *S, const u64 key, const u32 val) extern __shared__ u32 S[]; #endif -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m18700_a0-optimized.cl b/OpenCL/m18700_a0-optimized.cl index 3f3011257..681b9ca1e 100644 --- a/OpenCL/m18700_a0-optimized.cl +++ b/OpenCL/m18700_a0-optimized.cl @@ -18,7 +18,7 @@ #include STR(INCLUDE_PATH/inc_simd.cl) #endif -DECLSPEC u32 hashCode (const u32 init, const u32 *w, const u32 pw_len) +DECLSPEC u32 hashCode (const u32 init, PRIVATE_AS const u32 *w, const u32 pw_len) { u32 hash = init; diff --git a/OpenCL/m18700_a0-pure.cl b/OpenCL/m18700_a0-pure.cl index 4d1885435..3b4ba6b3a 100644 --- a/OpenCL/m18700_a0-pure.cl +++ b/OpenCL/m18700_a0-pure.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC u32 hashCode (const u32 init, const u32 *w, const u32 pw_len) +DECLSPEC u32 hashCode (const u32 init, PRIVATE_AS const u32 *w, const u32 pw_len) { u32 hash = init; diff --git a/OpenCL/m18700_a3-optimized.cl b/OpenCL/m18700_a3-optimized.cl index 89cb9025c..eed2c296f 100644 --- a/OpenCL/m18700_a3-optimized.cl +++ b/OpenCL/m18700_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC u32x hashCode_w0 (const u32x init, const u32x w0, const u32 *w, const u32 pw_len) +DECLSPEC u32x hashCode_w0 (const u32x init, const u32x w0, PRIVATE_AS const u32 *w, const u32 pw_len) { u32x hash = init; @@ -73,15 +73,12 @@ DECLSPEC u32x hashCode_w0 (const u32x init, const u32x w0, const u32 *w, const u return hash; } -DECLSPEC void m18700m (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m18700m (PRIVATE_AS const u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -105,15 +102,12 @@ DECLSPEC void m18700m (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m18700s (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m18700s (PRIVATE_AS const u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -155,7 +149,9 @@ KERNEL_FQ void m18700_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -184,7 +180,7 @@ KERNEL_FQ void m18700_m04 (KERN_ATTR_VECTOR ()) * main */ - m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18700_m08 (KERN_ATTR_VECTOR ()) @@ -193,7 +189,9 @@ KERNEL_FQ void m18700_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -222,7 +220,7 @@ KERNEL_FQ void m18700_m08 (KERN_ATTR_VECTOR ()) * main */ - m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18700_m16 (KERN_ATTR_VECTOR ()) @@ -231,7 +229,9 @@ KERNEL_FQ void m18700_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -260,7 +260,7 @@ KERNEL_FQ void m18700_m16 (KERN_ATTR_VECTOR ()) * main */ - m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m18700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18700_s04 (KERN_ATTR_VECTOR ()) @@ -269,7 +269,9 @@ KERNEL_FQ void m18700_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -298,7 +300,7 @@ KERNEL_FQ void m18700_s04 (KERN_ATTR_VECTOR ()) * main */ - m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18700_s08 (KERN_ATTR_VECTOR ()) @@ -307,7 +309,9 @@ KERNEL_FQ void m18700_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -336,7 +340,7 @@ KERNEL_FQ void m18700_s08 (KERN_ATTR_VECTOR ()) * main */ - m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m18700_s16 (KERN_ATTR_VECTOR ()) @@ -345,7 +349,9 @@ KERNEL_FQ void m18700_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -374,5 +380,5 @@ KERNEL_FQ void m18700_s16 (KERN_ATTR_VECTOR ()) * main */ - m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m18700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m18700_a3-pure.cl b/OpenCL/m18700_a3-pure.cl index 6bb476fd0..172041bab 100644 --- a/OpenCL/m18700_a3-pure.cl +++ b/OpenCL/m18700_a3-pure.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC u32x hashCode_w0 (const u32x init, const u32x w0, const u32 *w, const u32 pw_len) +DECLSPEC u32x hashCode_w0 (const u32x init, const u32x w0, PRIVATE_AS const u32 *w, const u32 pw_len) { u32x hash = init; diff --git a/OpenCL/m18900-pure.cl b/OpenCL/m18900-pure.cl index 0929dab28..de3d0c2ed 100644 --- a/OpenCL/m18900-pure.cl +++ b/OpenCL/m18900-pure.cl @@ -43,7 +43,7 @@ typedef struct android_backup } android_backup_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m19200-pure.cl b/OpenCL/m19200-pure.cl index 23d6e497a..59a247c6d 100644 --- a/OpenCL/m19200-pure.cl +++ b/OpenCL/m19200-pure.cl @@ -28,7 +28,7 @@ typedef struct qnx_sha512_tmp } qnx_sha512_tmp_t; -DECLSPEC u32 sha512_update_128_qnxbug (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len, u32 sav) +DECLSPEC u32 sha512_update_128_qnxbug (PRIVATE_AS sha512_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const int len, u32 sav) { const int pos = ctx->len & 127; @@ -158,7 +158,7 @@ DECLSPEC u32 sha512_update_128_qnxbug (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 return sav; } -DECLSPEC u32 sha512_update_global_swap_qnxbug (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, u32 sav) +DECLSPEC u32 sha512_update_global_swap_qnxbug (PRIVATE_AS sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, u32 sav) { u32 w0[4]; u32 w1[4]; @@ -314,7 +314,7 @@ DECLSPEC u32 sha512_update_global_swap_qnxbug (sha512_ctx_t *ctx, GLOBAL_AS cons return sav; } -DECLSPEC void sha512_final_qnxbug (sha512_ctx_t *ctx, u32 sav) +DECLSPEC void sha512_final_qnxbug (PRIVATE_AS sha512_ctx_t *ctx, u32 sav) { const int pos = ctx->len & 127; diff --git a/OpenCL/m19600-pure.cl b/OpenCL/m19600-pure.cl index f2316621c..982c94c43 100644 --- a/OpenCL/m19600-pure.cl +++ b/OpenCL/m19600-pure.cl @@ -40,7 +40,7 @@ typedef struct krb5tgs_17_tmp } krb5tgs_17_tmp_t; -DECLSPEC void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes128_encrypt_cbc (PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 data[4]; @@ -67,7 +67,7 @@ DECLSPEC void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, out[3] = hc_swap32_S (out[3]); } -DECLSPEC void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes128_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { aes128_decrypt (ks1, in, out, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -82,7 +82,7 @@ DECLSPEC void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 * essiv[3] = in[3]; } -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m19700-pure.cl b/OpenCL/m19700-pure.cl index d4942d128..4ba46e697 100644 --- a/OpenCL/m19700-pure.cl +++ b/OpenCL/m19700-pure.cl @@ -40,7 +40,7 @@ typedef struct krb5tgs_18_tmp } krb5tgs_18_tmp_t; -DECLSPEC void aes256_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes256_encrypt_cbc (PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 data[4]; @@ -67,7 +67,7 @@ DECLSPEC void aes256_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, out[3] = hc_swap32_S (out[3]); } -DECLSPEC void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes256_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { aes256_decrypt (ks1, in, out, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -82,7 +82,7 @@ DECLSPEC void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 * essiv[3] = in[3]; } -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m19800-pure.cl b/OpenCL/m19800-pure.cl index ebd3862c1..5e7ce0389 100644 --- a/OpenCL/m19800-pure.cl +++ b/OpenCL/m19800-pure.cl @@ -40,7 +40,7 @@ typedef struct krb5pa_17_tmp } krb5pa_17_tmp_t; -DECLSPEC void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes128_encrypt_cbc (PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 data[4]; @@ -67,7 +67,7 @@ DECLSPEC void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, out[3] = hc_swap32_S (out[3]); } -DECLSPEC void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes128_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { aes128_decrypt (ks1, in, out, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -82,7 +82,7 @@ DECLSPEC void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 * essiv[3] = in[3]; } -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m19900-pure.cl b/OpenCL/m19900-pure.cl index 80ad5fb0e..f00ab5ae6 100644 --- a/OpenCL/m19900-pure.cl +++ b/OpenCL/m19900-pure.cl @@ -40,7 +40,7 @@ typedef struct krb5pa_18_tmp } krb5pa_18_tmp_t; -DECLSPEC void aes256_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes256_encrypt_cbc (PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 data[4]; @@ -67,7 +67,7 @@ DECLSPEC void aes256_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, out[3] = hc_swap32_S (out[3]); } -DECLSPEC void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes256_decrypt_cbc (PRIVATE_AS const u32 *ks1, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, PRIVATE_AS u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { aes256_decrypt (ks1, in, out, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -82,7 +82,7 @@ DECLSPEC void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 * essiv[3] = in[3]; } -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m20011-pure.cl b/OpenCL/m20011-pure.cl index 9b8adbda3..247426b8f 100644 --- a/OpenCL/m20011-pure.cl +++ b/OpenCL/m20011-pure.cl @@ -37,7 +37,7 @@ typedef struct diskcryptor_esalt } diskcryptor_esalt_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m20012-pure.cl b/OpenCL/m20012-pure.cl index 8f962e920..9d8afc999 100644 --- a/OpenCL/m20012-pure.cl +++ b/OpenCL/m20012-pure.cl @@ -37,7 +37,7 @@ typedef struct diskcryptor_esalt } diskcryptor_esalt_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m20013-pure.cl b/OpenCL/m20013-pure.cl index c62c46c59..f2f968e40 100644 --- a/OpenCL/m20013-pure.cl +++ b/OpenCL/m20013-pure.cl @@ -37,7 +37,7 @@ typedef struct diskcryptor_esalt } diskcryptor_esalt_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m20510_a0-pure.cl b/OpenCL/m20510_a0-pure.cl index 9d7947c9b..64fce5b14 100644 --- a/OpenCL/m20510_a0-pure.cl +++ b/OpenCL/m20510_a0-pure.cl @@ -336,7 +336,7 @@ CONSTANT_VK int lsbk0_count1[256] = 249, 250, 252, 253, 253, 254, 255, 256 }; -DECLSPEC int derivelast6bytes (const u32x k0, const u32x k1, const u32x k2, u32 *password, LOCAL_AS u32 *l_crc32tab, LOCAL_AS u32 *l_icrc32tab, LOCAL_AS u32 *l_lsbk0, LOCAL_AS int *l_lsbk0_count0, LOCAL_AS int *l_lsbk0_count1) +DECLSPEC int derivelast6bytes (const u32x k0, const u32x k1, const u32x k2, PRIVATE_AS u32 *password, LOCAL_AS u32 *l_crc32tab, LOCAL_AS u32 *l_icrc32tab, LOCAL_AS u32 *l_lsbk0, LOCAL_AS int *l_lsbk0_count0, LOCAL_AS int *l_lsbk0_count1) { // step 1 const u32 k2_1 = INVCRC32 (k2, (k1 >> 24), l_icrc32tab); diff --git a/OpenCL/m20510_a1-pure.cl b/OpenCL/m20510_a1-pure.cl index 8c6bc3181..95f3d95df 100644 --- a/OpenCL/m20510_a1-pure.cl +++ b/OpenCL/m20510_a1-pure.cl @@ -334,7 +334,7 @@ CONSTANT_VK int lsbk0_count1[256] = 249, 250, 252, 253, 253, 254, 255, 256 }; -DECLSPEC int derivelast6bytes (const u32x k0, const u32x k1, const u32x k2, u32 *password, LOCAL_AS u32 *l_crc32tab, LOCAL_AS u32 *l_icrc32tab, LOCAL_AS u32 *l_lsbk0, LOCAL_AS int *l_lsbk0_count0, LOCAL_AS int *l_lsbk0_count1) +DECLSPEC int derivelast6bytes (const u32x k0, const u32x k1, const u32x k2, PRIVATE_AS u32 *password, LOCAL_AS u32 *l_crc32tab, LOCAL_AS u32 *l_icrc32tab, LOCAL_AS u32 *l_lsbk0, LOCAL_AS int *l_lsbk0_count0, LOCAL_AS int *l_lsbk0_count1) { // step 1 const u32 k2_1 = INVCRC32 (k2, (k1 >> 24), l_icrc32tab); diff --git a/OpenCL/m20510_a3-pure.cl b/OpenCL/m20510_a3-pure.cl index c330c26cc..1b944b23e 100644 --- a/OpenCL/m20510_a3-pure.cl +++ b/OpenCL/m20510_a3-pure.cl @@ -334,7 +334,7 @@ CONSTANT_VK int lsbk0_count1[256] = 249, 250, 252, 253, 253, 254, 255, 256 }; -DECLSPEC int derivelast6bytes (const u32x k0, const u32x k1, const u32x k2, u32 *password, LOCAL_AS u32 *l_crc32tab, LOCAL_AS u32 *l_icrc32tab, LOCAL_AS u32 *l_lsbk0, LOCAL_AS int *l_lsbk0_count0, LOCAL_AS int *l_lsbk0_count1) +DECLSPEC int derivelast6bytes (const u32x k0, const u32x k1, const u32x k2, PRIVATE_AS u32 *password, LOCAL_AS u32 *l_crc32tab, LOCAL_AS u32 *l_icrc32tab, LOCAL_AS u32 *l_lsbk0, LOCAL_AS int *l_lsbk0_count0, LOCAL_AS int *l_lsbk0_count1) { // step 1 const u32 k2_1 = INVCRC32 (k2, (k1 >> 24), l_icrc32tab); diff --git a/OpenCL/m20710_a3-optimized.cl b/OpenCL/m20710_a3-optimized.cl index 369d3784f..8338a11e8 100644 --- a/OpenCL/m20710_a3-optimized.cl +++ b/OpenCL/m20710_a3-optimized.cl @@ -43,15 +43,12 @@ h = 0; \ } -DECLSPEC void m20710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m20710m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -580,15 +577,12 @@ DECLSPEC void m20710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR (), LOCAL_AS u } } -DECLSPEC void m20710s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m20710s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -1138,8 +1132,8 @@ KERNEL_FQ void m20710_m04 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1190,7 +1184,7 @@ KERNEL_FQ void m20710_m04 (KERN_ATTR_VECTOR ()) * main */ - m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20710_m08 (KERN_ATTR_VECTOR ()) @@ -1199,8 +1193,8 @@ KERNEL_FQ void m20710_m08 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1251,7 +1245,7 @@ KERNEL_FQ void m20710_m08 (KERN_ATTR_VECTOR ()) * main */ - m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20710_m16 (KERN_ATTR_VECTOR ()) @@ -1260,8 +1254,8 @@ KERNEL_FQ void m20710_m16 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1312,7 +1306,7 @@ KERNEL_FQ void m20710_m16 (KERN_ATTR_VECTOR ()) * main */ - m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20710m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20710_s04 (KERN_ATTR_VECTOR ()) @@ -1321,8 +1315,8 @@ KERNEL_FQ void m20710_s04 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1373,7 +1367,7 @@ KERNEL_FQ void m20710_s04 (KERN_ATTR_VECTOR ()) * main */ - m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20710_s08 (KERN_ATTR_VECTOR ()) @@ -1382,8 +1376,8 @@ KERNEL_FQ void m20710_s08 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1434,7 +1428,7 @@ KERNEL_FQ void m20710_s08 (KERN_ATTR_VECTOR ()) * main */ - m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20710_s16 (KERN_ATTR_VECTOR ()) @@ -1443,8 +1437,8 @@ KERNEL_FQ void m20710_s16 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1495,5 +1489,5 @@ KERNEL_FQ void m20710_s16 (KERN_ATTR_VECTOR ()) * main */ - m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20710s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m20800_a3-optimized.cl b/OpenCL/m20800_a3-optimized.cl index d6f865660..40e19cb2a 100644 --- a/OpenCL/m20800_a3-optimized.cl +++ b/OpenCL/m20800_a3-optimized.cl @@ -44,15 +44,12 @@ h = 0; \ } -DECLSPEC void m20800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m20800m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -280,15 +277,12 @@ DECLSPEC void m20800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m20800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m20800s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -555,8 +549,8 @@ KERNEL_FQ void m20800_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -616,7 +610,7 @@ KERNEL_FQ void m20800_m04 (KERN_ATTR_BASIC ()) * main */ - m20800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20800_m08 (KERN_ATTR_BASIC ()) @@ -625,8 +619,8 @@ KERNEL_FQ void m20800_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -686,7 +680,7 @@ KERNEL_FQ void m20800_m08 (KERN_ATTR_BASIC ()) * main */ - m20800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20800_m16 (KERN_ATTR_BASIC ()) @@ -695,8 +689,8 @@ KERNEL_FQ void m20800_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -756,7 +750,7 @@ KERNEL_FQ void m20800_m16 (KERN_ATTR_BASIC ()) * main */ - m20800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20800_s04 (KERN_ATTR_BASIC ()) @@ -765,8 +759,8 @@ KERNEL_FQ void m20800_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -826,7 +820,7 @@ KERNEL_FQ void m20800_s04 (KERN_ATTR_BASIC ()) * main */ - m20800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20800_s08 (KERN_ATTR_BASIC ()) @@ -835,8 +829,8 @@ KERNEL_FQ void m20800_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -896,7 +890,7 @@ KERNEL_FQ void m20800_s08 (KERN_ATTR_BASIC ()) * main */ - m20800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20800_s16 (KERN_ATTR_BASIC ()) @@ -905,8 +899,8 @@ KERNEL_FQ void m20800_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -966,5 +960,5 @@ KERNEL_FQ void m20800_s16 (KERN_ATTR_BASIC ()) * main */ - m20800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m20900_a3-optimized.cl b/OpenCL/m20900_a3-optimized.cl index 23445c2d5..83efdcaed 100644 --- a/OpenCL/m20900_a3-optimized.cl +++ b/OpenCL/m20900_a3-optimized.cl @@ -30,15 +30,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m20900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m20900m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -691,15 +688,12 @@ DECLSPEC void m20900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m20900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m20900s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -1373,8 +1367,8 @@ KERNEL_FQ void m20900_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1434,7 +1428,7 @@ KERNEL_FQ void m20900_m04 (KERN_ATTR_BASIC ()) * main */ - m20900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20900_m08 (KERN_ATTR_BASIC ()) @@ -1443,8 +1437,8 @@ KERNEL_FQ void m20900_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1504,7 +1498,7 @@ KERNEL_FQ void m20900_m08 (KERN_ATTR_BASIC ()) * main */ - m20900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20900_m16 (KERN_ATTR_BASIC ()) @@ -1513,8 +1507,8 @@ KERNEL_FQ void m20900_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1574,7 +1568,7 @@ KERNEL_FQ void m20900_m16 (KERN_ATTR_BASIC ()) * main */ - m20900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20900_s04 (KERN_ATTR_BASIC ()) @@ -1583,8 +1577,8 @@ KERNEL_FQ void m20900_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1644,7 +1638,7 @@ KERNEL_FQ void m20900_s04 (KERN_ATTR_BASIC ()) * main */ - m20900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20900_s08 (KERN_ATTR_BASIC ()) @@ -1653,8 +1647,8 @@ KERNEL_FQ void m20900_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1714,7 +1708,7 @@ KERNEL_FQ void m20900_s08 (KERN_ATTR_BASIC ()) * main */ - m20900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m20900_s16 (KERN_ATTR_BASIC ()) @@ -1723,8 +1717,8 @@ KERNEL_FQ void m20900_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1784,5 +1778,5 @@ KERNEL_FQ void m20900_s16 (KERN_ATTR_BASIC ()) * main */ - m20900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m20900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m21000_a0-optimized.cl b/OpenCL/m21000_a0-optimized.cl index 7a6edb0db..ab8e58ea1 100644 --- a/OpenCL/m21000_a0-optimized.cl +++ b/OpenCL/m21000_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_opt (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_opt (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u32x wend = 0x80000000; u32x wlen = 64*8; diff --git a/OpenCL/m21000_a1-optimized.cl b/OpenCL/m21000_a1-optimized.cl index ae7e40b6a..e12d5417f 100644 --- a/OpenCL/m21000_a1-optimized.cl +++ b/OpenCL/m21000_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_full (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_full (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -112,7 +112,7 @@ DECLSPEC void sha512_transform_full (const u32x *w0, const u32x *w1, const u32x digest[7] += h; } -DECLSPEC void sha512_transform_opt (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_opt (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u32x wend = 0x80000000; u32x wlen = 64*8; diff --git a/OpenCL/m21000_a3-optimized.cl b/OpenCL/m21000_a3-optimized.cl index 3b4c3cc6e..94da9edad 100644 --- a/OpenCL/m21000_a3-optimized.cl +++ b/OpenCL/m21000_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_full (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_full (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -112,7 +112,7 @@ DECLSPEC void sha512_transform_full (const u32x *w0, const u32x *w1, const u32x digest[7] += h; } -DECLSPEC void sha512_transform_opt (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_opt (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u32x wend = 0x80000000; u32x wlen = 64*8; @@ -221,15 +221,12 @@ DECLSPEC void sha512_transform_opt (const u32x *w0, const u32x *w1, const u32x * digest[7] = h; } -DECLSPEC void m21000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m21000m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -314,15 +311,12 @@ DECLSPEC void m21000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m21000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m21000s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -425,7 +419,9 @@ KERNEL_FQ void m21000_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -454,7 +450,7 @@ KERNEL_FQ void m21000_m04 (KERN_ATTR_VECTOR ()) * main */ - m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m21000_m08 (KERN_ATTR_VECTOR ()) @@ -463,7 +459,9 @@ KERNEL_FQ void m21000_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -492,7 +490,7 @@ KERNEL_FQ void m21000_m08 (KERN_ATTR_VECTOR ()) * main */ - m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m21000_m16 (KERN_ATTR_VECTOR ()) @@ -501,7 +499,9 @@ KERNEL_FQ void m21000_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -530,7 +530,7 @@ KERNEL_FQ void m21000_m16 (KERN_ATTR_VECTOR ()) * main */ - m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21000m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m21000_s04 (KERN_ATTR_VECTOR ()) @@ -539,7 +539,9 @@ KERNEL_FQ void m21000_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -568,7 +570,7 @@ KERNEL_FQ void m21000_s04 (KERN_ATTR_VECTOR ()) * main */ - m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m21000_s08 (KERN_ATTR_VECTOR ()) @@ -577,7 +579,9 @@ KERNEL_FQ void m21000_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -606,7 +610,7 @@ KERNEL_FQ void m21000_s08 (KERN_ATTR_VECTOR ()) * main */ - m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m21000_s16 (KERN_ATTR_VECTOR ()) @@ -615,7 +619,9 @@ KERNEL_FQ void m21000_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -644,5 +650,5 @@ KERNEL_FQ void m21000_s16 (KERN_ATTR_VECTOR ()) * main */ - m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21000s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m21100_a3-optimized.cl b/OpenCL/m21100_a3-optimized.cl index 81498fa2e..57f6d45fd 100644 --- a/OpenCL/m21100_a3-optimized.cl +++ b/OpenCL/m21100_a3-optimized.cl @@ -30,15 +30,12 @@ #define uint_to_hex_lower8_le(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m21100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m21100m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -364,15 +361,12 @@ DECLSPEC void m21100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m21100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m21100s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -649,8 +643,8 @@ KERNEL_FQ void m21100_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -710,7 +704,7 @@ KERNEL_FQ void m21100_m04 (KERN_ATTR_BASIC ()) * main */ - m21100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m21100_m08 (KERN_ATTR_BASIC ()) @@ -719,8 +713,8 @@ KERNEL_FQ void m21100_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -780,7 +774,7 @@ KERNEL_FQ void m21100_m08 (KERN_ATTR_BASIC ()) * main */ - m21100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m21100_m16 (KERN_ATTR_BASIC ()) @@ -789,8 +783,8 @@ KERNEL_FQ void m21100_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -850,7 +844,7 @@ KERNEL_FQ void m21100_m16 (KERN_ATTR_BASIC ()) * main */ - m21100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21100m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m21100_s04 (KERN_ATTR_BASIC ()) @@ -859,8 +853,8 @@ KERNEL_FQ void m21100_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -920,7 +914,7 @@ KERNEL_FQ void m21100_s04 (KERN_ATTR_BASIC ()) * main */ - m21100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m21100_s08 (KERN_ATTR_BASIC ()) @@ -929,8 +923,8 @@ KERNEL_FQ void m21100_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -990,7 +984,7 @@ KERNEL_FQ void m21100_s08 (KERN_ATTR_BASIC ()) * main */ - m21100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m21100_s16 (KERN_ATTR_BASIC ()) @@ -999,8 +993,8 @@ KERNEL_FQ void m21100_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1060,5 +1054,5 @@ KERNEL_FQ void m21100_s16 (KERN_ATTR_BASIC ()) * main */ - m21100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21100s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m21200_a3-optimized.cl b/OpenCL/m21200_a3-optimized.cl index 197434154..a9a6520fc 100644 --- a/OpenCL/m21200_a3-optimized.cl +++ b/OpenCL/m21200_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m21200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m21200m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -402,15 +399,12 @@ DECLSPEC void m21200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m21200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m21200s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -796,8 +790,8 @@ KERNEL_FQ void m21200_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -857,7 +851,7 @@ KERNEL_FQ void m21200_m04 (KERN_ATTR_BASIC ()) * main */ - m21200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m21200_m08 (KERN_ATTR_BASIC ()) @@ -866,8 +860,8 @@ KERNEL_FQ void m21200_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -927,7 +921,7 @@ KERNEL_FQ void m21200_m08 (KERN_ATTR_BASIC ()) * main */ - m21200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m21200_m16 (KERN_ATTR_BASIC ()) @@ -936,8 +930,8 @@ KERNEL_FQ void m21200_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -997,7 +991,7 @@ KERNEL_FQ void m21200_m16 (KERN_ATTR_BASIC ()) * main */ - m21200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m21200_s04 (KERN_ATTR_BASIC ()) @@ -1006,8 +1000,8 @@ KERNEL_FQ void m21200_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1067,7 +1061,7 @@ KERNEL_FQ void m21200_s04 (KERN_ATTR_BASIC ()) * main */ - m21200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m21200_s08 (KERN_ATTR_BASIC ()) @@ -1076,8 +1070,8 @@ KERNEL_FQ void m21200_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1137,7 +1131,7 @@ KERNEL_FQ void m21200_s08 (KERN_ATTR_BASIC ()) * main */ - m21200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m21200_s16 (KERN_ATTR_BASIC ()) @@ -1146,8 +1140,8 @@ KERNEL_FQ void m21200_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1207,5 +1201,5 @@ KERNEL_FQ void m21200_s16 (KERN_ATTR_BASIC ()) * main */ - m21200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m21200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m21400_a3-optimized.cl b/OpenCL/m21400_a3-optimized.cl index 75d957463..113a904a1 100644 --- a/OpenCL/m21400_a3-optimized.cl +++ b/OpenCL/m21400_a3-optimized.cl @@ -31,15 +31,12 @@ h = 0; \ } -DECLSPEC void m21400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m21400m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -250,15 +247,12 @@ DECLSPEC void m21400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m21400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m21400s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -508,7 +502,9 @@ KERNEL_FQ void m21400_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -537,7 +533,7 @@ KERNEL_FQ void m21400_m04 (KERN_ATTR_VECTOR ()) * main */ - m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m21400_m08 (KERN_ATTR_VECTOR ()) @@ -546,7 +542,9 @@ KERNEL_FQ void m21400_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -575,7 +573,7 @@ KERNEL_FQ void m21400_m08 (KERN_ATTR_VECTOR ()) * main */ - m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m21400_m16 (KERN_ATTR_VECTOR ()) @@ -584,7 +582,9 @@ KERNEL_FQ void m21400_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -613,7 +613,7 @@ KERNEL_FQ void m21400_m16 (KERN_ATTR_VECTOR ()) * main */ - m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21400m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m21400_s04 (KERN_ATTR_VECTOR ()) @@ -622,7 +622,9 @@ KERNEL_FQ void m21400_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -651,7 +653,7 @@ KERNEL_FQ void m21400_s04 (KERN_ATTR_VECTOR ()) * main */ - m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m21400_s08 (KERN_ATTR_VECTOR ()) @@ -660,7 +662,9 @@ KERNEL_FQ void m21400_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -689,7 +693,7 @@ KERNEL_FQ void m21400_s08 (KERN_ATTR_VECTOR ()) * main */ - m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m21400_s16 (KERN_ATTR_VECTOR ()) @@ -698,7 +702,9 @@ KERNEL_FQ void m21400_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -727,5 +733,5 @@ KERNEL_FQ void m21400_s16 (KERN_ATTR_VECTOR ()) * main */ - m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m21400s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m21500-pure.cl b/OpenCL/m21500-pure.cl index 96052b711..5ed38136a 100644 --- a/OpenCL/m21500-pure.cl +++ b/OpenCL/m21500-pure.cl @@ -37,7 +37,7 @@ typedef struct solarwinds } solarwinds_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m21600-pure.cl b/OpenCL/m21600-pure.cl index 811fb8e15..6b6d0f93c 100644 --- a/OpenCL/m21600-pure.cl +++ b/OpenCL/m21600-pure.cl @@ -30,7 +30,7 @@ typedef struct web2py_sha512_tmp } web2py_sha512_tmp_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m21700-pure.cl b/OpenCL/m21700-pure.cl index dbba98a37..d99fc96f5 100644 --- a/OpenCL/m21700-pure.cl +++ b/OpenCL/m21700-pure.cl @@ -40,7 +40,7 @@ typedef struct electrum_tmp } electrum_tmp_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m21800-pure.cl b/OpenCL/m21800-pure.cl index efc686bf8..db837fe40 100644 --- a/OpenCL/m21800-pure.cl +++ b/OpenCL/m21800-pure.cl @@ -41,7 +41,7 @@ typedef struct electrum_tmp #define MIN_ENTROPY 3.0 #define MAX_ENTROPY 6.0 -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m22000-pure.cl b/OpenCL/m22000-pure.cl index f1f8c8e4b..9abc43813 100644 --- a/OpenCL/m22000-pure.cl +++ b/OpenCL/m22000-pure.cl @@ -82,7 +82,7 @@ typedef struct wpa } wpa_t; -DECLSPEC void make_kn (u32 *k) +DECLSPEC void make_kn (PRIVATE_AS u32 *k) { u32 kl[4]; u32 kr[4]; @@ -112,7 +112,7 @@ DECLSPEC void make_kn (u32 *k) k[3] ^= c * 0x87000000; } -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m22001-pure.cl b/OpenCL/m22001-pure.cl index fbe6547da..d4889ba0a 100644 --- a/OpenCL/m22001-pure.cl +++ b/OpenCL/m22001-pure.cl @@ -84,7 +84,7 @@ DECLSPEC u8 hex_convert (const u8 c) return (c & 15) + (c >> 6) * 9; } -DECLSPEC u8 hex_to_u8 (const u8 *hex) +DECLSPEC u8 hex_to_u8 (PRIVATE_AS const u8 *hex) { u8 v = 0; @@ -95,7 +95,7 @@ DECLSPEC u8 hex_to_u8 (const u8 *hex) } #endif -DECLSPEC void make_kn (u32 *k) +DECLSPEC void make_kn (PRIVATE_AS u32 *k) { u32 kl[4]; u32 kr[4]; @@ -125,7 +125,7 @@ DECLSPEC void make_kn (u32 *k) k[3] ^= c * 0x87000000; } -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -186,11 +186,10 @@ KERNEL_FQ void m22001_init (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_t)) in[14] = pws[gid].i[14]; in[15] = pws[gid].i[15]; - u8 *in_ptr = (u8 *) in; - u32 out[8]; - u8 *out_ptr = (u8 *) out; + PRIVATE_AS u8 *in_ptr = (PRIVATE_AS u8 *) in; + PRIVATE_AS u8 *out_ptr = (PRIVATE_AS u8 *) out; for (int i = 0, j = 0; i < 32; i += 1, j += 2) { diff --git a/OpenCL/m22100-pure.cl b/OpenCL/m22100-pure.cl index f77ad6e94..4fa362364 100644 --- a/OpenCL/m22100-pure.cl +++ b/OpenCL/m22100-pure.cl @@ -45,7 +45,7 @@ typedef struct bitlocker_tmp #define SHM_TYPE2 GLOBAL_AS const #endif -DECLSPEC void sha256_transform_vector_pc (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest, SHM_TYPE2 u32 *s_wb_ke_pc) +DECLSPEC void sha256_transform_vector_pc (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest, SHM_TYPE2 u32 *s_wb_ke_pc) { u32x a = digest[0]; u32x b = digest[1]; diff --git a/OpenCL/m22200_a0-optimized.cl b/OpenCL/m22200_a0-optimized.cl index a49f145de..defb08208 100644 --- a/OpenCL/m22200_a0-optimized.cl +++ b/OpenCL/m22200_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m22200_a1-optimized.cl b/OpenCL/m22200_a1-optimized.cl index 690b63416..4ffc04d57 100644 --- a/OpenCL/m22200_a1-optimized.cl +++ b/OpenCL/m22200_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m22200_a3-optimized.cl b/OpenCL/m22200_a3-optimized.cl index 3a00f4dfe..3d2024e4a 100644 --- a/OpenCL/m22200_a3-optimized.cl +++ b/OpenCL/m22200_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha512.cl) #endif -DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -123,15 +123,12 @@ DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32 digest[7] = h; } -DECLSPEC void m22200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m22200m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -201,15 +198,12 @@ DECLSPEC void m22200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m22200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m22200s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -297,7 +291,9 @@ KERNEL_FQ void m22200_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -352,7 +348,7 @@ KERNEL_FQ void m22200_m04 (KERN_ATTR_BASIC ()) * main */ - m22200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22200_m08 (KERN_ATTR_BASIC ()) @@ -361,7 +357,9 @@ KERNEL_FQ void m22200_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -424,7 +422,7 @@ KERNEL_FQ void m22200_m08 (KERN_ATTR_BASIC ()) * main */ - m22200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22200_m16 (KERN_ATTR_BASIC ()) @@ -433,7 +431,9 @@ KERNEL_FQ void m22200_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -511,7 +511,7 @@ KERNEL_FQ void m22200_m16 (KERN_ATTR_BASIC ()) * main */ - m22200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22200_s04 (KERN_ATTR_BASIC ()) @@ -520,7 +520,9 @@ KERNEL_FQ void m22200_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -575,7 +577,7 @@ KERNEL_FQ void m22200_s04 (KERN_ATTR_BASIC ()) * main */ - m22200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22200_s08 (KERN_ATTR_BASIC ()) @@ -584,7 +586,9 @@ KERNEL_FQ void m22200_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -647,7 +651,7 @@ KERNEL_FQ void m22200_s08 (KERN_ATTR_BASIC ()) * main */ - m22200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22200_s16 (KERN_ATTR_BASIC ()) @@ -656,7 +660,9 @@ KERNEL_FQ void m22200_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -734,5 +740,5 @@ KERNEL_FQ void m22200_s16 (KERN_ATTR_BASIC ()) * main */ - m22200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m22300_a3-optimized.cl b/OpenCL/m22300_a3-optimized.cl index 1cb89ddd2..92970f3b9 100644 --- a/OpenCL/m22300_a3-optimized.cl +++ b/OpenCL/m22300_a3-optimized.cl @@ -31,15 +31,12 @@ h = 0; \ } -DECLSPEC void m22300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m22300m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -272,15 +269,12 @@ DECLSPEC void m22300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m22300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m22300s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -552,7 +546,9 @@ KERNEL_FQ void m22300_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -590,7 +586,7 @@ KERNEL_FQ void m22300_m04 (KERN_ATTR_BASIC ()) * main */ - m22300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22300_m08 (KERN_ATTR_BASIC ()) @@ -599,7 +595,9 @@ KERNEL_FQ void m22300_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -637,7 +635,7 @@ KERNEL_FQ void m22300_m08 (KERN_ATTR_BASIC ()) * main */ - m22300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22300_m16 (KERN_ATTR_BASIC ()) @@ -646,7 +644,9 @@ KERNEL_FQ void m22300_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -684,7 +684,7 @@ KERNEL_FQ void m22300_m16 (KERN_ATTR_BASIC ()) * main */ - m22300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22300_s04 (KERN_ATTR_BASIC ()) @@ -693,7 +693,9 @@ KERNEL_FQ void m22300_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -731,7 +733,7 @@ KERNEL_FQ void m22300_s04 (KERN_ATTR_BASIC ()) * main */ - m22300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22300_s08 (KERN_ATTR_BASIC ()) @@ -740,7 +742,9 @@ KERNEL_FQ void m22300_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -778,7 +782,7 @@ KERNEL_FQ void m22300_s08 (KERN_ATTR_BASIC ()) * main */ - m22300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22300_s16 (KERN_ATTR_BASIC ()) @@ -787,7 +791,9 @@ KERNEL_FQ void m22300_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -825,5 +831,5 @@ KERNEL_FQ void m22300_s16 (KERN_ATTR_BASIC ()) * main */ - m22300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m22500_a3-optimized.cl b/OpenCL/m22500_a3-optimized.cl index 12d4a2e87..5b11f2426 100644 --- a/OpenCL/m22500_a3-optimized.cl +++ b/OpenCL/m22500_a3-optimized.cl @@ -30,14 +30,12 @@ DECLSPEC int is_valid_bitcoinj_8 (const u8 v) return 1; } -DECLSPEC void m22500 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m22500 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * base + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * salt */ @@ -613,8 +611,8 @@ KERNEL_FQ void m22500_m04 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -699,7 +697,7 @@ KERNEL_FQ void m22500_m04 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22500_m08 (KERN_ATTR_VECTOR ()) @@ -708,8 +706,8 @@ KERNEL_FQ void m22500_m08 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -794,7 +792,7 @@ KERNEL_FQ void m22500_m08 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22500_m16 (KERN_ATTR_VECTOR ()) @@ -803,8 +801,8 @@ KERNEL_FQ void m22500_m16 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -889,7 +887,7 @@ KERNEL_FQ void m22500_m16 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22500_s04 (KERN_ATTR_VECTOR ()) @@ -898,8 +896,8 @@ KERNEL_FQ void m22500_s04 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -984,7 +982,7 @@ KERNEL_FQ void m22500_s04 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22500_s08 (KERN_ATTR_VECTOR ()) @@ -993,8 +991,8 @@ KERNEL_FQ void m22500_s08 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1079,7 +1077,7 @@ KERNEL_FQ void m22500_s08 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m22500_s16 (KERN_ATTR_VECTOR ()) @@ -1088,8 +1086,8 @@ KERNEL_FQ void m22500_s16 (KERN_ATTR_VECTOR ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1174,5 +1172,5 @@ KERNEL_FQ void m22500_s16 (KERN_ATTR_VECTOR ()) * main */ - m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m22500 (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m22600-pure.cl b/OpenCL/m22600-pure.cl index 7d2b57747..c02a3b5d0 100644 --- a/OpenCL/m22600-pure.cl +++ b/OpenCL/m22600-pure.cl @@ -34,7 +34,7 @@ typedef struct telegram } telegram_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -70,7 +70,7 @@ DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void sha1_run (u32 *w, u32 *res) +DECLSPEC void sha1_run (PRIVATE_AS u32 *w, PRIVATE_AS u32 *res) { u32 w0[4]; u32 w1[4]; diff --git a/OpenCL/m22700-pure.cl b/OpenCL/m22700-pure.cl index 220508936..397b3a20f 100644 --- a/OpenCL/m22700-pure.cl +++ b/OpenCL/m22700-pure.cl @@ -50,7 +50,7 @@ DECLSPEC int is_valid_bitcoinj_8 (const u8 v) return 1; } -DECLSPEC int is_valid_bitcoinj (const u32 *w) +DECLSPEC int is_valid_bitcoinj (PRIVATE_AS const u32 *w) { if ((w[0] & 0x000000ff) != 0x0000000a) return 0; @@ -130,6 +130,27 @@ DECLSPEC uint4 hc_swap32_4 (uint4 v) X2 = make_uint4 (X2.z, X2.w, X2.x, X2.y); \ X3 = make_uint4 (X3.w, X3.x, X3.y, X3.z); \ } +#elif defined IS_METAL +#define SALSA20_2R() \ +{ \ + ADD_ROTATE_XOR (X1, X0, X3, 7); \ + ADD_ROTATE_XOR (X2, X1, X0, 9); \ + ADD_ROTATE_XOR (X3, X2, X1, 13); \ + ADD_ROTATE_XOR (X0, X3, X2, 18); \ + \ + X1 = X1.wxyz; \ + X2 = X2.zwxy; \ + X3 = X3.yzwx; \ + \ + ADD_ROTATE_XOR (X3, X0, X1, 7); \ + ADD_ROTATE_XOR (X2, X3, X0, 9); \ + ADD_ROTATE_XOR (X1, X2, X3, 13); \ + ADD_ROTATE_XOR (X0, X1, X2, 18); \ + \ + X1 = X1.yzwx; \ + X2 = X2.zwxy; \ + X3 = X3.wxyz; \ +} #else #define SALSA20_2R() \ { \ @@ -156,7 +177,7 @@ DECLSPEC uint4 hc_swap32_4 (uint4 v) #define Coord(xd4,y,z) (((xd4) * ySIZE * zSIZE) + ((y) * zSIZE) + (z)) #define CO Coord(xd4,y,z) -DECLSPEC void salsa_r (uint4 *TI) +DECLSPEC void salsa_r (PRIVATE_AS uint4 *TI) { uint4 R0 = TI[STATE_CNT4 - 4]; uint4 R1 = TI[STATE_CNT4 - 3]; @@ -227,12 +248,12 @@ DECLSPEC void salsa_r (uint4 *TI) #endif } -DECLSPEC void scrypt_smix_init (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix_init (PRIVATE_AS uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3, const u64 gid) { const u32 ySIZE = SCRYPT_N / SCRYPT_TMTO; const u32 zSIZE = STATE_CNT4; - const u32 x = get_global_id (0); + const u32 x = (u32) gid; const u32 xd4 = x / 4; const u32 xm4 = x & 3; @@ -255,12 +276,12 @@ DECLSPEC void scrypt_smix_init (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 * } } -DECLSPEC void scrypt_smix_loop (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix_loop (PRIVATE_AS uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3, const u64 gid) { const u32 ySIZE = SCRYPT_N / SCRYPT_TMTO; const u32 zSIZE = STATE_CNT4; - const u32 x = get_global_id (0); + const u32 x = (u32) gid; const u32 xd4 = x / 4; const u32 xm4 = x & 3; @@ -450,7 +471,7 @@ KERNEL_FQ void m22700_loop_prepare (KERN_ATTR_TMPS (scrypt_tmp_t)) for (int z = 0; z < STATE_CNT4; z++) X[z] = P[z]; - scrypt_smix_init (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf); + scrypt_smix_init (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf, gid); for (int z = 0; z < STATE_CNT4; z++) P[z] = X[z]; } @@ -475,7 +496,7 @@ KERNEL_FQ void m22700_loop (KERN_ATTR_TMPS (scrypt_tmp_t)) for (int z = 0; z < STATE_CNT4; z++) X[z] = P[z]; - scrypt_smix_loop (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf); + scrypt_smix_loop (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf, gid); for (int z = 0; z < STATE_CNT4; z++) P[z] = X[z]; } diff --git a/OpenCL/m23001_a3-optimized.cl b/OpenCL/m23001_a3-optimized.cl index 69cece14f..593fae943 100644 --- a/OpenCL/m23001_a3-optimized.cl +++ b/OpenCL/m23001_a3-optimized.cl @@ -27,14 +27,12 @@ typedef struct securezip } securezip_t; -DECLSPEC void m23001m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (securezip_t)) +DECLSPEC void m23001m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR_ESALT (securezip_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * base */ @@ -381,14 +379,12 @@ DECLSPEC void m23001m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a } } -DECLSPEC void m23001s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (securezip_t)) +DECLSPEC void m23001s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR_ESALT (securezip_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * base */ @@ -741,8 +737,8 @@ KERNEL_FQ void m23001_m04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -823,7 +819,7 @@ KERNEL_FQ void m23001_m04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23001_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -832,8 +828,8 @@ KERNEL_FQ void m23001_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -914,7 +910,7 @@ KERNEL_FQ void m23001_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23001_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -923,8 +919,8 @@ KERNEL_FQ void m23001_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1005,7 +1001,7 @@ KERNEL_FQ void m23001_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23001m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23001_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1014,8 +1010,8 @@ KERNEL_FQ void m23001_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1096,7 +1092,7 @@ KERNEL_FQ void m23001_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23001_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1105,8 +1101,8 @@ KERNEL_FQ void m23001_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1187,7 +1183,7 @@ KERNEL_FQ void m23001_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23001_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1196,8 +1192,8 @@ KERNEL_FQ void m23001_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1278,5 +1274,5 @@ KERNEL_FQ void m23001_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23001s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m23002_a3-optimized.cl b/OpenCL/m23002_a3-optimized.cl index 566c8c77b..936a9839b 100644 --- a/OpenCL/m23002_a3-optimized.cl +++ b/OpenCL/m23002_a3-optimized.cl @@ -27,14 +27,12 @@ typedef struct securezip } securezip_t; -DECLSPEC void m23002m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (securezip_t)) +DECLSPEC void m23002m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR_ESALT (securezip_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * base */ @@ -434,14 +432,12 @@ DECLSPEC void m23002m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a } } -DECLSPEC void m23002s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (securezip_t)) +DECLSPEC void m23002s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR_ESALT (securezip_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * base */ @@ -847,8 +843,8 @@ KERNEL_FQ void m23002_m04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -929,7 +925,7 @@ KERNEL_FQ void m23002_m04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23002_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -938,8 +934,8 @@ KERNEL_FQ void m23002_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1020,7 +1016,7 @@ KERNEL_FQ void m23002_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23002_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1029,8 +1025,8 @@ KERNEL_FQ void m23002_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1111,7 +1107,7 @@ KERNEL_FQ void m23002_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23002m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23002_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1120,8 +1116,8 @@ KERNEL_FQ void m23002_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1202,7 +1198,7 @@ KERNEL_FQ void m23002_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23002_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1211,8 +1207,8 @@ KERNEL_FQ void m23002_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1293,7 +1289,7 @@ KERNEL_FQ void m23002_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23002_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1302,8 +1298,8 @@ KERNEL_FQ void m23002_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1384,5 +1380,5 @@ KERNEL_FQ void m23002_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23002s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m23003_a3-optimized.cl b/OpenCL/m23003_a3-optimized.cl index 11d2551a4..3e1f5d2cf 100644 --- a/OpenCL/m23003_a3-optimized.cl +++ b/OpenCL/m23003_a3-optimized.cl @@ -27,14 +27,12 @@ typedef struct securezip } securezip_t; -DECLSPEC void m23003m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (securezip_t)) +DECLSPEC void m23003m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR_ESALT (securezip_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * base */ @@ -436,14 +434,12 @@ DECLSPEC void m23003m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a } } -DECLSPEC void m23003s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (securezip_t)) +DECLSPEC void m23003s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR_ESALT (securezip_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * base */ @@ -851,8 +847,8 @@ KERNEL_FQ void m23003_m04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -933,7 +929,7 @@ KERNEL_FQ void m23003_m04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23003_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -942,8 +938,8 @@ KERNEL_FQ void m23003_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1024,7 +1020,7 @@ KERNEL_FQ void m23003_m08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23003_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1033,8 +1029,8 @@ KERNEL_FQ void m23003_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1115,7 +1111,7 @@ KERNEL_FQ void m23003_m16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23003m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23003_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1124,8 +1120,8 @@ KERNEL_FQ void m23003_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1206,7 +1202,7 @@ KERNEL_FQ void m23003_s04 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23003_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1215,8 +1211,8 @@ KERNEL_FQ void m23003_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1297,7 +1293,7 @@ KERNEL_FQ void m23003_s08 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m23003_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) @@ -1306,8 +1302,8 @@ KERNEL_FQ void m23003_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1388,5 +1384,5 @@ KERNEL_FQ void m23003_s16 (KERN_ATTR_VECTOR_ESALT (securezip_t)) * main */ - m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m23003s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m23100-pure.cl b/OpenCL/m23100-pure.cl index e0c4986f0..6d61e860e 100644 --- a/OpenCL/m23100-pure.cl +++ b/OpenCL/m23100-pure.cl @@ -35,7 +35,7 @@ typedef struct keychain } keychain_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m23200-pure.cl b/OpenCL/m23200-pure.cl index dfaa02d45..960072b48 100644 --- a/OpenCL/m23200-pure.cl +++ b/OpenCL/m23200-pure.cl @@ -30,7 +30,7 @@ typedef struct xmpp_tmp } xmpp_tmp_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m23300-pure.cl b/OpenCL/m23300-pure.cl index c6e965ee2..9a5d4ec17 100644 --- a/OpenCL/m23300-pure.cl +++ b/OpenCL/m23300-pure.cl @@ -36,7 +36,7 @@ typedef struct iwork } iwork_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m23400-pure.cl b/OpenCL/m23400-pure.cl index 2d5693c65..c200c7672 100644 --- a/OpenCL/m23400-pure.cl +++ b/OpenCL/m23400-pure.cl @@ -30,7 +30,7 @@ typedef struct bitwarden_tmp } bitwarden_tmp_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m23500-pure.cl b/OpenCL/m23500-pure.cl index f2d150e61..8603333cd 100644 --- a/OpenCL/m23500-pure.cl +++ b/OpenCL/m23500-pure.cl @@ -38,7 +38,7 @@ typedef struct axcrypt2_tmp } axcrypt2_tmp_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m23600-pure.cl b/OpenCL/m23600-pure.cl index b19959293..27759e850 100644 --- a/OpenCL/m23600-pure.cl +++ b/OpenCL/m23600-pure.cl @@ -38,7 +38,7 @@ typedef struct axcrypt2_tmp } axcrypt2_tmp_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m23700-optimized.cl b/OpenCL/m23700-optimized.cl index 1e7ccfc3f..4529ad7b1 100644 --- a/OpenCL/m23700-optimized.cl +++ b/OpenCL/m23700-optimized.cl @@ -20,11 +20,11 @@ #define ROUNDS 0x40000 -#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) -#define GETCHAR(a,p) ((u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((PRIVATE_AS u8 *)(a))[(p)] = (u8) (c) +#define GETCHAR(a,p) ((PRIVATE_AS u8 *)(a))[(p)] -#define PUTCHAR_BE(a,p,c) ((u8 *)(a))[(p) ^ 3] = (u8) (c) -#define GETCHAR_BE(a,p) ((u8 *)(a))[(p) ^ 3] +#define PUTCHAR_BE(a,p,c) ((PRIVATE_AS u8 *)(a))[(p) ^ 3] = (u8) (c) +#define GETCHAR_BE(a,p) ((PRIVATE_AS u8 *)(a))[(p) ^ 3] #define MIN(a,b) (((a) < (b)) ? (a) : (b)) @@ -120,7 +120,7 @@ DECLSPEC u32 round_crc32 (const u32 a, const u32 v, LOCAL_AS u32 *l_crc32tab) return l_crc32tab[k] ^ s; } -DECLSPEC u32 round_crc32_16 (const u32 crc32, const u32 *buf, const u32 len, LOCAL_AS u32 *l_crc32tab) +DECLSPEC u32 round_crc32_16 (const u32 crc32, PRIVATE_AS const u32 *buf, const u32 len, LOCAL_AS u32 *l_crc32tab) { const int crc_len = MIN (len, 16); diff --git a/OpenCL/m23700-pure.cl b/OpenCL/m23700-pure.cl index 9f39c7e88..b4bf1a887 100644 --- a/OpenCL/m23700-pure.cl +++ b/OpenCL/m23700-pure.cl @@ -118,7 +118,7 @@ DECLSPEC u32 round_crc32 (const u32 a, const u32 v, LOCAL_AS u32 *l_crc32tab) return l_crc32tab[k] ^ s; } -DECLSPEC u32 round_crc32_16 (const u32 crc32, const u32 *buf, const u32 len, LOCAL_AS u32 *l_crc32tab) +DECLSPEC u32 round_crc32_16 (const u32 crc32, PRIVATE_AS const u32 *buf, const u32 len, LOCAL_AS u32 *l_crc32tab) { const int crc_len = MIN (len, 16); @@ -138,7 +138,7 @@ DECLSPEC u32 round_crc32_16 (const u32 crc32, const u32 *buf, const u32 len, LOC return c; } -DECLSPEC void memcat8c_be (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len, const u32 append, u32 *digest) +DECLSPEC void memcat8c_be (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 len, const u32 append, PRIVATE_AS u32 *digest) { const u32 func_len = len & 63; @@ -217,7 +217,7 @@ DECLSPEC void memcat8c_be (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len, co // only change in this function compared to OpenCL/inc_hash_sha1.cl is that it returns // the expanded 64 byte buffer w0_t..wf_t in t[]: -DECLSPEC void sha1_transform_rar29 (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest, u32 *t) +DECLSPEC void sha1_transform_rar29 (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest, PRIVATE_AS u32 *t) { u32 a = digest[0]; u32 b = digest[1]; @@ -566,7 +566,7 @@ DECLSPEC void sha1_transform_rar29 (const u32 *w0, const u32 *w1, const u32 *w2, // only change in this function compared to OpenCL/inc_hash_sha1.cl is that // it calls our modified sha1_transform_rar29 () function -DECLSPEC void sha1_update_64_rar29 (sha1_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int bytes, u32 *t) +DECLSPEC void sha1_update_64_rar29 (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int bytes, PRIVATE_AS u32 *t) { if (bytes == 0) return; @@ -696,7 +696,7 @@ DECLSPEC void sha1_update_64_rar29 (sha1_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, // main change in this function compared to OpenCL/inc_hash_sha1.cl is that // we call sha1_update_64_rar29 () and sometimes replace w[] -DECLSPEC void sha1_update_rar29 (sha1_ctx_t *ctx, u32 *w, const int len) +DECLSPEC void sha1_update_rar29 (PRIVATE_AS sha1_ctx_t *ctx, PRIVATE_AS u32 *w, const int len) { u32 w0[4]; u32 w1[4]; diff --git a/OpenCL/m23800-optimized.cl b/OpenCL/m23800-optimized.cl index 2133ab40e..1f2957a2c 100644 --- a/OpenCL/m23800-optimized.cl +++ b/OpenCL/m23800-optimized.cl @@ -20,11 +20,11 @@ #define ROUNDS 0x40000 -#define PUTCHAR(a,p,c) ((u8 *)(a))[(p)] = (u8) (c) -#define GETCHAR(a,p) ((u8 *)(a))[(p)] +#define PUTCHAR(a,p,c) ((PRIVATE_AS u8 *)(a))[(p)] = (u8) (c) +#define GETCHAR(a,p) ((PRIVATE_AS u8 *)(a))[(p)] -#define PUTCHAR_BE(a,p,c) ((u8 *)(a))[(p) ^ 3] = (u8) (c) -#define GETCHAR_BE(a,p) ((u8 *)(a))[(p) ^ 3] +#define PUTCHAR_BE(a,p,c) ((PRIVATE_AS u8 *)(a))[(p) ^ 3] = (u8) (c) +#define GETCHAR_BE(a,p) ((PRIVATE_AS u8 *)(a))[(p) ^ 3] #define MIN(a,b) (((a) < (b)) ? (a) : (b)) diff --git a/OpenCL/m24100-pure.cl b/OpenCL/m24100-pure.cl index b3de4005b..7168ec62d 100644 --- a/OpenCL/m24100-pure.cl +++ b/OpenCL/m24100-pure.cl @@ -40,7 +40,7 @@ typedef struct mongodb_sha1 } mongodb_sha1_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m24200-pure.cl b/OpenCL/m24200-pure.cl index 0ab5fe29a..ba25d13ea 100644 --- a/OpenCL/m24200-pure.cl +++ b/OpenCL/m24200-pure.cl @@ -39,7 +39,7 @@ typedef struct mongodb_sha256 } mongodb_sha256_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m24300_a3-optimized.cl b/OpenCL/m24300_a3-optimized.cl index 5ab941ecb..b729ac468 100644 --- a/OpenCL/m24300_a3-optimized.cl +++ b/OpenCL/m24300_a3-optimized.cl @@ -29,15 +29,12 @@ #define uint_to_hex_lower8(i) make_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], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC void m24300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m24300m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -594,15 +591,12 @@ DECLSPEC void m24300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m24300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m24300s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -1177,8 +1171,8 @@ KERNEL_FQ void m24300_m04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1238,7 +1232,7 @@ KERNEL_FQ void m24300_m04 (KERN_ATTR_BASIC ()) * main */ - m24300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m24300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m24300_m08 (KERN_ATTR_BASIC ()) @@ -1247,8 +1241,8 @@ KERNEL_FQ void m24300_m08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1308,7 +1302,7 @@ KERNEL_FQ void m24300_m08 (KERN_ATTR_BASIC ()) * main */ - m24300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m24300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m24300_m16 (KERN_ATTR_BASIC ()) @@ -1317,8 +1311,8 @@ KERNEL_FQ void m24300_m16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1378,7 +1372,7 @@ KERNEL_FQ void m24300_m16 (KERN_ATTR_BASIC ()) * main */ - m24300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m24300m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m24300_s04 (KERN_ATTR_BASIC ()) @@ -1387,8 +1381,8 @@ KERNEL_FQ void m24300_s04 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1448,7 +1442,7 @@ KERNEL_FQ void m24300_s04 (KERN_ATTR_BASIC ()) * main */ - m24300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m24300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m24300_s08 (KERN_ATTR_BASIC ()) @@ -1457,8 +1451,8 @@ KERNEL_FQ void m24300_s08 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1518,7 +1512,7 @@ KERNEL_FQ void m24300_s08 (KERN_ATTR_BASIC ()) * main */ - m24300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m24300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } KERNEL_FQ void m24300_s16 (KERN_ATTR_BASIC ()) @@ -1527,8 +1521,8 @@ KERNEL_FQ void m24300_s16 (KERN_ATTR_BASIC ()) * base */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -1588,5 +1582,5 @@ KERNEL_FQ void m24300_s16 (KERN_ATTR_BASIC ()) * main */ - m24300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, l_bin2asc); + m24300s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc); } diff --git a/OpenCL/m24410-pure.cl b/OpenCL/m24410-pure.cl index 4912883d3..c79e28713 100644 --- a/OpenCL/m24410-pure.cl +++ b/OpenCL/m24410-pure.cl @@ -43,7 +43,7 @@ typedef struct pkcs } pkcs_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m24420-pure.cl b/OpenCL/m24420-pure.cl index c92fecb4b..217d59a66 100644 --- a/OpenCL/m24420-pure.cl +++ b/OpenCL/m24420-pure.cl @@ -43,7 +43,7 @@ typedef struct pkcs } pkcs_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m24500-pure.cl b/OpenCL/m24500-pure.cl index 8c97812b4..7e2cb2bf7 100644 --- a/OpenCL/m24500-pure.cl +++ b/OpenCL/m24500-pure.cl @@ -35,7 +35,7 @@ typedef struct telegram } telegram_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -93,7 +93,7 @@ DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w sha512_transform_vector (w0, w1, w2, w3, w4, w5, w6, w7, digest); } -DECLSPEC void sha1_run (u32 *w, u32 *res) +DECLSPEC void sha1_run (PRIVATE_AS u32 *w, PRIVATE_AS u32 *res) { u32 w0[4]; u32 w1[4]; diff --git a/OpenCL/m24610-pure.cl b/OpenCL/m24610-pure.cl index b81fdfef6..594651c55 100644 --- a/OpenCL/m24610-pure.cl +++ b/OpenCL/m24610-pure.cl @@ -40,7 +40,7 @@ typedef struct sqlcipher } sqlcipher_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m24620-pure.cl b/OpenCL/m24620-pure.cl index 657b43259..5912c77a6 100644 --- a/OpenCL/m24620-pure.cl +++ b/OpenCL/m24620-pure.cl @@ -40,7 +40,7 @@ typedef struct sqlcipher } sqlcipher_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m24630-pure.cl b/OpenCL/m24630-pure.cl index 1594200a5..176a9cee1 100644 --- a/OpenCL/m24630-pure.cl +++ b/OpenCL/m24630-pure.cl @@ -40,7 +40,7 @@ typedef struct sqlcipher } sqlcipher_t; -DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u64x *ipad, PRIVATE_AS u64x *opad, PRIVATE_AS u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m24700_a3-optimized.cl b/OpenCL/m24700_a3-optimized.cl index be2eba994..b26f8bcab 100644 --- a/OpenCL/m24700_a3-optimized.cl +++ b/OpenCL/m24700_a3-optimized.cl @@ -17,14 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void m24700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m24700m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * loop */ @@ -241,14 +239,12 @@ DECLSPEC void m24700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m24700s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m24700s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - /** * digest */ @@ -486,7 +482,9 @@ KERNEL_FQ void m24700_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); /** * modifier @@ -528,7 +526,7 @@ KERNEL_FQ void m24700_m04 (KERN_ATTR_BASIC ()) * main */ - m24700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24700_m08 (KERN_ATTR_BASIC ()) @@ -537,7 +535,9 @@ KERNEL_FQ void m24700_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); /** * modifier @@ -579,7 +579,7 @@ KERNEL_FQ void m24700_m08 (KERN_ATTR_BASIC ()) * main */ - m24700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24700_m16 (KERN_ATTR_BASIC ()) @@ -588,7 +588,9 @@ KERNEL_FQ void m24700_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); /** * modifier @@ -630,7 +632,7 @@ KERNEL_FQ void m24700_m16 (KERN_ATTR_BASIC ()) * main */ - m24700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24700m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24700_s04 (KERN_ATTR_BASIC ()) @@ -639,7 +641,9 @@ KERNEL_FQ void m24700_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); /** * modifier @@ -681,7 +685,7 @@ KERNEL_FQ void m24700_s04 (KERN_ATTR_BASIC ()) * main */ - m24700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24700_s08 (KERN_ATTR_BASIC ()) @@ -690,7 +694,9 @@ KERNEL_FQ void m24700_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); /** * modifier @@ -732,7 +738,7 @@ KERNEL_FQ void m24700_s08 (KERN_ATTR_BASIC ()) * main */ - m24700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24700_s16 (KERN_ATTR_BASIC ()) @@ -741,7 +747,9 @@ KERNEL_FQ void m24700_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); /** * modifier @@ -783,5 +791,5 @@ KERNEL_FQ void m24700_s16 (KERN_ATTR_BASIC ()) * main */ - m24700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24700s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m24800_a0-optimized.cl b/OpenCL/m24800_a0-optimized.cl index 3bde899ad..996f3a399 100644 --- a/OpenCL/m24800_a0-optimized.cl +++ b/OpenCL/m24800_a0-optimized.cl @@ -19,7 +19,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -72,7 +72,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m24800_a1-optimized.cl b/OpenCL/m24800_a1-optimized.cl index edb2318a2..a6981f75e 100644 --- a/OpenCL/m24800_a1-optimized.cl +++ b/OpenCL/m24800_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -70,7 +70,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m24800_a3-optimized.cl b/OpenCL/m24800_a3-optimized.cl index 1eedb8d6f..7b2cad30b 100644 --- a/OpenCL/m24800_a3-optimized.cl +++ b/OpenCL/m24800_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -70,7 +70,7 @@ DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -106,15 +106,12 @@ DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void m24800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m24800m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -213,15 +210,12 @@ DECLSPEC void m24800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m24800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m24800s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -338,7 +332,9 @@ KERNEL_FQ void m24800_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -376,7 +372,7 @@ KERNEL_FQ void m24800_m04 (KERN_ATTR_BASIC ()) * main */ - m24800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24800_m08 (KERN_ATTR_BASIC ()) @@ -385,7 +381,9 @@ KERNEL_FQ void m24800_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -423,7 +421,7 @@ KERNEL_FQ void m24800_m08 (KERN_ATTR_BASIC ()) * main */ - m24800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24800_m16 (KERN_ATTR_BASIC ()) @@ -432,7 +430,9 @@ KERNEL_FQ void m24800_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -470,7 +470,7 @@ KERNEL_FQ void m24800_m16 (KERN_ATTR_BASIC ()) * main */ - m24800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24800m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24800_s04 (KERN_ATTR_BASIC ()) @@ -479,7 +479,9 @@ KERNEL_FQ void m24800_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -517,7 +519,7 @@ KERNEL_FQ void m24800_s04 (KERN_ATTR_BASIC ()) * main */ - m24800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24800_s08 (KERN_ATTR_BASIC ()) @@ -526,7 +528,9 @@ KERNEL_FQ void m24800_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -564,7 +568,7 @@ KERNEL_FQ void m24800_s08 (KERN_ATTR_BASIC ()) * main */ - m24800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24800_s16 (KERN_ATTR_BASIC ()) @@ -573,7 +577,9 @@ KERNEL_FQ void m24800_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -611,5 +617,5 @@ KERNEL_FQ void m24800_s16 (KERN_ATTR_BASIC ()) * main */ - m24800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24800s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m24900_a3-optimized.cl b/OpenCL/m24900_a3-optimized.cl index 115829b7f..9f0c2e514 100644 --- a/OpenCL/m24900_a3-optimized.cl +++ b/OpenCL/m24900_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC void m24900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m24900m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * loop */ @@ -162,15 +159,12 @@ DECLSPEC void m24900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m24900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m24900s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -325,7 +319,9 @@ KERNEL_FQ void m24900_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -363,7 +359,7 @@ KERNEL_FQ void m24900_m04 (KERN_ATTR_BASIC ()) * main */ - m24900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24900_m08 (KERN_ATTR_BASIC ()) @@ -372,7 +368,9 @@ KERNEL_FQ void m24900_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -410,7 +408,7 @@ KERNEL_FQ void m24900_m08 (KERN_ATTR_BASIC ()) * main */ - m24900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24900_m16 (KERN_ATTR_BASIC ()) @@ -419,7 +417,9 @@ KERNEL_FQ void m24900_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -457,7 +457,7 @@ KERNEL_FQ void m24900_m16 (KERN_ATTR_BASIC ()) * main */ - m24900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24900m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24900_s04 (KERN_ATTR_BASIC ()) @@ -466,7 +466,9 @@ KERNEL_FQ void m24900_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -504,7 +506,7 @@ KERNEL_FQ void m24900_s04 (KERN_ATTR_BASIC ()) * main */ - m24900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24900_s08 (KERN_ATTR_BASIC ()) @@ -513,7 +515,9 @@ KERNEL_FQ void m24900_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -551,7 +555,7 @@ KERNEL_FQ void m24900_s08 (KERN_ATTR_BASIC ()) * main */ - m24900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m24900_s16 (KERN_ATTR_BASIC ()) @@ -560,7 +564,9 @@ KERNEL_FQ void m24900_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -598,5 +604,5 @@ KERNEL_FQ void m24900_s16 (KERN_ATTR_BASIC ()) * main */ - m24900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m24900s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m25000-pure.cl b/OpenCL/m25000-pure.cl index 5c978c3ab..7cceb1ab0 100644 --- a/OpenCL/m25000-pure.cl +++ b/OpenCL/m25000-pure.cl @@ -85,13 +85,13 @@ KERNEL_FQ void m25000_init (KERN_ATTR_TMPS_ESALT (hmac_md5_tmp_t, snmpv3_t)) w[idx] = pws[gid].i[idx]; } - u8 *src_ptr = (u8 *) w; + PRIVATE_AS u8 *src_ptr = (PRIVATE_AS u8 *) w; // password 64 times, also swapped u32 dst_buf[16]; - u8 *dst_ptr = (u8 *) dst_buf; + PRIVATE_AS u8 *dst_ptr = (PRIVATE_AS u8 *) dst_buf; int tmp_idx = 0; diff --git a/OpenCL/m25100-pure.cl b/OpenCL/m25100-pure.cl index 27dc5eb6d..e7007b60a 100644 --- a/OpenCL/m25100-pure.cl +++ b/OpenCL/m25100-pure.cl @@ -80,13 +80,13 @@ KERNEL_FQ void m25100_init (KERN_ATTR_TMPS_ESALT (hmac_md5_tmp_t, snmpv3_t)) w[idx] = pws[gid].i[idx]; } - u8 *src_ptr = (u8 *) w; + PRIVATE_AS u8 *src_ptr = (PRIVATE_AS u8 *) w; // password 64 times, also swapped u32 dst_buf[16]; - u8 *dst_ptr = (u8 *) dst_buf; + PRIVATE_AS u8 *dst_ptr = (PRIVATE_AS u8 *) dst_buf; int tmp_idx = 0; diff --git a/OpenCL/m25200-pure.cl b/OpenCL/m25200-pure.cl index ab72d5f80..3952db69c 100644 --- a/OpenCL/m25200-pure.cl +++ b/OpenCL/m25200-pure.cl @@ -80,13 +80,13 @@ KERNEL_FQ void m25200_init (KERN_ATTR_TMPS_ESALT (hmac_sha1_tmp_t, snmpv3_t)) w[idx] = pws[gid].i[idx]; } - u8 *src_ptr = (u8 *) w; + PRIVATE_AS u8 *src_ptr = (PRIVATE_AS u8 *) w; // password 64 times, also swapped u32 dst_buf[16]; - u8 *dst_ptr = (u8 *) dst_buf; + PRIVATE_AS u8 *dst_ptr = (PRIVATE_AS u8 *) dst_buf; int tmp_idx = 0; diff --git a/OpenCL/m25400-pure.cl b/OpenCL/m25400-pure.cl index 088689016..38f009388 100644 --- a/OpenCL/m25400-pure.cl +++ b/OpenCL/m25400-pure.cl @@ -284,12 +284,12 @@ KERNEL_FQ void m25400_loop (KERN_ATTR_TMPS_ESALT (pdf14_tmp_t, pdf_t)) tmp[2] = o_rc4_decryption_key[2] ^ xv; tmp[3] = o_rc4_decryption_key[3] ^ xv; - rc4_init_128 (S, tmp); - rc4_next_16 (S, 0, 0, out, out); + rc4_init_128 (S, tmp, lid); + rc4_next_16 (S, 0, 0, out, out, lid); } - rc4_init_128 (S, o_rc4_decryption_key); - rc4_next_16 (S, 0, 0, out, out); // output of the rc4 decrypt of the o-value should be the padded user-password + rc4_init_128 (S, o_rc4_decryption_key, lid); + rc4_next_16 (S, 0, 0, out, out, lid); // output of the rc4 decrypt of the o-value should be the padded user-password tmps[gid].digest[0] = digest[0]; tmps[gid].digest[1] = digest[1]; @@ -357,14 +357,12 @@ KERNEL_FQ void m25400_comp (KERN_ATTR_TMPS_ESALT (pdf14_tmp_t, pdf_t)) for (int i = 0; i < 16; i++) { // cast out buffer to byte such that we can do a byte per byte comparison - const u32 *u32OutBufPtr = out; - const u8 *u8OutBufPtr; - u8OutBufPtr = (u8*) u32OutBufPtr; + PRIVATE_AS const u32 *u32OutBufPtr = (PRIVATE_AS u32 *) out; + PRIVATE_AS const u8 *u8OutBufPtr = (PRIVATE_AS u8 *) u32OutBufPtr; // cast padding buffer to byte such that we can do a byte per byte comparison - const u32 *u32OutPadPtr = padding; - const u8 *u8OutPadPtr; - u8OutPadPtr = (u8*) u32OutPadPtr; + PRIVATE_AS const u32 *u32OutPadPtr = (PRIVATE_AS u32 *) padding; + PRIVATE_AS const u8 *u8OutPadPtr = (PRIVATE_AS u8 *) u32OutPadPtr; // we don't use the user-password in the attack now (as we don't need it), // however we could use it in the comparison of the decrypted o-value, diff --git a/OpenCL/m25500-pure.cl b/OpenCL/m25500-pure.cl index 3728d6395..705063eae 100644 --- a/OpenCL/m25500-pure.cl +++ b/OpenCL/m25500-pure.cl @@ -42,7 +42,7 @@ typedef struct pbkdf2_sha256_aes_gcm } pbkdf2_sha256_aes_gcm_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m25600-pure.cl b/OpenCL/m25600-pure.cl index 5c4dd0369..e1bd89ea7 100644 --- a/OpenCL/m25600-pure.cl +++ b/OpenCL/m25600-pure.cl @@ -421,10 +421,10 @@ DECLSPEC inline void SET_KEY32 (LOCAL_AS u32 *S, const u64 key, const u32 val) extern __shared__ u32 S[]; #endif -DECLSPEC void expand_key (u32 *E, u32 *W, const int len) +DECLSPEC void expand_key (PRIVATE_AS u32 *E, PRIVATE_AS u32 *W, const int len) { - u8 *E_ptr = (u8 *) E; - u8 *W_ptr = (u8 *) W; + PRIVATE_AS u8 *E_ptr = (PRIVATE_AS u8 *) E; + PRIVATE_AS u8 *W_ptr = (PRIVATE_AS u8 *) W; for (int pos = 0; pos < 72; pos++) // pos++ is not a bug, we actually want that zero byte here { diff --git a/OpenCL/m25700_a0-optimized.cl b/OpenCL/m25700_a0-optimized.cl index 5d30b7e79..de8ba1979 100644 --- a/OpenCL/m25700_a0-optimized.cl +++ b/OpenCL/m25700_a0-optimized.cl @@ -18,7 +18,7 @@ #include STR(INCLUDE_PATH/inc_simd.cl) #endif -DECLSPEC u32 MurmurHash (const u32 seed, const u32 *w, const int pw_len) +DECLSPEC u32 MurmurHash (const u32 seed, PRIVATE_AS const u32 *w, const int pw_len) { u32 hash = seed; diff --git a/OpenCL/m25700_a1-optimized.cl b/OpenCL/m25700_a1-optimized.cl index b18650dbe..7b94e140d 100644 --- a/OpenCL/m25700_a1-optimized.cl +++ b/OpenCL/m25700_a1-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_simd.cl) #endif -DECLSPEC u32 MurmurHash (const u32 seed, const u32 *w, const int pw_len) +DECLSPEC u32 MurmurHash (const u32 seed, PRIVATE_AS const u32 *w, const int pw_len) { u32 hash = seed; diff --git a/OpenCL/m25700_a3-optimized.cl b/OpenCL/m25700_a3-optimized.cl index a94a4927b..0f1860695 100644 --- a/OpenCL/m25700_a3-optimized.cl +++ b/OpenCL/m25700_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_md5.cl) #endif -DECLSPEC u32x MurmurHash_w0 (const u32 seed, const u32x w0, const u32 *w, const int pw_len) +DECLSPEC u32x MurmurHash_w0 (const u32 seed, const u32x w0, PRIVATE_AS const u32 *w, const int pw_len) { u32x hash = seed; @@ -78,15 +78,12 @@ DECLSPEC u32x MurmurHash_w0 (const u32 seed, const u32x w0, const u32 *w, const return hash; } -DECLSPEC void m25700m (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m25700m (PRIVATE_AS const u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * seed */ @@ -116,15 +113,12 @@ DECLSPEC void m25700m (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m25700s (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m25700s (PRIVATE_AS const u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -172,7 +166,9 @@ KERNEL_FQ void m25700_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -201,7 +197,7 @@ KERNEL_FQ void m25700_m04 (KERN_ATTR_VECTOR ()) * main */ - m25700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m25700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m25700_m08 (KERN_ATTR_VECTOR ()) @@ -210,7 +206,9 @@ KERNEL_FQ void m25700_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -239,7 +237,7 @@ KERNEL_FQ void m25700_m08 (KERN_ATTR_VECTOR ()) * main */ - m25700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m25700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m25700_m16 (KERN_ATTR_VECTOR ()) @@ -248,7 +246,9 @@ KERNEL_FQ void m25700_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -277,7 +277,7 @@ KERNEL_FQ void m25700_m16 (KERN_ATTR_VECTOR ()) * main */ - m25700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m25700m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m25700_s04 (KERN_ATTR_VECTOR ()) @@ -286,7 +286,9 @@ KERNEL_FQ void m25700_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -315,7 +317,7 @@ KERNEL_FQ void m25700_s04 (KERN_ATTR_VECTOR ()) * main */ - m25700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m25700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m25700_s08 (KERN_ATTR_VECTOR ()) @@ -324,7 +326,9 @@ KERNEL_FQ void m25700_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -353,7 +357,7 @@ KERNEL_FQ void m25700_s08 (KERN_ATTR_VECTOR ()) * main */ - m25700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m25700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m25700_s16 (KERN_ATTR_VECTOR ()) @@ -362,7 +366,9 @@ KERNEL_FQ void m25700_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -391,5 +397,5 @@ KERNEL_FQ void m25700_s16 (KERN_ATTR_VECTOR ()) * main */ - m25700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m25700s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m25800-pure.cl b/OpenCL/m25800-pure.cl index 6624bcc62..95e1d34c2 100644 --- a/OpenCL/m25800-pure.cl +++ b/OpenCL/m25800-pure.cl @@ -337,17 +337,13 @@ CONSTANT_VK u32a c_pbox[18] = #define KEY32(lid,key) (((key) * FIXED_LOCAL_SIZE) + (lid)) -DECLSPEC u32 GET_KEY32 (LOCAL_AS u32 *S, const u64 key) +DECLSPEC u32 GET_KEY32 (LOCAL_AS u32 *S, const u64 key, const u64 lid) { - const u64 lid = get_local_id (0); - return S[KEY32 (lid, key)]; } -DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const u64 key, const u32 val) +DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const u64 key, const u32 val, const u64 lid) { - const u64 lid = get_local_id (0); - S[KEY32 (lid, key)] = val; } @@ -358,12 +354,12 @@ DECLSPEC void SET_KEY32 (LOCAL_AS u32 *S, const u64 key, const u32 val) // access pattern: linear access with S offset already set to right offset based on thread ID saving it from compuation // makes sense if there are not thread ID's (for instance on CPU) -DECLSPEC inline u32 GET_KEY32 (LOCAL_AS u32 *S, const u64 key) +DECLSPEC inline u32 GET_KEY32 (LOCAL_AS u32 *S, const u64 key, MAYBE_UNUSED const u64 lid) { return S[key]; } -DECLSPEC inline void SET_KEY32 (LOCAL_AS u32 *S, const u64 key, const u32 val) +DECLSPEC inline void SET_KEY32 (LOCAL_AS u32 *S, const u64 key, const u32 val, MAYBE_UNUSED const u64 lid) { S[key] = val; } @@ -379,10 +375,10 @@ DECLSPEC inline void SET_KEY32 (LOCAL_AS u32 *S, const u64 key, const u32 val) const u32 r2 = unpack_v8b_from_v32_S ((L)); \ const u32 r3 = unpack_v8a_from_v32_S ((L)); \ \ - tmp = GET_KEY32 (S0, r0); \ - tmp += GET_KEY32 (S1, r1); \ - tmp ^= GET_KEY32 (S2, r2); \ - tmp += GET_KEY32 (S3, r3); \ + tmp = GET_KEY32 (S0, r0, lid); \ + tmp += GET_KEY32 (S1, r1, lid); \ + tmp ^= GET_KEY32 (S2, r2, lid); \ + tmp += GET_KEY32 (S3, r3, lid); \ \ (R) ^= tmp ^ P[(N)]; \ } @@ -421,10 +417,10 @@ DECLSPEC inline void SET_KEY32 (LOCAL_AS u32 *S, const u64 key, const u32 val) extern __shared__ u32 S[]; #endif -DECLSPEC void expand_key (u32 *E, u32 *W, const int len) +DECLSPEC void expand_key (PRIVATE_AS u32 *E, PRIVATE_AS u32 *W, const int len) { - u8 *E_ptr = (u8 *) E; - u8 *W_ptr = (u8 *) W; + PRIVATE_AS u8 *E_ptr = (PRIVATE_AS u8 *) E; + PRIVATE_AS u8 *W_ptr = (PRIVATE_AS u8 *) W; for (int pos = 0; pos < 72; pos++) // pos++ is not a bug, we actually want that zero byte here { @@ -573,10 +569,10 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m25800_init (KERN_ATTR_TMPS for (u32 i = 0; i < 256; i++) { - SET_KEY32 (S0, i, c_sbox0[i]); - SET_KEY32 (S1, i, c_sbox1[i]); - SET_KEY32 (S2, i, c_sbox2[i]); - SET_KEY32 (S3, i, c_sbox3[i]); + SET_KEY32 (S0, i, c_sbox0[i], lid); + SET_KEY32 (S1, i, c_sbox1[i], lid); + SET_KEY32 (S2, i, c_sbox2[i], lid); + SET_KEY32 (S3, i, c_sbox3[i], lid); } // expandstate @@ -607,16 +603,16 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m25800_init (KERN_ATTR_TMPS BF_ENCRYPT (L0, R0); - SET_KEY32 (S0, i + 0, L0); - SET_KEY32 (S0, i + 1, R0); + SET_KEY32 (S0, i + 0, L0, lid); + SET_KEY32 (S0, i + 1, R0, lid); L0 ^= salt_buf[0]; R0 ^= salt_buf[1]; BF_ENCRYPT (L0, R0); - SET_KEY32 (S0, i + 2, L0); - SET_KEY32 (S0, i + 3, R0); + SET_KEY32 (S0, i + 2, L0, lid); + SET_KEY32 (S0, i + 3, R0, lid); } for (u32 i = 0; i < 256; i += 4) @@ -626,16 +622,16 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m25800_init (KERN_ATTR_TMPS BF_ENCRYPT (L0, R0); - SET_KEY32 (S1, i + 0, L0); - SET_KEY32 (S1, i + 1, R0); + SET_KEY32 (S1, i + 0, L0, lid); + SET_KEY32 (S1, i + 1, R0, lid); L0 ^= salt_buf[0]; R0 ^= salt_buf[1]; BF_ENCRYPT (L0, R0); - SET_KEY32 (S1, i + 2, L0); - SET_KEY32 (S1, i + 3, R0); + SET_KEY32 (S1, i + 2, L0, lid); + SET_KEY32 (S1, i + 3, R0, lid); } for (u32 i = 0; i < 256; i += 4) @@ -645,16 +641,16 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m25800_init (KERN_ATTR_TMPS BF_ENCRYPT (L0, R0); - SET_KEY32 (S2, i + 0, L0); - SET_KEY32 (S2, i + 1, R0); + SET_KEY32 (S2, i + 0, L0, lid); + SET_KEY32 (S2, i + 1, R0, lid); L0 ^= salt_buf[0]; R0 ^= salt_buf[1]; BF_ENCRYPT (L0, R0); - SET_KEY32 (S2, i + 2, L0); - SET_KEY32 (S2, i + 3, R0); + SET_KEY32 (S2, i + 2, L0, lid); + SET_KEY32 (S2, i + 3, R0, lid); } for (u32 i = 0; i < 256; i += 4) @@ -664,16 +660,16 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m25800_init (KERN_ATTR_TMPS BF_ENCRYPT (L0, R0); - SET_KEY32 (S3, i + 0, L0); - SET_KEY32 (S3, i + 1, R0); + SET_KEY32 (S3, i + 0, L0, lid); + SET_KEY32 (S3, i + 1, R0, lid); L0 ^= salt_buf[0]; R0 ^= salt_buf[1]; BF_ENCRYPT (L0, R0); - SET_KEY32 (S3, i + 2, L0); - SET_KEY32 (S3, i + 3, R0); + SET_KEY32 (S3, i + 2, L0, lid); + SET_KEY32 (S3, i + 3, R0, lid); } // store @@ -685,10 +681,10 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m25800_init (KERN_ATTR_TMPS for (u32 i = 0; i < 256; i++) { - tmps[gid].S0[i] = GET_KEY32 (S0, i); - tmps[gid].S1[i] = GET_KEY32 (S1, i); - tmps[gid].S2[i] = GET_KEY32 (S2, i); - tmps[gid].S3[i] = GET_KEY32 (S3, i); + tmps[gid].S0[i] = GET_KEY32 (S0, i, lid); + tmps[gid].S1[i] = GET_KEY32 (S1, i, lid); + tmps[gid].S2[i] = GET_KEY32 (S2, i, lid); + tmps[gid].S3[i] = GET_KEY32 (S3, i, lid); } } @@ -742,10 +738,10 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m25800_loop (KERN_ATTR_TMPS for (u32 i = 0; i < 256; i++) { - SET_KEY32 (S0, i, tmps[gid].S0[i]); - SET_KEY32 (S1, i, tmps[gid].S1[i]); - SET_KEY32 (S2, i, tmps[gid].S2[i]); - SET_KEY32 (S3, i, tmps[gid].S3[i]); + SET_KEY32 (S0, i, tmps[gid].S0[i], lid); + SET_KEY32 (S1, i, tmps[gid].S1[i], lid); + SET_KEY32 (S2, i, tmps[gid].S2[i], lid); + SET_KEY32 (S3, i, tmps[gid].S3[i], lid); } /** @@ -788,32 +784,32 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m25800_loop (KERN_ATTR_TMPS { BF_ENCRYPT (L0, R0); - SET_KEY32 (S0, i + 0, L0); - SET_KEY32 (S0, i + 1, R0); + SET_KEY32 (S0, i + 0, L0, lid); + SET_KEY32 (S0, i + 1, R0, lid); } for (u32 i = 0; i < 256; i += 2) { BF_ENCRYPT (L0, R0); - SET_KEY32 (S1, i + 0, L0); - SET_KEY32 (S1, i + 1, R0); + SET_KEY32 (S1, i + 0, L0, lid); + SET_KEY32 (S1, i + 1, R0, lid); } for (u32 i = 0; i < 256; i += 2) { BF_ENCRYPT (L0, R0); - SET_KEY32 (S2, i + 0, L0); - SET_KEY32 (S2, i + 1, R0); + SET_KEY32 (S2, i + 0, L0, lid); + SET_KEY32 (S2, i + 1, R0, lid); } for (u32 i = 0; i < 256; i += 2) { BF_ENCRYPT (L0, R0); - SET_KEY32 (S3, i + 0, L0); - SET_KEY32 (S3, i + 1, R0); + SET_KEY32 (S3, i + 0, L0, lid); + SET_KEY32 (S3, i + 1, R0, lid); } P[ 0] ^= salt_buf[0]; @@ -850,32 +846,32 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m25800_loop (KERN_ATTR_TMPS { BF_ENCRYPT (L0, R0); - SET_KEY32 (S0, i + 0, L0); - SET_KEY32 (S0, i + 1, R0); + SET_KEY32 (S0, i + 0, L0, lid); + SET_KEY32 (S0, i + 1, R0, lid); } for (u32 i = 0; i < 256; i += 2) { BF_ENCRYPT (L0, R0); - SET_KEY32 (S1, i + 0, L0); - SET_KEY32 (S1, i + 1, R0); + SET_KEY32 (S1, i + 0, L0, lid); + SET_KEY32 (S1, i + 1, R0, lid); } for (u32 i = 0; i < 256; i += 2) { BF_ENCRYPT (L0, R0); - SET_KEY32 (S2, i + 0, L0); - SET_KEY32 (S2, i + 1, R0); + SET_KEY32 (S2, i + 0, L0, lid); + SET_KEY32 (S2, i + 1, R0, lid); } for (u32 i = 0; i < 256; i += 2) { BF_ENCRYPT (L0, R0); - SET_KEY32 (S3, i + 0, L0); - SET_KEY32 (S3, i + 1, R0); + SET_KEY32 (S3, i + 0, L0, lid); + SET_KEY32 (S3, i + 1, R0, lid); } } @@ -888,10 +884,10 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m25800_loop (KERN_ATTR_TMPS for (u32 i = 0; i < 256; i++) { - tmps[gid].S0[i] = GET_KEY32 (S0, i); - tmps[gid].S1[i] = GET_KEY32 (S1, i); - tmps[gid].S2[i] = GET_KEY32 (S2, i); - tmps[gid].S3[i] = GET_KEY32 (S3, i); + tmps[gid].S0[i] = GET_KEY32 (S0, i, lid); + tmps[gid].S1[i] = GET_KEY32 (S1, i, lid); + tmps[gid].S2[i] = GET_KEY32 (S2, i, lid); + tmps[gid].S3[i] = GET_KEY32 (S3, i, lid); } } @@ -938,10 +934,10 @@ KERNEL_FQ void FIXED_THREAD_COUNT(FIXED_LOCAL_SIZE) m25800_comp (KERN_ATTR_TMPS for (u32 i = 0; i < 256; i++) { - SET_KEY32 (S0, i, tmps[gid].S0[i]); - SET_KEY32 (S1, i, tmps[gid].S1[i]); - SET_KEY32 (S2, i, tmps[gid].S2[i]); - SET_KEY32 (S3, i, tmps[gid].S3[i]); + SET_KEY32 (S0, i, tmps[gid].S0[i], lid); + SET_KEY32 (S1, i, tmps[gid].S1[i], lid); + SET_KEY32 (S2, i, tmps[gid].S2[i], lid); + SET_KEY32 (S3, i, tmps[gid].S3[i], lid); } /** diff --git a/OpenCL/m25900-pure.cl b/OpenCL/m25900-pure.cl index 7e78f9fbc..ab4b1fc5f 100644 --- a/OpenCL/m25900-pure.cl +++ b/OpenCL/m25900-pure.cl @@ -39,7 +39,7 @@ typedef struct pbkdf2_sha256_tmp } pbkdf2_sha256_tmp_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -81,7 +81,7 @@ DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *i sha256_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes128_encrypt_cbc (PRIVATE_AS const u32 *aes_ks, PRIVATE_AS u32 *aes_iv, PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 in_s[4]; diff --git a/OpenCL/m26100-pure.cl b/OpenCL/m26100-pure.cl index 80ab77c42..feb69eb90 100644 --- a/OpenCL/m26100-pure.cl +++ b/OpenCL/m26100-pure.cl @@ -39,7 +39,7 @@ typedef struct mozilla_aes } mozilla_aes_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m26200_a0-pure.cl b/OpenCL/m26200_a0-pure.cl index d6cdab231..5ba129646 100644 --- a/OpenCL/m26200_a0-pure.cl +++ b/OpenCL/m26200_a0-pure.cl @@ -69,7 +69,7 @@ KERNEL_FQ void m26200_mxx (KERN_ATTR_RULES ()) u8 scratch[16] = { 0 }; - u8 *input = (u8 *) tmp.i; + PRIVATE_AS u8 *input = (PRIVATE_AS u8 *) tmp.i; for (u32 i = 0; i < 5; i++) { @@ -120,7 +120,7 @@ KERNEL_FQ void m26200_mxx (KERN_ATTR_RULES ()) } } - u32 *digest = (u32 *) target; + PRIVATE_AS u32 *digest = (PRIVATE_AS u32 *) target; const u32 r0 = digest[DGST_R0]; const u32 r1 = digest[DGST_R1]; @@ -174,7 +174,7 @@ KERNEL_FQ void m26200_sxx (KERN_ATTR_RULES ()) u8 scratch[16] = { 0 }; - u8 *input = (u8 *) tmp.i; + PRIVATE_AS u8 *input = (PRIVATE_AS u8 *) tmp.i; for (u32 i = 0; i < 5; i++) { @@ -225,7 +225,7 @@ KERNEL_FQ void m26200_sxx (KERN_ATTR_RULES ()) } } - u32 *digest = (u32 *) target; + PRIVATE_AS u32 *digest = (PRIVATE_AS u32 *) target; const u32 r0 = digest[DGST_R0]; const u32 r1 = digest[DGST_R1]; diff --git a/OpenCL/m26200_a1-pure.cl b/OpenCL/m26200_a1-pure.cl index fafb34778..a670c6fe2 100644 --- a/OpenCL/m26200_a1-pure.cl +++ b/OpenCL/m26200_a1-pure.cl @@ -134,7 +134,7 @@ KERNEL_FQ void m26200_mxx (KERN_ATTR_BASIC ()) u8 scratch[16] = { 0 }; - u8 *input = (u8 *) w; + PRIVATE_AS u8 *input = (PRIVATE_AS u8 *) w; for (u32 i = 0; i < 5; i++) { @@ -185,7 +185,7 @@ KERNEL_FQ void m26200_mxx (KERN_ATTR_BASIC ()) } } - u32 *digest = (u32 *) target; + PRIVATE_AS u32 *digest = (PRIVATE_AS u32 *) target; const u32 r0 = digest[DGST_R0]; const u32 r1 = digest[DGST_R1]; @@ -307,7 +307,7 @@ KERNEL_FQ void m26200_sxx (KERN_ATTR_BASIC ()) u8 scratch[16] = { 0 }; - u8 *input = (u8 *) w; + PRIVATE_AS u8 *input = (PRIVATE_AS u8 *) w; for (u32 i = 0; i < 5; i++) { @@ -358,7 +358,7 @@ KERNEL_FQ void m26200_sxx (KERN_ATTR_BASIC ()) } } - u32 *digest = (u32 *) target; + PRIVATE_AS u32 *digest = (PRIVATE_AS u32 *) target; const u32 r0 = digest[DGST_R0]; const u32 r1 = digest[DGST_R1]; diff --git a/OpenCL/m26200_a3-pure.cl b/OpenCL/m26200_a3-pure.cl index 7067f197f..a6b885614 100644 --- a/OpenCL/m26200_a3-pure.cl +++ b/OpenCL/m26200_a3-pure.cl @@ -78,7 +78,7 @@ KERNEL_FQ void m26200_mxx (KERN_ATTR_BASIC ()) u8 scratch[16] = { 0 }; - u8 *input = (u8 *) w; + PRIVATE_AS u8 *input = (PRIVATE_AS u8 *) w; for (u32 i = 0; i < 5; i++) { @@ -129,7 +129,7 @@ KERNEL_FQ void m26200_mxx (KERN_ATTR_BASIC ()) } } - u32 *digest = (u32 *) target; + PRIVATE_AS u32 *digest = (PRIVATE_AS u32 *) target; const u32 r0 = digest[DGST_R0]; const u32 r1 = digest[DGST_R1]; @@ -194,7 +194,7 @@ KERNEL_FQ void m26200_sxx (KERN_ATTR_BASIC ()) u8 scratch[16] = { 0 }; - u8 *input = (u8 *) w; + PRIVATE_AS u8 *input = (PRIVATE_AS u8 *) w; for (u32 i = 0; i < 5; i++) { @@ -245,7 +245,7 @@ KERNEL_FQ void m26200_sxx (KERN_ATTR_BASIC ()) } } - u32 *digest = (u32 *) target; + PRIVATE_AS u32 *digest = (PRIVATE_AS u32 *) target; const u32 r0 = digest[DGST_R0]; const u32 r1 = digest[DGST_R1]; diff --git a/OpenCL/m26401_a3-optimized.cl b/OpenCL/m26401_a3-optimized.cl index 7520ca7ee..b8917fe49 100644 --- a/OpenCL/m26401_a3-optimized.cl +++ b/OpenCL/m26401_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_cipher_aes.cl) #endif -DECLSPEC void m26401m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m26401m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * Salt prep */ @@ -75,15 +72,12 @@ DECLSPEC void m26401m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a } } -DECLSPEC void m26401s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m26401s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * Salt prep */ @@ -147,8 +141,8 @@ DECLSPEC void m26401s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a KERNEL_FQ void m26401_m04 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -233,13 +227,13 @@ KERNEL_FQ void m26401_m04 (KERN_ATTR_VECTOR ()) * main */ - m26401m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26401m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26401_m08 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -324,7 +318,7 @@ KERNEL_FQ void m26401_m08 (KERN_ATTR_VECTOR ()) * main */ - m26401m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26401m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26401_m16 (KERN_ATTR_VECTOR ()) @@ -333,8 +327,8 @@ KERNEL_FQ void m26401_m16 (KERN_ATTR_VECTOR ()) KERNEL_FQ void m26401_s04 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -419,13 +413,13 @@ KERNEL_FQ void m26401_s04 (KERN_ATTR_VECTOR ()) * main */ - m26401s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26401s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26401_s08 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -510,7 +504,7 @@ KERNEL_FQ void m26401_s08 (KERN_ATTR_VECTOR ()) * main */ - m26401s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26401s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26401_s16 (KERN_ATTR_VECTOR ()) diff --git a/OpenCL/m26402_a3-optimized.cl b/OpenCL/m26402_a3-optimized.cl index 9a567f069..64bf33bb2 100644 --- a/OpenCL/m26402_a3-optimized.cl +++ b/OpenCL/m26402_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_cipher_aes.cl) #endif -DECLSPEC void m26402m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m26402m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * Salt prep */ @@ -77,15 +74,12 @@ DECLSPEC void m26402m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a } } -DECLSPEC void m26402s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m26402s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * Salt prep */ @@ -151,8 +145,8 @@ DECLSPEC void m26402s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a KERNEL_FQ void m26402_m04 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -237,13 +231,13 @@ KERNEL_FQ void m26402_m04 (KERN_ATTR_VECTOR ()) * main */ - m26402m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26402m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26402_m08 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -328,7 +322,7 @@ KERNEL_FQ void m26402_m08 (KERN_ATTR_VECTOR ()) * main */ - m26402m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26402m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26402_m16 (KERN_ATTR_VECTOR ()) @@ -337,8 +331,8 @@ KERNEL_FQ void m26402_m16 (KERN_ATTR_VECTOR ()) KERNEL_FQ void m26402_s04 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -423,13 +417,13 @@ KERNEL_FQ void m26402_s04 (KERN_ATTR_VECTOR ()) * main */ - m26402s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26402s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26402_s08 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -514,7 +508,7 @@ KERNEL_FQ void m26402_s08 (KERN_ATTR_VECTOR ()) * main */ - m26402s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26402s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26402_s16 (KERN_ATTR_VECTOR ()) diff --git a/OpenCL/m26403_a3-optimized.cl b/OpenCL/m26403_a3-optimized.cl index aba516337..08e3d2def 100644 --- a/OpenCL/m26403_a3-optimized.cl +++ b/OpenCL/m26403_a3-optimized.cl @@ -17,15 +17,12 @@ #include STR(INCLUDE_PATH/inc_cipher_aes.cl) #endif -DECLSPEC void m26403m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m26403m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * Salt prep */ @@ -79,15 +76,12 @@ DECLSPEC void m26403m (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a } } -DECLSPEC void m26403s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m26403s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * Salt prep */ @@ -155,8 +149,8 @@ DECLSPEC void m26403s (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a KERNEL_FQ void m26403_m04 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -241,13 +235,13 @@ KERNEL_FQ void m26403_m04 (KERN_ATTR_VECTOR ()) * main */ - m26403m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26403m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26403_m08 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -332,13 +326,13 @@ KERNEL_FQ void m26403_m08 (KERN_ATTR_VECTOR ()) * main */ - m26403m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26403m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26403_m16 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -423,13 +417,13 @@ KERNEL_FQ void m26403_m16 (KERN_ATTR_VECTOR ()) * main */ - m26403m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26403m (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26403_s04 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -514,13 +508,13 @@ KERNEL_FQ void m26403_s04 (KERN_ATTR_VECTOR ()) * main */ - m26403s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26403s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26403_s08 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -605,13 +599,13 @@ KERNEL_FQ void m26403_s08 (KERN_ATTR_VECTOR ()) * main */ - m26403s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26403s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m26403_s16 (KERN_ATTR_VECTOR ()) { - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -696,5 +690,5 @@ KERNEL_FQ void m26403_s16 (KERN_ATTR_VECTOR ()) * main */ - m26403s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m26403s (s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m26500-pure.cl b/OpenCL/m26500-pure.cl index ce1a65ceb..cd2846270 100644 --- a/OpenCL/m26500-pure.cl +++ b/OpenCL/m26500-pure.cl @@ -40,7 +40,7 @@ typedef struct iphone_passcode } iphone_passcode_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m26600-pure.cl b/OpenCL/m26600-pure.cl index 60eb27eb7..4d2362756 100644 --- a/OpenCL/m26600-pure.cl +++ b/OpenCL/m26600-pure.cl @@ -42,7 +42,7 @@ typedef struct pbkdf2_sha256_aes_gcm } pbkdf2_sha256_aes_gcm_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m26700-pure.cl b/OpenCL/m26700-pure.cl index c290b5b8f..0e0e4a016 100644 --- a/OpenCL/m26700-pure.cl +++ b/OpenCL/m26700-pure.cl @@ -80,13 +80,13 @@ KERNEL_FQ void m26700_init (KERN_ATTR_TMPS_ESALT (hmac_sha224_tmp_t, snmpv3_t)) w[idx] = pws[gid].i[idx]; } - u8 *src_ptr = (u8 *) w; + PRIVATE_AS u8 *src_ptr = (PRIVATE_AS u8 *) w; // password 64 times, also swapped u32 dst_buf[16]; - u8 *dst_ptr = (u8 *) dst_buf; + PRIVATE_AS u8 *dst_ptr = (PRIVATE_AS u8 *) dst_buf; int tmp_idx = 0; diff --git a/OpenCL/m26800-pure.cl b/OpenCL/m26800-pure.cl index dd04bab51..a92ce3315 100644 --- a/OpenCL/m26800-pure.cl +++ b/OpenCL/m26800-pure.cl @@ -80,13 +80,13 @@ KERNEL_FQ void m26800_init (KERN_ATTR_TMPS_ESALT (hmac_sha256_tmp_t, snmpv3_t)) w[idx] = pws[gid].i[idx]; } - u8 *src_ptr = (u8 *) w; + PRIVATE_AS u8 *src_ptr = (PRIVATE_AS u8 *) w; // password 64 times, also swapped u32 dst_buf[16]; - u8 *dst_ptr = (u8 *) dst_buf; + PRIVATE_AS u8 *dst_ptr = (PRIVATE_AS u8 *) dst_buf; int tmp_idx = 0; diff --git a/OpenCL/m26900-pure.cl b/OpenCL/m26900-pure.cl index 1ac5f4f25..3676f00e3 100644 --- a/OpenCL/m26900-pure.cl +++ b/OpenCL/m26900-pure.cl @@ -80,13 +80,13 @@ KERNEL_FQ void m26900_init (KERN_ATTR_TMPS_ESALT (hmac_sha384_tmp_t, snmpv3_t)) w[idx] = pws[gid].i[idx]; } - u8 *src_ptr = (u8 *) w; + PRIVATE_AS u8 *src_ptr = (PRIVATE_AS u8 *) w; // password 128 times, also swapped u32 dst_buf[32]; - u8 *dst_ptr = (u8 *) dst_buf; + PRIVATE_AS u8 *dst_ptr = (PRIVATE_AS u8 *) dst_buf; int tmp_idx = 0; diff --git a/OpenCL/m27000-pure.cl b/OpenCL/m27000-pure.cl index 70747dfbd..ab306f2fd 100644 --- a/OpenCL/m27000-pure.cl +++ b/OpenCL/m27000-pure.cl @@ -350,7 +350,7 @@ CONSTANT_VK u32a c_skb[8][64] = #define BOX(i,n,S) make_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], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (PRIVATE_AS u32 *iv, PRIVATE_AS u32 *data, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, SHM_TYPE u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -392,7 +392,7 @@ DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, SHM_TYPE iv[1] = r; } -DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, SHM_TYPE u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, PRIVATE_AS u32 *Kc, PRIVATE_AS u32 *Kd, SHM_TYPE u32 (*s_skb)[64]) { u32 tt; @@ -461,7 +461,7 @@ DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, SHM_TYPE u32 } } -DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32 w1, u32 *out) +DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32 w1, PRIVATE_AS u32 *out) { u32 t[8]; @@ -502,7 +502,7 @@ DECLSPEC u8 hex_convert (const u8 c) return (c & 15) + (c >> 6) * 9; } -DECLSPEC u8 hex_to_u8 (const u8 *hex) +DECLSPEC u8 hex_to_u8 (PRIVATE_AS const u8 *hex) { u8 v = 0; @@ -558,11 +558,10 @@ KERNEL_FQ void m27000_init (KERN_ATTR_TMPS_ESALT (netntlm_tmp_t, netntlm_t)) in[ 6] = pws[gid].i[ 6]; in[ 7] = pws[gid].i[ 7]; - u8 *in_ptr = (u8 *) in; - u32 out[4]; - u8 *out_ptr = (u8 *) out; + PRIVATE_AS u8 *in_ptr = (PRIVATE_AS u8 *) in; + PRIVATE_AS u8 *out_ptr = (PRIVATE_AS u8 *) out; for (int i = 0, j = 0; i < 16; i += 1, j += 2) { diff --git a/OpenCL/m27100-pure.cl b/OpenCL/m27100-pure.cl index 94b14ac4c..2e4aa23f7 100644 --- a/OpenCL/m27100-pure.cl +++ b/OpenCL/m27100-pure.cl @@ -29,7 +29,7 @@ DECLSPEC u8 hex_convert (const u8 c) return (c & 15) + (c >> 6) * 9; } -DECLSPEC u8 hex_to_u8 (const u8 *hex) +DECLSPEC u8 hex_to_u8 (PRIVATE_AS const u8 *hex) { u8 v = 0; @@ -85,11 +85,10 @@ KERNEL_FQ void m27100_init (KERN_ATTR_TMPS_ESALT (netntlm_tmp_t, netntlm_t)) in[ 6] = pws[gid].i[ 6]; in[ 7] = pws[gid].i[ 7]; - u8 *in_ptr = (u8 *) in; - u32 out[4]; - u8 *out_ptr = (u8 *) out; + PRIVATE_AS u8 *in_ptr = (PRIVATE_AS u8 *) in; + PRIVATE_AS u8 *out_ptr = (PRIVATE_AS u8 *) out; for (int i = 0, j = 0; i < 16; i += 1, j += 2) { diff --git a/OpenCL/m27200_a3-optimized.cl b/OpenCL/m27200_a3-optimized.cl index c268c33fc..df41b060b 100644 --- a/OpenCL/m27200_a3-optimized.cl +++ b/OpenCL/m27200_a3-optimized.cl @@ -17,7 +17,7 @@ #include STR(INCLUDE_PATH/inc_hash_sha1.cl) #endif -DECLSPEC void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 src_r0) +DECLSPEC void append_4 (const u32 offset, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 src_r0) { u32 tmp[2]; @@ -89,15 +89,12 @@ DECLSPEC void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, co } } -DECLSPEC void m27200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m27200m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u32 dash_stop = 0x2d2d8000; /** @@ -308,15 +305,12 @@ DECLSPEC void m27200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER } } -DECLSPEC void m27200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m27200s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u32 dash_stop = 0x2d2d8000; /** @@ -554,7 +548,9 @@ KERNEL_FQ void m27200_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -592,7 +588,7 @@ KERNEL_FQ void m27200_m04 (KERN_ATTR_BASIC ()) * main */ - m27200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27200_m08 (KERN_ATTR_BASIC ()) @@ -601,7 +597,9 @@ KERNEL_FQ void m27200_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -639,7 +637,7 @@ KERNEL_FQ void m27200_m08 (KERN_ATTR_BASIC ()) * main */ - m27200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27200_m16 (KERN_ATTR_BASIC ()) @@ -648,7 +646,9 @@ KERNEL_FQ void m27200_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -686,7 +686,7 @@ KERNEL_FQ void m27200_m16 (KERN_ATTR_BASIC ()) * main */ - m27200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27200m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27200_s04 (KERN_ATTR_BASIC ()) @@ -695,7 +695,9 @@ KERNEL_FQ void m27200_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -733,7 +735,7 @@ KERNEL_FQ void m27200_s04 (KERN_ATTR_BASIC ()) * main */ - m27200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27200_s08 (KERN_ATTR_BASIC ()) @@ -742,7 +744,9 @@ KERNEL_FQ void m27200_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -780,7 +784,7 @@ KERNEL_FQ void m27200_s08 (KERN_ATTR_BASIC ()) * main */ - m27200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27200_s16 (KERN_ATTR_BASIC ()) @@ -789,7 +793,9 @@ KERNEL_FQ void m27200_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -827,5 +833,5 @@ KERNEL_FQ void m27200_s16 (KERN_ATTR_BASIC ()) * main */ - m27200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27200s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m27300-pure.cl b/OpenCL/m27300-pure.cl index 10eebc94e..31df52fab 100644 --- a/OpenCL/m27300-pure.cl +++ b/OpenCL/m27300-pure.cl @@ -80,13 +80,13 @@ KERNEL_FQ void m27300_init (KERN_ATTR_TMPS_ESALT (hmac_sha512_tmp_t, snmpv3_t)) w[idx] = pws[gid].i[idx]; } - u8 *src_ptr = (u8 *) w; + PRIVATE_AS u8 *src_ptr = (PRIVATE_AS u8 *) w; // password 128 times, also swapped u32 dst_buf[32]; - u8 *dst_ptr = (u8 *) dst_buf; + PRIVATE_AS u8 *dst_ptr = (PRIVATE_AS u8 *) dst_buf; int tmp_idx = 0; diff --git a/OpenCL/m27400-pure.cl b/OpenCL/m27400-pure.cl index 897cd37e0..72b5b4e6f 100644 --- a/OpenCL/m27400-pure.cl +++ b/OpenCL/m27400-pure.cl @@ -39,7 +39,7 @@ typedef struct vmware_vmx } vmware_vmx_t; -DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m27500-pure.cl b/OpenCL/m27500-pure.cl index 950093b73..282147fde 100644 --- a/OpenCL/m27500-pure.cl +++ b/OpenCL/m27500-pure.cl @@ -41,7 +41,7 @@ typedef struct pbkdf2_sha256_tmp } pbkdf2_sha256_tmp_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -83,7 +83,7 @@ DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *i sha256_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void xts_mul2 (u32 *in, u32 *out) +DECLSPEC void xts_mul2 (PRIVATE_AS u32 *in, PRIVATE_AS u32 *out) { const u32 c = in[3] >> 31; diff --git a/OpenCL/m27600-pure.cl b/OpenCL/m27600-pure.cl index d9b19df62..1a7bea63c 100644 --- a/OpenCL/m27600-pure.cl +++ b/OpenCL/m27600-pure.cl @@ -41,7 +41,7 @@ typedef struct pbkdf2_sha256_tmp } pbkdf2_sha256_tmp_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -83,7 +83,7 @@ DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *i sha256_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC void xts_mul2 (u32 *in, u32 *out) +DECLSPEC void xts_mul2 (PRIVATE_AS u32 *in, PRIVATE_AS u32 *out) { const u32 c = in[3] >> 31; diff --git a/OpenCL/m27700-pure.cl b/OpenCL/m27700-pure.cl index bcd2f6e23..a83b9684d 100644 --- a/OpenCL/m27700-pure.cl +++ b/OpenCL/m27700-pure.cl @@ -80,6 +80,27 @@ DECLSPEC uint4 hc_swap32_4 (uint4 v) X2 = make_uint4 (X2.z, X2.w, X2.x, X2.y); \ X3 = make_uint4 (X3.w, X3.x, X3.y, X3.z); \ } +#elif defined IS_METAL +#define SALSA20_2R() \ +{ \ + ADD_ROTATE_XOR (X1, X0, X3, 7); \ + ADD_ROTATE_XOR (X2, X1, X0, 9); \ + ADD_ROTATE_XOR (X3, X2, X1, 13); \ + ADD_ROTATE_XOR (X0, X3, X2, 18); \ + \ + X1 = X1.wxyz; \ + X2 = X2.zwxy; \ + X3 = X3.yzwx; \ + \ + ADD_ROTATE_XOR (X3, X0, X1, 7); \ + ADD_ROTATE_XOR (X2, X3, X0, 9); \ + ADD_ROTATE_XOR (X1, X2, X3, 13); \ + ADD_ROTATE_XOR (X0, X1, X2, 18); \ + \ + X1 = X1.yzwx; \ + X2 = X2.zwxy; \ + X3 = X3.wxyz; \ +} #else #define SALSA20_2R() \ { \ @@ -106,7 +127,7 @@ DECLSPEC uint4 hc_swap32_4 (uint4 v) #define Coord(xd4,y,z) (((xd4) * ySIZE * zSIZE) + ((y) * zSIZE) + (z)) #define CO Coord(xd4,y,z) -DECLSPEC void salsa_r (uint4 *TI) +DECLSPEC void salsa_r (PRIVATE_AS uint4 *TI) { uint4 R0 = TI[STATE_CNT4 - 4]; uint4 R1 = TI[STATE_CNT4 - 3]; @@ -177,12 +198,12 @@ DECLSPEC void salsa_r (uint4 *TI) #endif } -DECLSPEC void scrypt_smix_init (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix_init (PRIVATE_AS uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3, const u64 gid) { const u32 ySIZE = SCRYPT_N / SCRYPT_TMTO; const u32 zSIZE = STATE_CNT4; - const u32 x = get_global_id (0); + const u32 x = (u32) gid; const u32 xd4 = x / 4; const u32 xm4 = x & 3; @@ -205,12 +226,12 @@ DECLSPEC void scrypt_smix_init (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 * } } -DECLSPEC void scrypt_smix_loop (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix_loop (PRIVATE_AS uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3, const u64 gid) { const u32 ySIZE = SCRYPT_N / SCRYPT_TMTO; const u32 zSIZE = STATE_CNT4; - const u32 x = get_global_id (0); + const u32 x = (u32) gid; const u32 xd4 = x / 4; const u32 xm4 = x & 3; @@ -401,7 +422,7 @@ KERNEL_FQ void m27700_loop_prepare (KERN_ATTR_TMPS (scrypt_tmp_t)) for (int z = 0; z < STATE_CNT4; z++) X[z] = P[z]; - scrypt_smix_init (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf); + scrypt_smix_init (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf, gid); for (int z = 0; z < STATE_CNT4; z++) P[z] = X[z]; } @@ -426,7 +447,7 @@ KERNEL_FQ void m27700_loop (KERN_ATTR_TMPS (scrypt_tmp_t)) for (int z = 0; z < STATE_CNT4; z++) X[z] = P[z]; - scrypt_smix_loop (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf); + scrypt_smix_loop (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf, gid); for (int z = 0; z < STATE_CNT4; z++) P[z] = X[z]; } diff --git a/OpenCL/m27800_a0-optimized.cl b/OpenCL/m27800_a0-optimized.cl index cbd42f79b..2d758b6b8 100644 --- a/OpenCL/m27800_a0-optimized.cl +++ b/OpenCL/m27800_a0-optimized.cl @@ -24,7 +24,7 @@ DECLSPEC u32 Murmur32_Scramble(u32 k) return (k * 0x1B873593); } -DECLSPEC u32 MurmurHash3(const u32 seed, const u32* data, const u32 size) +DECLSPEC u32 MurmurHash3(const u32 seed, PRIVATE_AS const u32 *data, const u32 size) { u32 checksum = seed; diff --git a/OpenCL/m27800_a1-optimized.cl b/OpenCL/m27800_a1-optimized.cl index 4f2befd3b..2c020a47e 100644 --- a/OpenCL/m27800_a1-optimized.cl +++ b/OpenCL/m27800_a1-optimized.cl @@ -22,7 +22,7 @@ DECLSPEC u32 Murmur32_Scramble(u32 k) return (k * 0x1B873593); } -DECLSPEC u32 MurmurHash3(const u32 seed, const u32* data, const u32 size) +DECLSPEC u32 MurmurHash3(const u32 seed, PRIVATE_AS const u32 *data, const u32 size) { u32 checksum = seed; diff --git a/OpenCL/m27800_a3-optimized.cl b/OpenCL/m27800_a3-optimized.cl index cc7847d4b..59955e3ba 100644 --- a/OpenCL/m27800_a3-optimized.cl +++ b/OpenCL/m27800_a3-optimized.cl @@ -22,7 +22,8 @@ DECLSPEC u32x Murmur32_Scramble(u32x k) return (k * 0x1B873593); } -DECLSPEC u32x MurmurHash3(const u32 seed, const u32x w0, const u32* data, const u32 size) { +DECLSPEC u32x MurmurHash3(const u32 seed, const u32x w0, PRIVATE_AS const u32 *data, const u32 size) +{ u32x checksum = seed; if (size >= 4) @@ -44,7 +45,7 @@ DECLSPEC u32x MurmurHash3(const u32 seed, const u32x w0, const u32* data, const if (size % 4) { - const u8* remainder = (u8*)(data + nBlocks); + PRIVATE_AS const u8 *remainder = (PRIVATE_AS u8 *)(data + nBlocks); u32x val = 0; switch(size & 3) //Hash remaining bytes as size isn't always aligned by 4 @@ -66,7 +67,7 @@ DECLSPEC u32x MurmurHash3(const u32 seed, const u32x w0, const u32* data, const { if (size % 4) { - const u8* remainder = (u8*)(&w0); + PRIVATE_AS const u8 *remainder = (PRIVATE_AS u8 *)(&w0); u32x val = 0; switch(size & 3) @@ -92,15 +93,12 @@ DECLSPEC u32x MurmurHash3(const u32 seed, const u32x w0, const u32* data, const return checksum ^ (checksum >> 16); } -DECLSPEC void m27800m (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m27800m (PRIVATE_AS const u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * seed */ @@ -130,15 +128,12 @@ DECLSPEC void m27800m (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC void m27800s (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m27800s (PRIVATE_AS const u32 *w, const u32 pw_len, KERN_ATTR_FUNC_VECTOR ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * digest */ @@ -186,7 +181,9 @@ KERNEL_FQ void m27800_m04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -215,7 +212,7 @@ KERNEL_FQ void m27800_m04 (KERN_ATTR_VECTOR ()) * main */ - m27800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27800_m08 (KERN_ATTR_VECTOR ()) @@ -224,7 +221,9 @@ KERNEL_FQ void m27800_m08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -253,7 +252,7 @@ KERNEL_FQ void m27800_m08 (KERN_ATTR_VECTOR ()) * main */ - m27800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27800_m16 (KERN_ATTR_VECTOR ()) @@ -262,7 +261,9 @@ KERNEL_FQ void m27800_m16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -291,7 +292,7 @@ KERNEL_FQ void m27800_m16 (KERN_ATTR_VECTOR ()) * main */ - m27800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27800m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27800_s04 (KERN_ATTR_VECTOR ()) @@ -300,7 +301,9 @@ KERNEL_FQ void m27800_s04 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -329,7 +332,7 @@ KERNEL_FQ void m27800_s04 (KERN_ATTR_VECTOR ()) * main */ - m27800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27800_s08 (KERN_ATTR_VECTOR ()) @@ -338,7 +341,9 @@ KERNEL_FQ void m27800_s08 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -367,7 +372,7 @@ KERNEL_FQ void m27800_s08 (KERN_ATTR_VECTOR ()) * main */ - m27800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27800_s16 (KERN_ATTR_VECTOR ()) @@ -376,7 +381,9 @@ KERNEL_FQ void m27800_s16 (KERN_ATTR_VECTOR ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -405,5 +412,5 @@ KERNEL_FQ void m27800_s16 (KERN_ATTR_VECTOR ()) * main */ - m27800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27800s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m27900_a0-optimized.cl b/OpenCL/m27900_a0-optimized.cl index 0a4a872ac..d5ce1cb11 100644 --- a/OpenCL/m27900_a0-optimized.cl +++ b/OpenCL/m27900_a0-optimized.cl @@ -110,7 +110,7 @@ DECLSPEC u32x round_crc32c (u32x a, const u32x v) return a; } -DECLSPEC u32x crc32c (const u32x *w, const u32 pw_len, const u32 iv) +DECLSPEC u32x crc32c (PRIVATE_AS const u32x *w, const u32 pw_len, const u32 iv) { u32x a = ~iv; diff --git a/OpenCL/m27900_a1-optimized.cl b/OpenCL/m27900_a1-optimized.cl index 487764264..728199496 100644 --- a/OpenCL/m27900_a1-optimized.cl +++ b/OpenCL/m27900_a1-optimized.cl @@ -108,7 +108,7 @@ DECLSPEC u32x round_crc32c (u32x a, const u32x v) return a; } -DECLSPEC u32x crc32c (const u32x *w, const u32 pw_len, const u32 iv) +DECLSPEC u32x crc32c (PRIVATE_AS const u32x *w, const u32 pw_len, const u32 iv) { u32x a = ~iv; diff --git a/OpenCL/m27900_a3-optimized.cl b/OpenCL/m27900_a3-optimized.cl index 512eec8e2..9eb6dbb4f 100644 --- a/OpenCL/m27900_a3-optimized.cl +++ b/OpenCL/m27900_a3-optimized.cl @@ -108,7 +108,7 @@ DECLSPEC u32x round_crc32c (u32x a, const u32x v) return a; } -DECLSPEC u32x crc32c (const u32x *w, const u32 pw_len, const u32 iv) +DECLSPEC u32x crc32c (PRIVATE_AS const u32x *w, const u32 pw_len, const u32 iv) { u32x a = ~iv; @@ -136,15 +136,12 @@ DECLSPEC u32x crc32c (const u32x *w, const u32 pw_len, const u32 iv) return ~a; } -DECLSPEC void m27900m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m27900m (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -194,15 +191,12 @@ DECLSPEC void m27900m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) } } -DECLSPEC void m27900s (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m27900s (PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_BASIC ()) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -270,7 +264,9 @@ KERNEL_FQ void m27900_m04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -299,7 +295,7 @@ KERNEL_FQ void m27900_m04 (KERN_ATTR_BASIC ()) * main */ - m27900m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27900m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27900_m08 (KERN_ATTR_BASIC ()) @@ -308,7 +304,9 @@ KERNEL_FQ void m27900_m08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -337,7 +335,7 @@ KERNEL_FQ void m27900_m08 (KERN_ATTR_BASIC ()) * main */ - m27900m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27900m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27900_m16 (KERN_ATTR_BASIC ()) @@ -346,7 +344,9 @@ KERNEL_FQ void m27900_m16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -375,7 +375,7 @@ KERNEL_FQ void m27900_m16 (KERN_ATTR_BASIC ()) * main */ - m27900m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27900m (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27900_s04 (KERN_ATTR_BASIC ()) @@ -384,7 +384,9 @@ KERNEL_FQ void m27900_s04 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -413,7 +415,7 @@ KERNEL_FQ void m27900_s04 (KERN_ATTR_BASIC ()) * main */ - m27900s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27900s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27900_s08 (KERN_ATTR_BASIC ()) @@ -422,7 +424,9 @@ KERNEL_FQ void m27900_s08 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -451,7 +455,7 @@ KERNEL_FQ void m27900_s08 (KERN_ATTR_BASIC ()) * main */ - m27900s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27900s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m27900_s16 (KERN_ATTR_BASIC ()) @@ -460,7 +464,9 @@ KERNEL_FQ void m27900_s16 (KERN_ATTR_BASIC ()) * base */ + const u64 lid = get_local_id (0); const u64 gid = get_global_id (0); + const u64 lsz = get_local_size (0); if (gid >= GID_CNT) return; @@ -489,5 +495,5 @@ KERNEL_FQ void m27900_s16 (KERN_ATTR_BASIC ()) * main */ - m27900s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m27900s (w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m28000_a0-optimized.cl b/OpenCL/m28000_a0-optimized.cl index 23b8afdb8..e93661712 100644 --- a/OpenCL/m28000_a0-optimized.cl +++ b/OpenCL/m28000_a0-optimized.cl @@ -170,7 +170,7 @@ DECLSPEC u64 round_crc64jones (u64 a, const u64 v, SHM_TYPE u64 *s_crc64jonestab return a; } -DECLSPEC u64 crc64jones (const u32 *w, const u32 pw_len, const u64 iv, SHM_TYPE u64 *s_crc64jonestab) +DECLSPEC u64 crc64jones (PRIVATE_AS const u32 *w, const u32 pw_len, const u64 iv, SHM_TYPE u64 *s_crc64jonestab) { u64 a = iv; diff --git a/OpenCL/m28000_a1-optimized.cl b/OpenCL/m28000_a1-optimized.cl index ee28a3e88..74c3ea99a 100644 --- a/OpenCL/m28000_a1-optimized.cl +++ b/OpenCL/m28000_a1-optimized.cl @@ -168,7 +168,7 @@ DECLSPEC u64 round_crc64jones (u64 a, const u64 v, SHM_TYPE u64 *s_crc64jonestab return a; } -DECLSPEC u64 crc64jones (const u32 *w, const u32 pw_len, const u64 iv, SHM_TYPE u64 *s_crc64jonestab) +DECLSPEC u64 crc64jones (PRIVATE_AS const u32 *w, const u32 pw_len, const u64 iv, SHM_TYPE u64 *s_crc64jonestab) { u64 a = iv; diff --git a/OpenCL/m28000_a3-optimized.cl b/OpenCL/m28000_a3-optimized.cl index 403cfd26f..e5dce0b75 100644 --- a/OpenCL/m28000_a3-optimized.cl +++ b/OpenCL/m28000_a3-optimized.cl @@ -168,7 +168,7 @@ DECLSPEC u64 round_crc64jones (u64 a, const u64 v, SHM_TYPE u64 *s_crc64jonestab return a; } -DECLSPEC u64 crc64jones (const u32 *w, const u32 pw_len, const u64 iv, SHM_TYPE u64 *s_crc64jonestab) +DECLSPEC u64 crc64jones (PRIVATE_AS const u32 *w, const u32 pw_len, const u64 iv, SHM_TYPE u64 *s_crc64jonestab) { u64 a = iv; @@ -196,15 +196,12 @@ DECLSPEC u64 crc64jones (const u32 *w, const u32 pw_len, const u64 iv, SHM_TYPE return a; } -DECLSPEC void m28000m (SHM_TYPE u64 *s_crc64jonestab, u32 *w, const u32 pw_len, KERN_ATTR_ESALT (crc64_t)) +DECLSPEC void m28000m (SHM_TYPE u64 *s_crc64jonestab, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_ESALT (crc64_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -257,15 +254,12 @@ DECLSPEC void m28000m (SHM_TYPE u64 *s_crc64jonestab, u32 *w, const u32 pw_len, } } -DECLSPEC void m28000s (SHM_TYPE u64 *s_crc64jonestab, u32 *w, const u32 pw_len, KERN_ATTR_ESALT (crc64_t)) +DECLSPEC void m28000s (SHM_TYPE u64 *s_crc64jonestab, PRIVATE_AS u32 *w, const u32 pw_len, KERN_ATTR_FUNC_ESALT (crc64_t)) { /** - * modifier + * modifiers are taken from args */ - const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - /** * salt */ @@ -336,8 +330,8 @@ KERNEL_FQ void m28000_m04 (KERN_ATTR_ESALT (crc64_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -392,7 +386,7 @@ KERNEL_FQ void m28000_m04 (KERN_ATTR_ESALT (crc64_t)) * main */ - m28000m (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m28000m (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m28000_m08 (KERN_ATTR_ESALT (crc64_t)) @@ -401,8 +395,8 @@ KERNEL_FQ void m28000_m08 (KERN_ATTR_ESALT (crc64_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -457,7 +451,7 @@ KERNEL_FQ void m28000_m08 (KERN_ATTR_ESALT (crc64_t)) * main */ - m28000m (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m28000m (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m28000_m16 (KERN_ATTR_ESALT (crc64_t)) @@ -466,8 +460,8 @@ KERNEL_FQ void m28000_m16 (KERN_ATTR_ESALT (crc64_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -522,7 +516,7 @@ KERNEL_FQ void m28000_m16 (KERN_ATTR_ESALT (crc64_t)) * main */ - m28000m (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m28000m (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m28000_s04 (KERN_ATTR_ESALT (crc64_t)) @@ -531,8 +525,8 @@ KERNEL_FQ void m28000_s04 (KERN_ATTR_ESALT (crc64_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -587,7 +581,7 @@ KERNEL_FQ void m28000_s04 (KERN_ATTR_ESALT (crc64_t)) * main */ - m28000s (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m28000s (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m28000_s08 (KERN_ATTR_ESALT (crc64_t)) @@ -596,8 +590,8 @@ KERNEL_FQ void m28000_s08 (KERN_ATTR_ESALT (crc64_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -652,7 +646,7 @@ KERNEL_FQ void m28000_s08 (KERN_ATTR_ESALT (crc64_t)) * main */ - m28000s (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m28000s (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } KERNEL_FQ void m28000_s16 (KERN_ATTR_ESALT (crc64_t)) @@ -661,8 +655,8 @@ KERNEL_FQ void m28000_s16 (KERN_ATTR_ESALT (crc64_t)) * modifier */ - const u64 gid = get_global_id (0); const u64 lid = get_local_id (0); + const u64 gid = get_global_id (0); const u64 lsz = get_local_size (0); /** @@ -717,5 +711,5 @@ KERNEL_FQ void m28000_s16 (KERN_ATTR_ESALT (crc64_t)) * main */ - m28000s (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param); + m28000s (s_crc64jonestab, w, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz); } diff --git a/OpenCL/m28100-pure.cl b/OpenCL/m28100-pure.cl index 23c282e48..2d00ccdf8 100644 --- a/OpenCL/m28100-pure.cl +++ b/OpenCL/m28100-pure.cl @@ -49,7 +49,7 @@ typedef struct winhello_tmp } winhello_tmp_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -114,7 +114,7 @@ KERNEL_FQ void m28100_init (KERN_ATTR_TMPS_ESALT (winhello_tmp_t, winhello_t)) w[idx] = pws[gid].i[idx]; } - u8 *w_ptr = (u8 *) w; + PRIVATE_AS u8 *w_ptr = (PRIVATE_AS u8 *) w; #ifdef _unroll #pragma unroll @@ -335,7 +335,7 @@ KERNEL_FQ void m28100_comp (KERN_ATTR_TMPS_ESALT (winhello_tmp_t, winhello_t)) w[6] = hc_swap32_S (tmps[gid].out[6]); w[7] = hc_swap32_S (tmps[gid].out[7]); - u8 *w_ptr = (u8 *) w; + PRIVATE_AS u8 *w_ptr = (PRIVATE_AS u8 *) w; #ifdef _unroll #pragma unroll diff --git a/OpenCL/m28200-pure.cl b/OpenCL/m28200-pure.cl index 3b0c23ba3..34df1fb2d 100644 --- a/OpenCL/m28200-pure.cl +++ b/OpenCL/m28200-pure.cl @@ -92,6 +92,27 @@ DECLSPEC uint4 hc_swap32_4 (uint4 v) X2 = make_uint4 (X2.z, X2.w, X2.x, X2.y); \ X3 = make_uint4 (X3.w, X3.x, X3.y, X3.z); \ } +#elif defined IS_METAL +#define SALSA20_2R() \ +{ \ + ADD_ROTATE_XOR (X1, X0, X3, 7); \ + ADD_ROTATE_XOR (X2, X1, X0, 9); \ + ADD_ROTATE_XOR (X3, X2, X1, 13); \ + ADD_ROTATE_XOR (X0, X3, X2, 18); \ + \ + X1 = X1.wxyz; \ + X2 = X2.zwxy; \ + X3 = X3.yzwx; \ + \ + ADD_ROTATE_XOR (X3, X0, X1, 7); \ + ADD_ROTATE_XOR (X2, X3, X0, 9); \ + ADD_ROTATE_XOR (X1, X2, X3, 13); \ + ADD_ROTATE_XOR (X0, X1, X2, 18); \ + \ + X1 = X1.yzwx; \ + X2 = X2.zwxy; \ + X3 = X3.wxyz; \ +} #else #define SALSA20_2R() \ { \ @@ -118,7 +139,7 @@ DECLSPEC uint4 hc_swap32_4 (uint4 v) #define Coord(xd4,y,z) (((xd4) * ySIZE * zSIZE) + ((y) * zSIZE) + (z)) #define CO Coord(xd4,y,z) -DECLSPEC void salsa_r (uint4 *TI) +DECLSPEC void salsa_r (PRIVATE_AS uint4 *TI) { uint4 R0 = TI[STATE_CNT4 - 4]; uint4 R1 = TI[STATE_CNT4 - 3]; @@ -189,12 +210,12 @@ DECLSPEC void salsa_r (uint4 *TI) #endif } -DECLSPEC void scrypt_smix_init (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix_init (PRIVATE_AS uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3, const u64 gid) { const u32 ySIZE = SCRYPT_N / SCRYPT_TMTO; const u32 zSIZE = STATE_CNT4; - const u32 x = get_global_id (0); + const u32 x = (u32) gid; const u32 xd4 = x / 4; const u32 xm4 = x & 3; @@ -217,12 +238,12 @@ DECLSPEC void scrypt_smix_init (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 * } } -DECLSPEC void scrypt_smix_loop (uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix_loop (PRIVATE_AS uint4 *X, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3, const u64 gid) { const u32 ySIZE = SCRYPT_N / SCRYPT_TMTO; const u32 zSIZE = STATE_CNT4; - const u32 x = get_global_id (0); + const u32 x = (u32) gid; const u32 xd4 = x / 4; const u32 xm4 = x & 3; @@ -389,7 +410,7 @@ KERNEL_FQ void m28200_loop_prepare (KERN_ATTR_TMPS_ESALT (exodus_tmp_t, exodus_t for (int z = 0; z < STATE_CNT4; z++) X[z] = P[z]; - scrypt_smix_init (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf); + scrypt_smix_init (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf, gid); for (int z = 0; z < STATE_CNT4; z++) P[z] = X[z]; } @@ -414,7 +435,7 @@ KERNEL_FQ void m28200_loop (KERN_ATTR_TMPS_ESALT (exodus_tmp_t, exodus_t)) for (int z = 0; z < STATE_CNT4; z++) X[z] = P[z]; - scrypt_smix_loop (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf); + scrypt_smix_loop (X, d_scrypt0_buf, d_scrypt1_buf, d_scrypt2_buf, d_scrypt3_buf, gid); for (int z = 0; z < STATE_CNT4; z++) P[z] = X[z]; } diff --git a/OpenCL/m28600-pure.cl b/OpenCL/m28600-pure.cl index 197444fa1..492373a20 100644 --- a/OpenCL/m28600-pure.cl +++ b/OpenCL/m28600-pure.cl @@ -40,7 +40,7 @@ typedef struct postgres_sha256 } postgres_sha256_t; -DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *ipad, PRIVATE_AS u32x *opad, PRIVATE_AS u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/markov_be.cl b/OpenCL/markov_be.cl index e250a2c27..2f72fe6f1 100644 --- a/OpenCL/markov_be.cl +++ b/OpenCL/markov_be.cl @@ -10,11 +10,12 @@ #include STR(INCLUDE_PATH/inc_vendor.h) #include STR(INCLUDE_PATH/inc_types.h) #include STR(INCLUDE_PATH/inc_platform.cl) +#include STR(INCLUDE_PATH/inc_markov.h) #endif #define CHARSIZ 256 -DECLSPEC void generate_pw (u32 *pw_buf, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u32 pw_l_len, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, u64 val) +DECLSPEC void generate_pw (PRIVATE_AS u32 *pw_buf, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u32 pw_l_len, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, u64 val) { GLOBAL_AS const cs_t *cs = &root_css_buf[pw_r_len]; @@ -49,7 +50,7 @@ DECLSPEC void generate_pw (u32 *pw_buf, GLOBAL_AS const cs_t *root_css_buf, GLOB if (bits15) pw_buf[15] = (pw_l_len + pw_r_len) * 8; } -KERNEL_FQ void l_markov (GLOBAL_AS pw_t *pws_buf_l, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u64 off, const u32 pw_l_len, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, const u64 gid_max) +KERNEL_FQ void l_markov (KERN_ATTR_L_MARKOV) { const u64 gid = get_global_id (0); @@ -130,7 +131,7 @@ KERNEL_FQ void l_markov (GLOBAL_AS pw_t *pws_buf_l, GLOBAL_AS const cs_t *root_c pws_buf_l[gid] = pw; } -KERNEL_FQ void r_markov (GLOBAL_AS bf_t *pws_buf_r, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u64 off, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, const u64 gid_max) +KERNEL_FQ void r_markov (KERN_ATTR_R_MARKOV) { const u64 gid = get_global_id (0); @@ -208,7 +209,7 @@ KERNEL_FQ void r_markov (GLOBAL_AS bf_t *pws_buf_r, GLOBAL_AS const cs_t *root_c pws_buf_r[gid].i = pw.i[0]; } -KERNEL_FQ void C_markov (GLOBAL_AS pw_t *pws_buf, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u64 off, const u32 pw_len, const u32 mask80, const u32 bits14, const u32 bits15, const u64 gid_max) +KERNEL_FQ void C_markov (KERN_ATTR_C_MARKOV) { const u64 gid = get_global_id (0); diff --git a/OpenCL/markov_le.cl b/OpenCL/markov_le.cl index a72b3e839..d017d1a96 100644 --- a/OpenCL/markov_le.cl +++ b/OpenCL/markov_le.cl @@ -10,11 +10,12 @@ #include STR(INCLUDE_PATH/inc_vendor.h) #include STR(INCLUDE_PATH/inc_types.h) #include STR(INCLUDE_PATH/inc_platform.cl) +#include STR(INCLUDE_PATH/inc_markov.h) #endif #define CHARSIZ 256 -DECLSPEC void generate_pw (u32 *pw_buf, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u32 pw_l_len, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, u64 val) +DECLSPEC void generate_pw (PRIVATE_AS u32 *pw_buf, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u32 pw_l_len, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, u64 val) { GLOBAL_AS const cs_t *cs = &root_css_buf[pw_r_len]; @@ -49,7 +50,7 @@ DECLSPEC void generate_pw (u32 *pw_buf, GLOBAL_AS const cs_t *root_css_buf, GLOB if (bits15) pw_buf[15] = (pw_l_len + pw_r_len) * 8; } -KERNEL_FQ void l_markov (GLOBAL_AS pw_t *pws_buf_l, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u64 off, const u32 pw_l_len, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, const u64 gid_max) +KERNEL_FQ void l_markov (KERN_ATTR_L_MARKOV) { const u64 gid = get_global_id (0); @@ -129,7 +130,7 @@ KERNEL_FQ void l_markov (GLOBAL_AS pw_t *pws_buf_l, GLOBAL_AS const cs_t *root_c pws_buf_l[gid] = pw; } -KERNEL_FQ void r_markov (GLOBAL_AS bf_t *pws_buf_r, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u64 off, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, const u64 gid_max) +KERNEL_FQ void r_markov (KERN_ATTR_R_MARKOV) { const u64 gid = get_global_id (0); @@ -207,7 +208,7 @@ KERNEL_FQ void r_markov (GLOBAL_AS bf_t *pws_buf_r, GLOBAL_AS const cs_t *root_c pws_buf_r[gid].i = pw.i[0]; } -KERNEL_FQ void C_markov (GLOBAL_AS pw_t *pws_buf, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u64 off, const u32 pw_len, const u32 mask80, const u32 bits14, const u32 bits15, const u64 gid_max) +KERNEL_FQ void C_markov (KERN_ATTR_C_MARKOV) { const u64 gid = get_global_id (0); diff --git a/OpenCL/shared.cl b/OpenCL/shared.cl index 0b7f7a204..093417f2c 100644 --- a/OpenCL/shared.cl +++ b/OpenCL/shared.cl @@ -11,9 +11,10 @@ #include STR(INCLUDE_PATH/inc_types.h) #include STR(INCLUDE_PATH/inc_platform.cl) #include STR(INCLUDE_PATH/inc_common.cl) +#include STR(INCLUDE_PATH/inc_shared.h) #endif -DECLSPEC void gpu_decompress_entry (GLOBAL_AS pw_idx_t *pws_idx, GLOBAL_AS u32 *pws_comp, pw_t *buf, const u64 gid) +DECLSPEC void gpu_decompress_entry (GLOBAL_AS pw_idx_t *pws_idx, GLOBAL_AS u32 *pws_comp, PRIVATE_AS pw_t *buf, const u64 gid) { const u32 off = pws_idx[gid].off; const u32 cnt = pws_idx[gid].cnt; @@ -96,7 +97,7 @@ DECLSPEC void gpu_decompress_entry (GLOBAL_AS pw_idx_t *pws_idx, GLOBAL_AS u32 * *buf = pw; } -KERNEL_FQ void gpu_decompress (GLOBAL_AS pw_idx_t *pws_idx, GLOBAL_AS u32 *pws_comp, GLOBAL_AS pw_t *pws_buf, const u64 gid_max) +KERNEL_FQ void gpu_decompress (KERN_ATTR_GPU_DECOMPRESS) { const u64 gid = get_global_id (0); @@ -109,7 +110,7 @@ KERNEL_FQ void gpu_decompress (GLOBAL_AS pw_idx_t *pws_idx, GLOBAL_AS u32 *pws_c pws_buf[gid] = pw; } -KERNEL_FQ void gpu_memset (GLOBAL_AS uint4 *buf, const u32 value, const u64 gid_max) +KERNEL_FQ void gpu_memset (KERN_ATTR_GPU_MEMSET) { const u64 gid = get_global_id (0); @@ -131,14 +132,19 @@ KERNEL_FQ void gpu_memset (GLOBAL_AS uint4 *buf, const u32 value, const u64 gid_ r.y = value; r.z = value; r.w = value; + #elif defined IS_METAL + r.x = value; + r.y = value; + r.z = value; + r.w = value; #endif buf[gid] = r; } -KERNEL_FQ void gpu_bzero(GLOBAL_AS uint4* buf, const u64 gid_max) +KERNEL_FQ void gpu_bzero (KERN_ATTR_GPU_BZERO) { - const u64 gid = get_global_id(0); + const u64 gid = get_global_id (0); if (gid >= gid_max) return; @@ -158,12 +164,17 @@ KERNEL_FQ void gpu_bzero(GLOBAL_AS uint4* buf, const u64 gid_max) r.y = 0; r.z = 0; r.w = 0; + #elif defined IS_METAL + r.x = 0; + r.y = 0; + r.z = 0; + r.w = 0; #endif buf[gid] = r; } -KERNEL_FQ void gpu_atinit (GLOBAL_AS pw_t *buf, const u64 gid_max) +KERNEL_FQ void gpu_atinit (KERN_ATTR_GPU_ATINIT) { const u64 gid = get_global_id (0); @@ -245,7 +256,7 @@ KERNEL_FQ void gpu_atinit (GLOBAL_AS pw_t *buf, const u64 gid_max) buf[gid] = pw; } -KERNEL_FQ void gpu_utf8_to_utf16 (GLOBAL_AS pw_t *pws_buf, const u64 gid_max) +KERNEL_FQ void gpu_utf8_to_utf16 (KERN_ATTR_GPU_UTF8_TO_UTF16) { const u64 gid = get_global_id (0); diff --git a/docs/changes.txt b/docs/changes.txt index e6b671956..a914583f5 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -49,7 +49,8 @@ - Hash Info: show more information (Updated Hash-Format. Added Autodetect, Self-Test, Potfile and Plaintext encoding) - HIP Backend: moved functions to ext_hip.c/ext_hiprtc.c and includes to ext_hip.h/ext_hiprtc.h - Kernels: Refactored standard kernel declaration to use a structure holding u32/u64 attributes to reduce the number of attributes -- Kernels: Refactored standard kernel includes in order to support Apple Metal runtime +- Kernels: Refactored standard kernel includes, KERN_ATTR macros and rc4 cipher functions, in order to support Apple Metal runtime +- Kernels: Set the default Address Space Qualifier for any pointer, in order to support Apple Metal runtime - Makefile: updated MACOSX_DEPLOYMENT_TARGET to 10.15 and removed OpenCL framework from LFLAGS_NATIVE on MacOS - OpenCL Backend: added workaround to make optimized kernels work on Apple Silicon - OpenCL Backend: moved functions to ext_OpenCL.c and includes to ext_OpenCL.h