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

714 Commits

Author SHA1 Message Date
Jens Steube
c033873e4b Update hipDeviceAttribute_t for ROCm 6.x
Add hipDeviceProp_t and bindings for hipGetDeviceProperties(), hipGetDeviceProperties is required to retrieve gcnArchName[].
Add gcnArchName[] to select the correct --gpu-architecture value for a specific device when using hiprtc.
Include sm_major and sm_minor for CUDA and gcnArchName for HIP in the kernel filename hash.
Update nvrtc_options[] and hiprtc_options[] to avoid unused variables, eliminating the use of --restrict as a placeholder and preventing nvrtc from aborting.
Add check_file_suffix() and remove_file_suffix() helper functions.
2025-06-18 18:29:47 +02:00
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
d60658102b Added option --backend-devices-keepfree to configure X percentage of device memory available to keep free 2025-06-04 10:13:29 +02:00
Jens Steube
b02b1b5033 - Add code to recognize Microsofts OpenCL D3D12 platform
- Skip memory-free detection on MS OpenCL platform to avoid crashes
- Improve salt usage of 70100/70200, use decoder/kernels from 8900
- Add REPLACE bridge type support (eg. BRIDGE_TYPE_REPLACE_LOOP)
- Switch 70000, 70100 and 70200 to BRIDGE_TYPE_REPLACE_LOOP
- Add synchronization barriers on d2h copy when using bridges
- Improve speed status display updates when using bridges
- Set AMD_DIRECT_DISPATCH=0 to reduce CPU burning loop on AMD backends
- Set benchmark/selftest hash on 70100/70200 to 16:8:1
2025-06-02 06:59:36 +02:00
Jens Steube
ceb5ff5641 The Assimilation Bridge (Framework) 2025-05-29 15:38:13 +02:00
Jens Steube
b9938f34d6
Merge pull request #4201 from matrix/RC4_KPA
Added hash-modes: RC4 40-bit DropN, RC4 72-bit DropN, RC4 104-bit DropN
2025-05-18 20:39:24 +02:00
Gabriele Gristina
120e758be9 Added options --benchmark-min and --benchmark-max to set a hash-mode range to be used during the benchmark 2025-05-07 18:46:51 +02:00
Gabriele Gristina
ff6185e9b4 Added hash-modes: RC4 40-bit DropN, RC4 72-bit DropN, RC4 104-bit DropN 2025-05-06 20:44:50 +02:00
fse-a
f8c0899670 Increased-virtual-backend-limit
Increased the virtual backend limit.
2024-01-25 10:27:38 +01:00
jsteube
dad46090d7 Fix variable name dynamicx_t in hashinfo_t 2023-11-16 19:01:25 +00:00
jsteube
7faa6a94a5 Add dynamicx_t type for later use in potfile.c and outfile.c and also add to hashinfo_t 2023-11-15 17:06:37 +00:00
jsteube
b66527f0d2 Prepare commandline parameter for upcoming partial support for $dynamic_X$ 2023-11-01 16:12:44 +00:00
jsteube
b1b349e8c9 Prepare commandline parameter for upcoming partial support for $dynamic_X$ 2023-10-31 10:38:10 +00:00
jsteube
adbcef6909 Refactor optimized_kernel_enable variable to just optimized_kernel, same idea as outfile_autohex variable 2023-10-30 15:09:36 +00:00
jsteube
e55b331058 Refactor potfile_disable variable to just putfile, same idea as outfile_autohex variable 2023-10-21 16:42:29 +00:00
jsteube
b597a96328 Refactor restore_disable variable to restore_enable, try to make variable names always positive for easier handling 2023-10-20 12:16:18 +00:00
jsteube
ff94f4c9d0 Refactor self_test_disable variable to just self_test, same idea as outfile_autohex variable 2023-10-19 06:08:24 +00:00
jsteube
7b52dad8c9 Refactor multiply_accel_disable variable to just multiply_accel, same idea as outfile_autohex variable 2023-10-18 12:41:09 +00:00
jsteube
bf04a158aa Refactor markov_disable variable to just markov, same idea as outfile_autohex variable 2023-10-17 12:17:05 +00:00
jsteube
e498138bb6 Refactor logfile_disable variable to just logfile, same idea as outfile_autohex variable 2023-10-16 13:18:45 +00:00
jsteube
98ee1bd396 Refactor hwmon_disable variable to just hwmon, same idea as outfile_autohex variable 2023-10-15 18:40:56 +00:00
jsteube
1255afb55c Refactor deprecated_check_disable variable to just deprecated_check, same idea as outfile_autohex variable 2023-10-13 12:17:44 +00:00
jsteube
652b66e642 Refactor advise_disable variable to just advise, same idea as outfile_autohex variable 2023-10-12 13:03:45 +00:00
jsteube
4dceea914f Refactor wordlist_autohex_disable variable to wordlist_autohex, same idea as outfile_autohex variable 2023-10-10 21:03:07 +00:00
jsteube
ec4ce2ed89 Prepare types.h for --outfile-json 2023-10-05 18:07:15 +00:00
PenguinKeeper7
1bae3383dc Fix -o warning when already used 2023-09-18 16:16:47 +01:00
PenguinKeeper7
2954b62a6a Use chgd variable to decide dictstat building
Use rule_buf_l_chgd and rule_buf_r_chgd instead of checking raw values for futureproofing / code cleanliness
2023-09-04 23:09:07 +01:00
Rosen Penev
88347540f3
include zlib.h
Various types included in zlib.h such as gzFile are implicitly included
with minizip. Get rid of this behavior and explicitly include zlib.h.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-07-09 16:53:42 -07:00
Gabriele Gristina
aa4be217fd
Merge branch 'master' into help2int 2023-05-05 15:41:37 +02:00
Gabriele Gristina
36606addac Help: show supported hash-modes only with -hh 2023-05-01 17:38:42 +02:00
Gabriele Gristina
e6d1a4c8a2 Added --metal-compiler-runtime option 2023-05-01 03:33:35 +02:00
jsteube
6785a32e7a Added new feature (-Y) that creates N virtual instances for each device in your system at the cost of N times the device memory consumption 2023-04-16 12:04:34 +00:00
jsteube
c8dd3d63e9 Add new category for application database and move new -m 31400 to it 2023-03-20 11:22:34 +00:00
jsteube
77c9f096db Align loading rules log event usage with other log events 2023-03-11 08:55:37 +00:00
justpretending
004ec79647 Don't close and reopen a FIFO 2023-02-19 00:55:55 +07: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
15d74b7c1c Disable Metal < 200, commented unused and deprecated code 2022-12-08 18:59:34 +01:00
Jens Steube
8973f2beca Add more RC_FINAL_ enum types 2022-09-12 20:48:38 +02:00
Dávid Bolvanský
454b0ad294 Do not hexify worldlist when --hex-charset is used 2022-09-06 01:25:23 +02:00
Jens Steube
613c863f1d Prepare an enum type to represent the final return codes 2022-09-04 18:10:40 +02:00
Jens Steube
93d40beb17 Status Code: Add specific return code for self-test fail (-11)
Fixes https://github.com/hashcat/hashcat/issues/3437
2022-09-03 15:46:40 +02:00
Jens Steube
ea29cb5805 Restore: Restore timer is decreased from 60 seconds to 1 second, but only updates if there's actually a change compared to previous data written to restore file 2022-08-31 11:44:13 +02:00
Jens Steube
a52b70d1c5 Refactored Recovered.New... handling 2022-08-19 12:02:21 +02:00
Jens Steube
bf0ffa66d7 Abstract access to digests_done_new via API 2022-08-18 11:21:34 +02:00
philsmd
d9749e8799
change interface, add module_benchmark_charset () 2022-07-15 17:17:57 +02:00
Konrad Goławski
a15fa2014c Increase event buffers sizes
Fixes GH-3359
2022-07-03 14:55:47 +02:00
philsmd
22e033020a
Add -m 28503/28504 = Bitcoin WIF, P2WSH/bech32/segwit address 2022-06-20 15:25:34 +02:00
philsmd
754038ad16
fixes #3090 closes #3091: Added -m 2850x = Bitcoin WIF/P2PKH private key cracking 2022-06-11 11:44:05 +02:00