1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-23 15:08:37 +00:00
Commit Graph

30 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
Jens Steube
ed6e967425 Add experimental SCRYPT N-parameter auto-discovery
Remove existing tuningdb entries due to salsa_r() core
refactor. Update tuningdb engine to prefer file entries,
when available, over automatic discovery.

Improve memory-free detection per device, default
--backend-device-keepfree is now set to 0.

Old brute-force OpenCL behavior can be restored using
--backend-device-keepfree 100.
2025-06-08 07:32:32 +02:00
Jens Steube
d5934f9e3d - Fix memory leak in python bridge
- Fix Python header validation in Makefile
- Improve some tunings
2025-06-05 21:15:49 +02:00
Jens Steube
e8052a004b - Replace naive 32 bit rotate with funnelshift on CUDA/HIP
- Replace V_ALIGNBIT_B32 with funnelshift on HIP
- Improve RC4 performance by preventing inlineing
- Fix leftover code in yescrypt-platform.c
- Update docs/hashcat-assimilation-bridge-development.md
- Only initialize hwmon on host for virtualized backends
- Improve SCRYPT tunings on AMD RX6900XT
2025-06-02 11:50:08 +02:00
Gabriele Gristina
24fa627f2f Added hash-mode: BestCrypt v4 Volume Encryption 2025-04-27 20:57:43 +02:00
ViperelB
6f862d25b5
typo fix 2023-11-20 10:06:12 +02:00
ViperelB
17c3ec31db
Updated Alias.hctune with more AMD cards 2023-11-20 09:36:19 +02:00
PenguinKeeper7
208f9b88dd
Add 4060/4060Ti to autotune alias 2023-10-18 14:37:22 +01:00
PenguinKeeper7
d071a76725
Add -m 99999 to Modules_default.hctune 2023-08-14 02:12:02 +01:00
PenguinKeeper7
a536d08250
Change Module_15700.hctune command 2023-05-24 14:11:02 +01:00
jsteube
5ceb8c7688 Add SCRYPT 16k:8:1 tunings for 4090 2023-05-21 11:07:33 +00:00
Chick3nman
0795f1b360 Add Nvidia RTX 4070 now that it's released. 2023-04-25 15:21:49 -05:00
Chick3nman
9819a044ab Add several missing GPUs to ALIAS.hctune
Update tuning README with new info
2023-04-06 13:30:00 -05:00
jsteube
d129d6d2b2 Add missing hash-modes 9000 and 18600 to tunings/Modules_bcrypt.hctune 2023-03-17 20:18:56 +00:00
PenguinKeeper7
04b891ab31
Include bcrypt(sha512) in tuning db
Add 28400 to the bcrypt hctune
2023-03-13 02:13:08 +00:00
PenguinKeeper7
036256aac6
Include new bcrypt(sha256) in tuning db
Add 30600 to the bcrypt hctune
2023-03-13 02:07:56 +00:00
David Ketler
bb620db348 add tuning records for a number of algorithms for the RX 7900XTX 2023-02-22 13:28:06 -05:00
jsteube
6d437a6430 Update Alias.hctune based on wikipedia's List of Nvidia GPU 2023-02-01 20:04:59 +00:00
jsteube
19cefb36d1 Add missing RTX 4070Ti to tunings database 2023-01-16 18:36:47 +00:00
jsteube
29f9a7f14d Add missing RTX 4080 to tunings database 2023-01-15 23:12:37 +00:00
Jens Steube
a7dbd73612 Add Radeon Pro W5700X to more scrypt based hash-modes and fix some metal issues 2022-11-26 13:32:33 +01:00
Jens Steube
6271456f49 Add Radeon Pro W5700X to -m 8900 tuning file 2022-11-25 21:00:44 +01:00
Chick3nman
b54720cb53
Add RTX 4090
Add tuning line for the RTX 4090
2022-10-15 16:34:15 -05:00
Jens Steube
6e133068b8 Add tuning for NV RTX3090 for -m 29800 2022-09-23 20:33:43 +02:00
jsteube
88d5540c49 Add tuning for NV RTX2080Ti for -m 29800 2022-09-22 14:44:08 +00:00
Jens Steube
40d44d6fe1 Add tuning for AMD RX6900XT for -m 29800 2022-09-21 21:15:39 +02:00
Jens Steube
1bbf9a68a0 Update tunings/Module_29800.hctune to reflect right hash-mode 2022-09-20 19:18:37 +02:00
Banaanhangwagen
1685904219
Create Module_29800.hctune 2022-09-16 16:20:51 +02:00
jsteube
0e813cbe84 Add Modules_bcrypt.hctune as example for algorithm based tuning 2022-08-09 18:49:54 +00:00
jsteube
c8350eb555 Added tunings/ folder in order to replace hashcat.hctune. Configuration files with *.hctune suffix are automatically load on startup 2022-08-08 11:09:04 +00:00