1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-06 23:02:35 +00:00
hashcat/include
Jens Steube ed10e6a913 Autotune and Benchmark refactoring
This change affects three key areas, each improving autotuning:

- Autotune refactoring itself

The main autotune algorithm had become too complex to maintain and has
now been rewritten from scratch. The engine is now closer to the old
v6.0.0 version, using a much more straightforward approach.

Additionally, the backend is now informed when the autotune engine runs
its operations and runs an extra invisible kernel invocation. This
significantly improves runtime accuracy because the same caching
mechanisms which kick in normal cracking sessions now also apply during
autotuning. This leads to more consistent and reliable automatic
workload tuning.

- Benchmarking and '--speed-only' accuracy bugs fixed

Benchmark runtimes had become too short, especially since the default
benchmark mask changed from '?b?b?b?b?b?b?b' to '?a?a?a?a?a?a?a?a'. For
very fast hashes like NTLM, benchmarks often stopped immediately when
base words needed to be regenerated, producing highly inaccurate
results.

This issue also misled users tuning '-n' values, as manually
oversubscribing kernels could mask the problem, creating the impression
that increasing '-n' had a larger impact on performance than it truly
does. While '-n' still has an effect, it’s not as significant. With this
fix, users achieve the same speed without needing to tune '-n' manually.

The bug was fixed by enforcing a minimum benchmark runtime of 4 seconds,
regardless of kernel runtime or kernel type. This ensures more stable
and realistic benchmark results, but typically increasing the benchmark
duration by up to 4 seconds.

- Kernel-Threads set to 32 and plugin configuration cleanup

Some plugin configurations existed solely to work around the old
benchmarking bug and can now be removed. For example,
'OPTS_TYPE_MAXIMUM_THREADS' is no longer required and has been removed
from all plugins, although the parameter itself remains to avoid
breaking custom plugins.

Because increasing threads beyond 32 no longer offers meaningful
performance gains, the default is now capped at 32 (unless overridden
with '-T'). This simplifies GPU memory management. Currently, work-item
counts are indirectly limited by buffer sizes (e.g., 'pws_buf[]'), which
must not exceed 4 GiB (a hard-coded limit). This buffer size depends on
the product of 'kernel-accel', 'kernel-threads', and the device’s
compute units. By reducing the default threads from 1024 to 32, there is
now more space available for base words.
2025-06-22 20:17:52 +02:00
..
affinity.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
autotune.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
backend.h Autotune and Benchmark refactoring 2025-06-22 20:17:52 +02:00
benchmark.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
bitmap.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
bitops.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
brain.h fix stdcall warnings under clang32/64 2023-08-09 17:26:34 -07:00
bridges.h The Assimilation Bridge (Framework) 2025-05-29 15:38:13 +02:00
combinator.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
common.h Increased-virtual-backend-limit 2024-01-25 10:27:38 +01:00
convert.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
cpt.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
cpu_crc32.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
cpu_features.h Fix compile error on apple silicon 2025-06-04 10:41:24 +02:00
debugfile.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
dictstat.h Fix missing check for -j and -k before writing hashcat.dictstat2 which can lead to false negatives 2023-08-08 21:11:44 +00:00
dispatch.h include winsock2 instead of 1 2023-08-09 17:44:21 -07:00
dynloader.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_general.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_bignum_operations.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_cipher_aes.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_cipher_des.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_ecc_secp256k1.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_hash_base58.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_hash_md4.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_hash_md5.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_hash_sha1.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_hash_sha256.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_hash_sha512.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_radmin3_constants.h Prepare rename macros in header files from _MACRO to MACRO 2023-01-17 19:25:40 +00:00
emu_inc_rp_optimized.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
emu_inc_rp.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
event.h Rename EVENT_H macro to avoid collision with EVENT_H macro from Apple library 2023-01-29 18:03:37 +00:00
ext_ADL.h fix prototypes and old declarations 2023-08-20 21:13:12 -07:00
ext_cuda.h fix prototypes and old declarations 2023-08-20 21:13:12 -07:00
ext_hip.h Update hipDeviceAttribute_t for ROCm 6.x 2025-06-18 18:29:47 +02:00
ext_hiprtc.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
ext_iokit.h using hc_IOMasterPortDefault instead of kIOMasterPortDefault/kIOMainPortDefault 2023-06-03 22:36:40 +02:00
ext_lzma.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
ext_metal.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
ext_nvapi.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
ext_nvml.h Improvements to SCRYPT autotuning strategy 2025-06-09 11:02:34 +02:00
ext_nvrtc.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
ext_OpenCL.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
ext_sysfs_amdgpu.h Improvements to SCRYPT autotuning strategy 2025-06-09 11:02:34 +02:00
ext_sysfs_cpu.h fix prototypes and old declarations 2023-08-20 21:13:12 -07:00
filehandling.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
folder.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
hashcat.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
hashes.h Introduce hashes_init_stage5() and call module_extra_tmp_size() there. At this stage, the self-test hash is initialized and its values can be used. 2025-06-15 14:13:48 +02:00
hlfmt.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
hwmon.h Improvements to SCRYPT autotuning strategy 2025-06-09 11:02:34 +02:00
induct.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
interface.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
keyboard_layout.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
locking.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
logfile.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
loopback.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
memory.h Add hcmalloc_aligned() and hcfree_aligned() 2023-05-08 23:11:33 +00:00
modules.h Improvements to SCRYPT autotuning strategy 2025-06-09 11:02:34 +02:00
monitor.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
mpsp.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
outfile_check.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
outfile.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
pidfile.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
potfile.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
restore.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
rp_cpu.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
rp.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
selftest.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
shared.h Removed shared-memory based optimization for SCRYPT on HIP, because the shared-memory buffer is incompatible with TMTO, which is limiting SCRYPT-R to a maximum of 8. This change also simplifies the code, allowing removal of large sections of duplicated code. Removed the section in scrypt_module_extra_tuningdb_block() that increased TMTO when there was insufficient shared memory, as this is no longer applicable. 2025-06-21 07:09:20 +02:00
slow_candidates.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
sort_r.h Fix some typos 2023-07-27 23:11:55 +07:00
status.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
stdout.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
straight.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
terminal.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
thread.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
timer.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
tuningdb.h Improvements to SCRYPT autotuning strategy 2025-06-09 11:02:34 +02:00
types.h Update hipDeviceAttribute_t for ROCm 6.x 2025-06-18 18:29:47 +02:00
usage.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
user_options.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
wordlist.h Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00