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

2875 Commits

Author SHA1 Message Date
Jens Steube
13a7b56feb Improve the logic for when to use funnelshift and when not to. Some algorithms, such as SHA1-HMAC and DCC1, do not work well with it, so it has been disabled for them.
Fix the automatic reduction of the kernel-accel maximum based on available memory per device by accounting for the additional size needed to handle register spilling.
Fix the tools/benchmark_deep.pl script to recognize benchmark masks more reliably.
2025-06-23 12:30:12 +02:00
Jens Steube
15ada5124e Further simplified the use of inc_hash_scrypt.cl without any speed regression, and updated all affected plugin kernels. Use m08900-pure.cl as a template.
Updated kernel declarations from "KERNEL_FQ void HC_ATTR_SEQ" to "KERNEL_FQ KERNEL_FA void". Please update your custom plugin kernels accordingly.
Added spilling size as a factor in calculating usable memory per device. This is based on undocumented variables and may not be 100% accurate, but it works well in practice.
Added a compiler hint to scrypt-based kernels indicating the guaranteed maximum thread count per kernel invocation.
Removed redundant kernel code 29800, as it is identical to 27700, and updated the plugin.
2025-06-21 17:41:26 +02:00
Jens Steube
b7c8fcf27c 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.
Refactored inc_hash_scrypt.cl almost completely and improved macro names in inc_hash_scrypt.h. Adapted all existing SCRYPT-based plugins to the new standard. If you have custom SCRYPT based plugins use hash-mode 8900 as reference.
Fixed some compiler warnings in inc_platform.cl.
Cleaned up code paths in inc_vendor.h for finding values for HC_ATTR_SEQ and DECLSPEC.
Removed option --device-as-default-execution-space from nvrtc for hiprtc compatibility. As a result, added __device__ back to DECLSPEC.
Removed option --restrict from nvrtc compile options since we actually alias some buffers.
Added --gpu-max-threads-per-block to hiprtc options.
Added -D MAX_THREADS_PER_BLOCK to OpenCL options (currently unused).
Removed all OPTS_TYPE_MP_MULTI_DISABLE entries for SNMPv3-based plugins.
These plugins consume large amounts of memory and for this reason,limited kernel_accel max to 256. This may still be high, but hashcat will automatically tune down kernel_accel if insufficient memory is detected.
Removed command `rocm-smi --resetprofile --resetclocks --resetfans` from benchmark_deep.pl, since some AMD GPUs become artificially slow for a while after running these commands.
Replaced load_source() with file_to_buffer() from shared.c, which does the exact same operations.
Moved suppress_stderr() and restore_stderr() to shared.c and reused them in both Python bridges and opencl_test_instruction(), where the same type of code existed.
2025-06-21 07:09:20 +02:00
Jens Steube
13245b5563 Add HC_ATTR_SEQ macro to CUDA kernels. It is left empty so that users can optionally add __launch_bounds__ or other launch attributes if needed.
Add MAX_THREADS_PER_BLOCK macro to CUDA kernels. It defaults to 1024 or a lower value if limited by the plugin module or specified via the -T command line option.
For CUDA, lower the C++ dialect from C++17 to C++14 to reduce JIT compile time. Also add support for --split-compile and --minimal flags to further improve NVRTC compile performance.
Remove power-hungry NVIDIA settings and fix missing sudo calls in tools/benchmark_deep.pl.
Remove NEW_SIMD_CODE macro from kernels that do not support SIMD (no u32x).
2025-06-18 10:08:56 +02:00
Gabriele Gristina
564c560dcb
porting the new scrypt engine to Apple Metal 2025-06-17 22:17:59 +02:00
Jens Steube
4b93a6e93c Add support for detecting unified GPU memory on CUDA and HIP (previously available only for OpenCL and Metal).
Do not adjust kernel-accel or scrypt-tmto for GPUs with unified memory, typically integrated GPUs in CPUs (APUs).
Redesign the "4-buffer" strategy to avoid overallocation from naive division by four, which can significantly increase memory usage for high scrypt configurations (e.g., 256k:8:1).
Update the scrypt B[] access pattern to match the new "4-buffer" design.
Allow user-specified kernel-accel and scrypt-tmto values, individually or both, via command line and tuning database. Any unspecified parameters are adjusted automatically.
Permit user-defined combinations of scrypt-tmto and kernel-accel even if they may exceed available memory.
2025-06-17 13:32:57 +02:00
Jens Steube
e134564a73 Increase default iteration count per kernel invocation from 1024 to 2048
Add support for lower iteration counts per kernel invocation than the default, enabling TMTO for low scrypt configurations, such as N=1024
Use TMTO 2 if it reaches 4 times the device processor count, instead of TMTO 1 always
Improve performance for low scrypt configurations (hash-mode 9300)
Fix unit test for 15700 with correct scrypt configurations
Disable CPU over subscription for SCRYPT based algorithms
2025-06-15 21:14:40 +02:00
Jens Steube
4d2485db0f Re-enable warmup on SCRYPT based algorithms for more accurate results.
Fix TMTO handling
2025-06-15 18:00:08 +02:00
Jens Steube
53186f0a7f Added OpenCL/inc_hash_scrypt.cl and src/modules/scrypt_common.c with the goal to reduce code duplication in scrypt based plugins.
Updated all scrypt based plugins.
Added condition in OpenCL/inc_hash_scrypt.cl to use local memory in case of HIP platform for a 10% speed boost.
2025-06-14 18:07:50 +02:00
Jens Steube
8494116ded Added support for WBB4 (Woltlab Burning Board) Plugin [bcrypt(bcrypt($pass))]
Thanks for the contribution! You know who you are.
2025-06-13 12:38:06 +02:00
Jens Steube
2e640c4e9f Speed improvements for all QNX /etc/shadow
Speed improvements for all OpenSSH private key (by reducing max upported password length from 256 to 128)
2025-06-12 21:18:24 +02:00
Jens Steube
4e0a728f8f Add HC_ATTR_SEQ as a workaround, since HIP no longer
supports compiler option --gpu-max-threads-per-block
2025-06-12 09:17:02 +02:00
Gabriele Gristina
2485c1fcb5 Module 33700: limit data len to 32 bytes, based on the extraction tool 2025-06-10 00:35:35 +02:00
Gabriele Gristina
86c8323ae2 Added hash-mode: Microsoft Online Account (PBKDF2-HMAC-SHA256 + AES256) 2025-06-08 21:39:29 +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
Gabriele Gristina
23ab78f333 fix salsa_r() for Apple Metal 2025-06-07 02:29:44 +02:00
Jens Steube
c231b2ec5c Refactored salsa_r() core code in all SCRYPT kernels
Fantastic results on AMD GPUs via HIP
Small improvements on NV GPUs as well
2025-06-06 21:49: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
Jens Steube
73d817e74f The Assimilation Bridge (Python plugins -m 72000 and -m 73000) 2025-06-02 10:15:34 +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
a2a9941475 The Assimilation Bridge (Scrypt-Jane GPU-CPU hybrid plugin -m 70100) 2025-05-31 12:24:44 +02:00
Jens Steube
dc50bdbc72 The Assimilation Bridge (Argon2id plugin -m 70000) 2025-05-30 11:21:40 +02:00
Jens Steube
bce5e1a332
Merge pull request #4188 from matrix/hc_decompress_rar_fp
Modules: Check UnpackSize to raise false positive with hc_decompress_rar
2025-05-27 19:45:49 +02:00
Jens Steube
3dca391770
Merge pull request #4182 from holly-o/blake2s_hmac
Add plugin for HMAC-BLAKE2s
2025-05-26 20:17:59 +02:00
Jens Steube
40365a32d0
Merge pull request #4195 from matrix/issue_4175
Improve ASN.1 check for RSA/DSA/EC/OpenSSH Private Keys modules (22911, 22921, 22931, 22941, 22951)
2025-05-24 16:29:26 +02:00
Jens Steube
a27fc23a14
Merge pull request #4110 from matrix/fix_AppleSilicon_swap64
Update PR #3735
2025-05-24 10:23:50 +02:00
Jens Steube
c9a4609c1f Rename -m 20713 to -m 20730 2025-05-22 07:38:19 +02:00
Jens Steube
1b279abf36
Merge pull request #4184 from vikerup/module_27013
add module 20713 - sha256(sha256(pass+salt))
2025-05-22 07:33:47 +02:00
Jens Steube
686c2ac078
Merge pull request #4199 from matrix/resurrect_PR_2561
Added hash-mode: BestCrypt v4 Volume Encryption
2025-05-19 13:57:14 +02:00
Jens Steube
6782d78898 Rename -m 4500x to -m 3350x 2025-05-18 21:07:44 +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
Jens Steube
bac6243533 Add sha256_hmac_init_global_utf16le_swap() for later use 2025-05-12 11:22:16 +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
holly-o
96cadf80c1 Removed local .DS_Store files 2025-04-28 08:29:56 +01:00
Gabriele Gristina
24fa627f2f Added hash-mode: BestCrypt v4 Volume Encryption 2025-04-27 20:57:43 +02:00
Gabriele Gristina
6a6dd103f6 fix asn1_check_int_tag build failure with Apple Metal 2025-04-25 19:28:14 +02:00
Gabriele Gristina
cc9ae09b94 Improve ASN.1 check for RSA/DSA/EC/OpenSSH Private Keys modules (22911, 22921, 22931, 22941, 22951) 2025-04-25 19:13:33 +02:00
Gabriele Gristina
fb892e01a8 add workaround for false positives on 22931 2025-04-25 18:02:18 +02:00
Gabriele Gristina
21a471139a avoid processing crc32 if the unpacked size is not the expected 2025-04-24 11:16:54 +02:00
Andreas Vikerup
3268b58e24 add module 20713 - sha256(sha256(pass+salt)) 2025-04-15 16:25:53 +02:00
holly-o
d2e9eacca8
Added OpenCL files for plugin 67890 2025-04-11 16:11:20 +01:00
Gabriele Gristina
db814b5837 Update PR #3735 2024-10-31 18:29:23 +01:00
jsteube
6716447dfc Add support for zero-length salts in Electrum $4 and $5 2024-04-20 17:35:45 +00:00
fse-a
47509b2954 Improve performance of scrypt-based algorithms by code reordering. 2024-02-15 15:17:29 +01:00
jsteube
9d1bbd8472 Add support for hash comparison checks to allow slight inaccuracies if so selected in the kernel 2023-11-23 15:19:02 +00:00
jsteube
f8bd133373 Add new function count_bits_32() in inc_common.cl 2023-11-22 03:36:28 +00:00
0x588
a196cfe01c Update inc_hash_base58.cl
Fix the logic error in the loop
2023-11-08 17:08:58 +08:00
jsteube
79d73a7cf8 Fix CRLF in OpenCL/inc_cipher_cast.cl 2023-09-24 20:25:55 +00:00
PenguinKeeper7
4ea43742b9 Update inc_common.cl 2023-09-18 13:13:17 +01:00
Jens Steube
2801527d81
Merge pull request #3873 from piru/master
Raise Flask Session Cookie (-m 29100) max data length to 120 chars.
2023-09-16 15:54:39 +02:00