mirror of
https://github.com/hashcat/hashcat.git
synced 2025-07-23 15:08:37 +00:00
Fixed autotune edge case and encoder bugs
Improved handling of an autotune edge case. In theory, increasing accel early can improve accuracy, and it does, but it also prevents increasing the thread count because it's more likely to run into high runtime limits. OTOH, we want to prioritize threads over accel. This change may slightly reduce performance for algorithms that benefit from high accel and low thread counts (e.g., 7800, 14900), but those can be managed by limiting thread count or, preferably, by setting OPTS_TYPE_NATIVE_THREADS. Added OPTS_TYPE_NATIVE_THREADS to 7800, 7810, and 14900. Also fixed encoder bugs in hash-mode 29920 and 29940, identified using the new test_edge.sh script. The encoders in the modules failed to properly terminate the output string.
This commit is contained in:
parent
773531d6eb
commit
d9d57fc9a0
@ -334,6 +334,14 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
// v7 autotuner is a lot more straight forward
|
||||
// we start with some purely theoretical values as a base, then move on to some meassured tests
|
||||
|
||||
/* This causes more problems than it solves.
|
||||
* In theory, it's fine to boost accel early to improve accuracy, and it does,
|
||||
* but on the other hand, it prevents increasing the thread count due to high runtime.
|
||||
* For longer runtimes, we want to prioritize more threads over higher accel.
|
||||
* This change also has some downsides for algorithms that actually benefit
|
||||
* from higher accel and fewer threads (e.g., 7800, 14900). But those are easy to manage
|
||||
* by limiting thread count, or better, by setting them to OPTS_TYPE_NATIVE_THREADS.
|
||||
|
||||
if (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL)
|
||||
{
|
||||
if (kernel_accel_min < kernel_accel_max)
|
||||
@ -348,6 +356,7 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (kernel_threads_min < kernel_threads_max)
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE
|
||||
| OPTI_TYPE_NOT_ITERATED;
|
||||
static const u64 OPTS_TYPE = OPTS_TYPE_STOCK_MODULE
|
||||
| OPTS_TYPE_PT_GENERATE_BE
|
||||
| OPTS_TYPE_NATIVE_THREADS
|
||||
| OPTS_TYPE_ST_ADD80
|
||||
| OPTS_TYPE_ST_UPPER;
|
||||
static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED;
|
||||
|
@ -24,6 +24,7 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE
|
||||
| OPTI_TYPE_NOT_ITERATED;
|
||||
static const u64 OPTS_TYPE = OPTS_TYPE_STOCK_MODULE
|
||||
| OPTS_TYPE_PT_GENERATE_BE
|
||||
| OPTS_TYPE_NATIVE_THREADS
|
||||
| OPTS_TYPE_ST_ADD80
|
||||
| OPTS_TYPE_ST_UPPER;
|
||||
static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED;
|
||||
|
@ -23,6 +23,7 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE
|
||||
| OPTI_TYPE_REGISTER_LIMIT;
|
||||
static const u64 OPTS_TYPE = OPTS_TYPE_STOCK_MODULE
|
||||
| OPTS_TYPE_PT_GENERATE_LE
|
||||
| OPTS_TYPE_NATIVE_THREADS
|
||||
| OPTS_TYPE_SUGGEST_KG;
|
||||
static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED;
|
||||
static const char *BENCHMARK_MASK = "?b?b?b?b?bxxxxx";
|
||||
|
@ -245,6 +245,8 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
u32_to_hex (byte_swap_32 (encdatavault->keychain[i]), (u8 *) tmp_buf + j);
|
||||
}
|
||||
|
||||
tmp_buf[32 * 8] = 0;
|
||||
|
||||
const int line_len = snprintf (line_buf, line_size, "%s%u$%u$%08x%08x$%08x%08x$32$%08x%08x%08x%08x%08x%08x%08x%08x$%u$%s",
|
||||
SIGNATURE_ENCDATAVAULT,
|
||||
encdatavault->version,
|
||||
|
@ -207,6 +207,8 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
u32_to_hex (byte_swap_32 (encdatavault->keychain[i]), (u8 *) tmp_buf + j);
|
||||
}
|
||||
|
||||
tmp_buf[32 * 8] = 0;
|
||||
|
||||
const int line_len = snprintf (line_buf, line_size, "%s%u$%u$%08x%08x$%08x%08x$%s",
|
||||
SIGNATURE_ENCDATAVAULT,
|
||||
encdatavault->version,
|
||||
|
Loading…
Reference in New Issue
Block a user