1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-07 07:12:36 +00:00
Commit Graph

19 Commits

Author SHA1 Message Date
Jens Steube
c87a87f992 Improvements to SCRYPT autotuning strategy
General:

The logic for calculating the SCRYPT workload has been moved
from module_extra_buffer_size() to module_extra_tuningdb_block().
Previously, this function just returned values from a static
tuning file. Now, it actually computes tuning values on the fly
based on the device's resources and SCRYPT parameters. This
was always possible, it just wasn't used that way until now.

After running the calculation, the calculated kernel_accel value
is injected into the tuning database as if it had come from a
file. The tmto value is stored internally.

Users can still override kernel-threads, kernel-accel, and
scrypt-tmto via the command line or via tuningdb file.

module_extra_tuningdb_block():

This is now where kernel_accel and tmto are automatically
calculated.

The logic for accel and tmto is now separated and more
flexible. Whether the user is using defaults, tuningdb entries, or
manual command line overrides, the code logic will try to make
smart choices based on what's actually available on the device.

First, it tries to find a kernel_accel value that fits into
available memory. It starts with a base value and simulates
tmto=1 or 2 (which is typical good on GPU).

It also leaves room for other buffers (like pws[], tmps[], etc.).
If the result is close to the actual processor count,
it gets clamped.

This value is then added to the tuning database, so hashcat can pick
it up during startup.

Once that's set, it derives tmto using available memory, thread
count, and the actual SCRYPT parameters.

module_extra_buffer_size():

This function now just returns the size of the SCRYPT B[] buffer,
based on the tmto that was already calculated.

kernel_threads:

Defaults are now set to 32 threads in most cases. On AMD GPUs,
64 threads might give a slight performance bump, but 32 is more
consistent and reliable.

For very memory-heavy algorithms (like Ethereum Wallet), it
scales down the thread count.

Here's a rough reference for other SCRYPT-based modes:

- 64 MiB: 16 threads
- 256 MiB: 4 threads

Tuning files:

All built-in tuningdb entries have been removed, because they
shouldn’t be needed anymore. But you can still add custom entries
if needed. There’s even a commented-out example in the tuningdb
file for mode 22700.

Free memory handling:

Getting the actual amount of free GPU memory is critical for
this to work right. Unfortunately, none of the common GPGPU APIs
give reliable numbers. We now query low-level interfaces like
SYSFS (AMD) and NVML (NVIDIA). Support for those APIs is in
place already, except for ADL, which still needs to be added.

Because of this, hwmon support (which handles those low-level
queries) can no longer be disabled.
2025-06-09 11:02:34 +02:00
jsteube
6ee2658104 Prefix more macros to avoid collisions in other existing libraries 2023-01-30 14:41:12 +00:00
jsteube
f1ff925b6e Prepare rename macros in header files from _MACRO to MACRO 2023-01-17 19:25:40 +00:00
Gabriele Gristina
3a6481da4e show all fans in hwmon output 2021-06-19 20:32:07 +02:00
Jens Steube
e3500ff4aa Add CUDA device attributes to -I 2019-04-30 13:38:44 +02:00
jsteube
b864fa5ba7 Removed option --gpu-temp-retain that tried to retain GPU temperature at X degrees celsius, please use driver specific tools
Removed option --powertune-enable to enable power tuning, please use driver specific tools
2017-12-01 15:19:10 +01:00
Rosen Penev
ee0911c26e Add NVML and NVAPI support to Cygwin 2017-02-07 16:19:41 -08:00
jsteube
9eb9543cda Basic sysfs support to read temp and read/write fan speed for amd-gpu-pro 2016-11-05 23:19:13 +01:00
jsteube
f084aaf61b Update hwmon.c function parameters 2016-10-06 11:10:00 +02:00
coolbry95
a78fd4e915 changed uint to u32 2016-10-04 00:35:49 -04:00
jsteube
7191780296 Make use of hwmon_ctx_t 2016-09-28 22:28:44 +02:00
jsteube
81bc9081ad Prepare hwmon_ctx_t, not used yet 2016-09-28 15:26:56 +02:00
jsteube
e6f083b708 Add all defaults for user commandline parameters to user_options.h; Prepare user commandline parameter struct for easier handling of functions calls that require them 2016-09-20 16:04:22 +02:00
jsteube
a0f6ed6832 Introduce hashes_t; not finishe yet 2016-09-16 17:01:18 +02:00
jsteube
7ce2f2ff19 Introduce opencl_ctx_t; not finished yet 2016-09-15 16:02:52 +02:00
jsteube
3daf0af480 Added docs/credits.txt
Added docs/team.txt
2016-09-11 22:20:15 +02:00
jsteube
7f1ecc7cb7 Use hashcat.c configuration macros to get an idea of the remaining features which should move into their own source file 2016-09-11 10:28:59 +02:00
jsteube
e4bf86dcbe Replace #pragma once with #ifndef #define #endif logic because #pragma once does not work cleanly on OSX 2016-09-06 18:44:05 +02:00
jsteube
d15ae38723 Move hwmon specific functions into their own source file 2016-09-06 13:29:50 +02:00