diff --git a/OpenCL/m10100_a0-optimized.cl b/OpenCL/m10100_a0-optimized.cl index c9307dfd5..8ed585765 100644 --- a/OpenCL/m10100_a0-optimized.cl +++ b/OpenCL/m10100_a0-optimized.cl @@ -15,20 +15,20 @@ #include "inc_simd.cl" #endif -#define SIPROUND(v0,v1,v2,v3) \ - (v0) += (v1); \ - (v1) = hc_rotl64 ((v1), 13); \ - (v1) ^= (v0); \ - (v0) = hc_rotl64 ((v0), 32); \ - (v2) += (v3); \ - (v3) = hc_rotl64 ((v3), 16); \ - (v3) ^= (v2); \ - (v0) += (v3); \ - (v3) = hc_rotl64 ((v3), 21); \ - (v3) ^= (v0); \ - (v2) += (v1); \ - (v1) = hc_rotl64 ((v1), 17); \ - (v1) ^= (v2); \ +#define SIPROUND(v0,v1,v2,v3) \ + (v0) += (v1); \ + (v1) = hc_rotl64 ((v1), 13); \ + (v1) ^= (v0); \ + (v0) = hc_rotl64 ((v0), 32); \ + (v2) += (v3); \ + (v3) = hc_rotl64 ((v3), 16); \ + (v3) ^= (v2); \ + (v0) += (v3); \ + (v3) = hc_rotl64 ((v3), 21); \ + (v3) ^= (v0); \ + (v2) += (v1); \ + (v1) = hc_rotl64 ((v1), 17); \ + (v1) ^= (v2); \ (v2) = hc_rotl64 ((v2), 32) KERNEL_FQ void m10100_m04 (KERN_ATTR_RULES ()) diff --git a/OpenCL/m10100_a1-optimized.cl b/OpenCL/m10100_a1-optimized.cl index fa0d46f0f..61d40e2b3 100644 --- a/OpenCL/m10100_a1-optimized.cl +++ b/OpenCL/m10100_a1-optimized.cl @@ -13,20 +13,20 @@ #include "inc_simd.cl" #endif -#define SIPROUND(v0,v1,v2,v3) \ - (v0) += (v1); \ - (v1) = hc_rotl64 ((v1), 13); \ - (v1) ^= (v0); \ - (v0) = hc_rotl64 ((v0), 32); \ - (v2) += (v3); \ - (v3) = hc_rotl64 ((v3), 16); \ - (v3) ^= (v2); \ - (v0) += (v3); \ - (v3) = hc_rotl64 ((v3), 21); \ - (v3) ^= (v0); \ - (v2) += (v1); \ - (v1) = hc_rotl64 ((v1), 17); \ - (v1) ^= (v2); \ +#define SIPROUND(v0,v1,v2,v3) \ + (v0) += (v1); \ + (v1) = hc_rotl64 ((v1), 13); \ + (v1) ^= (v0); \ + (v0) = hc_rotl64 ((v0), 32); \ + (v2) += (v3); \ + (v3) = hc_rotl64 ((v3), 16); \ + (v3) ^= (v2); \ + (v0) += (v3); \ + (v3) = hc_rotl64 ((v3), 21); \ + (v3) ^= (v0); \ + (v2) += (v1); \ + (v1) = hc_rotl64 ((v1), 17); \ + (v1) ^= (v2); \ (v2) = hc_rotl64 ((v2), 32) KERNEL_FQ void m10100_m04 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m10100_a3-optimized.cl b/OpenCL/m10100_a3-optimized.cl index 2e3e0e3d5..e45ac8f51 100644 --- a/OpenCL/m10100_a3-optimized.cl +++ b/OpenCL/m10100_a3-optimized.cl @@ -12,20 +12,20 @@ #include "inc_simd.cl" #endif -#define SIPROUND(v0,v1,v2,v3) \ - (v0) += (v1); \ - (v1) = hc_rotl64 ((v1), 13); \ - (v1) ^= (v0); \ - (v0) = hc_rotl64 ((v0), 32); \ - (v2) += (v3); \ - (v3) = hc_rotl64 ((v3), 16); \ - (v3) ^= (v2); \ - (v0) += (v3); \ - (v3) = hc_rotl64 ((v3), 21); \ - (v3) ^= (v0); \ - (v2) += (v1); \ - (v1) = hc_rotl64 ((v1), 17); \ - (v1) ^= (v2); \ +#define SIPROUND(v0,v1,v2,v3) \ + (v0) += (v1); \ + (v1) = hc_rotl64 ((v1), 13); \ + (v1) ^= (v0); \ + (v0) = hc_rotl64 ((v0), 32); \ + (v2) += (v3); \ + (v3) = hc_rotl64 ((v3), 16); \ + (v3) ^= (v2); \ + (v0) += (v3); \ + (v3) = hc_rotl64 ((v3), 21); \ + (v3) ^= (v0); \ + (v2) += (v1); \ + (v1) = hc_rotl64 ((v1), 17); \ + (v1) ^= (v2); \ (v2) = hc_rotl64 ((v2), 32) DECLSPEC void m10100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) @@ -51,9 +51,13 @@ DECLSPEC void m10100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) v2p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); v3p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); - u64 *w_ptr = (u64 *) w; - - w_ptr[pw_len / 8] |= (u64) pw_len << 56; + switch (pw_len / 8) + { + case 0: w[1] |= pw_len << 24; break; + case 1: w[3] |= pw_len << 24; break; + case 2: w[5] |= pw_len << 24; break; + case 3: w[7] |= pw_len << 24; break; + } /** * loop @@ -141,9 +145,13 @@ DECLSPEC void m10100s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) v2p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); v3p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); - u64 *w_ptr = (u64 *) w; - - w_ptr[pw_len / 8] |= (u64) pw_len << 56; + switch (pw_len / 8) + { + case 0: w[1] |= pw_len << 24; break; + case 1: w[3] |= pw_len << 24; break; + case 2: w[5] |= pw_len << 24; break; + case 3: w[7] |= pw_len << 24; break; + } /** * digest @@ -246,7 +254,7 @@ KERNEL_FQ void m10100_m04 (KERN_ATTR_VECTOR ()) w[11] = 0; w[12] = 0; w[13] = 0; - w[14] = pws[gid].i[14]; + w[14] = 0; w[15] = 0; const u32 pw_len = pws[gid].pw_len & 63; @@ -284,7 +292,7 @@ KERNEL_FQ void m10100_m08 (KERN_ATTR_VECTOR ()) w[11] = 0; w[12] = 0; w[13] = 0; - w[14] = pws[gid].i[14]; + w[14] = 0; w[15] = 0; const u32 pw_len = pws[gid].pw_len & 63; @@ -360,7 +368,7 @@ KERNEL_FQ void m10100_s04 (KERN_ATTR_VECTOR ()) w[11] = 0; w[12] = 0; w[13] = 0; - w[14] = pws[gid].i[14]; + w[14] = 0; w[15] = 0; const u32 pw_len = pws[gid].pw_len & 63; @@ -398,7 +406,7 @@ KERNEL_FQ void m10100_s08 (KERN_ATTR_VECTOR ()) w[11] = 0; w[12] = 0; w[13] = 0; - w[14] = pws[gid].i[14]; + w[14] = 0; w[15] = 0; const u32 pw_len = pws[gid].pw_len & 63; diff --git a/src/modules/module_10100.c b/src/modules/module_10100.c index 9b4c0c8a8..03ef56cc6 100644 --- a/src/modules/module_10100.c +++ b/src/modules/module_10100.c @@ -42,23 +42,6 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } -bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) -{ - // OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-skylake: self-test failed - if (device_param->platform_vendor_id == VENDOR_ID_POCL) - { - return true; - } - - // rocm 1.2.0-20190: self-test failed - if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) - { - return true; - } - - return false; -} - int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { u32 *digest = (u32 *) digest_buf; @@ -210,6 +193,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = MODULE_DEFAULT; - module_ctx->module_unstable_warning = module_unstable_warning; + module_ctx->module_unstable_warning = MODULE_DEFAULT; module_ctx->module_warmup_disable = MODULE_DEFAULT; }