1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-18 06:08:16 +00:00
Commit Graph

50 Commits

Author SHA1 Message Date
Jens Steube
4934e92cda OpenCL Runtime: Workaround a problem of the AMD OpenCL GPU driver under macOS which results in false negatives due to changes in the kernel crypto library 2021-07-05 11:33:12 +02:00
Jens Steube
9bf0f36d0a Get rid of MAYBE_VOLATILE for context position by replacing it with zero length check 2021-05-09 11:43:32 +02:00
Jens Steube
9813811493 Remove truncation of buffer in hc_enc_next() to workaround AMD JiT compiler (legacy) issue 2021-05-08 16:38:48 +02:00
Jens Steube
0439f0c4a1 Refactor UTF8 to UTF16 conversion from fixed size to a dynamic size using a context struct. This allows handle buffer sizes of arbitrary length for conversion 2021-05-01 12:49:43 +02:00
Jens Steube
b7dffd9259 Improve performance for UTF8->UTF16 conversion
Reverted d343e2c4a0 and ee26805138
Adds a test to decide whatever conversion technique to use. If all UTF8 characters are 7 bit, there's no need for regular conversion and we can stick to naive conversion.
2021-04-30 16:55:30 +02:00
Jens Steube
ee26805138 In UTF8 to UTF16 conversion, reserve enough room to handle very long UTF8 inputs 2021-04-12 14:44:56 +02:00
Jens Steube
d343e2c4a0 Added support for true UTF8 to UTF16 conversion in kernel crypto library 2021-04-11 11:53:47 +02:00
Jens Steube
e00cae4c5c Update support for RSA/DSA/EC/OPENSSH Private Keys 2020-08-03 16:57:23 +02:00
Matt Palmer
2d83149a54 Module to decrypt PEM-encoded encrypted private keys (#74)
Supports a variety of common PKCS#1 ciphers, with fast kernels in all
available colours, shapes, and sizes.
2020-05-19 23:58:09 +10:00
Matt Palmer
f2c69ecfe5 Add md5_update_vector_from_scalar
This is similar in concept to *_init_v_f_s, except that all
contexts in the vector are updated from the same scalar
array of data.
2020-05-19 23:52:16 +10:00
Jens Steube
4c85c0e54f Revert a671d501aa 2019-12-23 15:00:15 +01:00
Jens Steube
89119bf24a Add missing inc_platform.h include 2019-04-26 13:59:43 +02:00
Jens Steube
38c1029f2e Need volatile for IRIS GPU on Mac OSX for -m 2500 and -m 2501 2019-04-17 13:21:35 +02:00
jsteube
74e3ede391 Test optimization for kernel include in pure mode 2019-04-15 18:11:15 +02:00
jsteube
a671d501aa Optimize some xxx_hmac_init functions 2019-04-14 17:03:37 +02:00
jsteube
c34f75fe2d Optimize some xxx_hmac_final functions 2019-04-14 15:59:03 +02:00
jsteube
66d94b06e4 Get rid of src/rp_kernel_on_cpu.c and src/rp_kernel_on_cpu_optimized.c and use OpenCL emulated kernel version 2019-03-25 12:24:04 +01:00
jsteube
e80b1838e8 Rename some functions in inc_common.cl to avoid conflicts with bitops.c 2019-03-23 22:15:38 +01:00
jsteube
adeeaee84a Replace __kernel, __constant, __global and __local qualifiers with macro for better control 2019-03-22 22:27:58 +01:00
jsteube
7d4bea41a0 Get rid of OpenCL/inc_hash_constants.h and OpenCL/inc_hash_functions.cl 2019-03-21 23:00:38 +01:00
jsteube
84d6b8ecc1 Add function prototypes in OpenCL kernels to make some compilers happy 2019-03-09 09:05:44 +01:00
jsteube
dc9279c95c New Strategy: Instead of using volatile, mark the mode as unstable. Remove all volatiles 2019-03-03 19:18:56 +01:00
jsteube
dad05d9f69 Testing: Workaround some AMD OpenCL runtime segmentation faults 2018-08-09 13:03:22 +02:00
Jens Steube
02a2495349 Switched array pointer types in function declarations in order to be compatible with OpenCL 2.0 2018-07-22 11:47:42 +02:00
Jens Steube
a15c165773 Revert the pos == 0 change due to some unexpected results on nvidia 2018-02-16 11:38:08 +01:00
jsteube
b626e7f61b Optimize update functions in inc_hash_* helper files by testing for pos == 0 2018-02-14 17:31:41 +01:00
jsteube
5951207365 Get rid of some old volatiles 2018-02-09 19:18:30 +01:00
jsteube
3e08750900 OpenCL Kernels: Add general function declaration keyword (static inline) 2018-02-06 19:12:24 +01:00
jsteube
503f676cb0 Remove static keywords from OpenCL functions, they can cause old NV JiT compiler to fail 2017-10-20 13:23:43 +02:00
jsteube
51dd982b12 Bring back some volatile for AMD 2017-09-08 14:08:21 +02:00
jsteube
9125062ffc Move volatiles for AMD closer to the problem 2017-09-08 13:32:19 +02:00
jsteube
40b57677cd OpenCL Kernels: Reactivate Dalibors XOR optimization on MD5_H on all MD5 based algorithms 2017-08-30 15:32:09 +02:00
jsteube
938c281ee0 Resurrect some volatile variables in order to correctly compile pure kernels on AMD drivers 2017-08-25 17:06:07 +02:00
jsteube
967e96728d Make all the OpenCL kernel function includes static 2017-08-16 20:27:17 +02:00
jsteube
5e34ec348e Optimize kernels for ROCm 1.6
- Remove inline keywords
- Remove volatile keywords where it causes ROCm to slow down
- Replace DES functions (looks like bitselect somehow is no longer mapped to BFI_INT)
2017-07-22 18:05:18 +02:00
jsteube
eae9329761 Workaround some AMD JiT compiler segfault on complex kernels 2017-07-19 13:34:36 +02:00
jsteube
7205f450dd Backport more HMAC functions in inc_hash_xxx.cl from global to private 2017-07-14 16:58:30 +02:00
jsteube
c4098e2230 Fix invalid use of a non-vector function from within a vector function 2017-07-14 14:16:48 +02:00
jsteube
4e0972ce3a Add xxx_update_vector_swap(), xxx_update_vector_utf16le_swap() and xxx_update_vector_utf16beN() for later use 2017-07-14 13:24:40 +02:00
jsteube
9c6c21490f Add *_hmac_init_swap for later use 2017-07-13 19:22:31 +02:00
jsteube
9c12459852 Add HMAC vector functions to inc_hash_* 2017-07-13 12:18:17 +02:00
jsteube
c512e0c01a Add example -L kernel for algorithms with appended salt in utf16le 2017-07-13 00:16:29 +02:00
jsteube
9b6c6df53d Add xxx_nit_vector_from_scalar() to all inc_hash_xxx.cl includes 2017-07-12 15:45:22 +02:00
jsteube
8a6e3a5275 Add support in HMAC for passwords larger than block size of the underlaying hash 2017-07-10 11:15:15 +02:00
jsteube
f619811b70 Remove PBKDF2-HMAC-MD5 includes password length limit 2017-07-09 23:53:53 +02:00
philsmd
03f4e2b3dc minor typo fixed in comment for the new update() functions 2017-07-05 12:16:37 +02:00
Jens Steube
56dc8ae359 Add two functions md5_update_global_utf16le_swap() and md5_update_global_swap() for later use 2017-07-01 15:06:17 +02:00
jsteube
165380c454 Simplify WPA/WPA2 cracking kernel 2017-07-01 14:41:53 +02:00
jsteube
120cf1d1ba Removed some unused functions, added -m 500 kernel with length 256 support but not activated because too slow 2017-06-23 09:24:50 +02:00
jsteube
71d4926afa Converted -m 400 to password length 256 support
Something weird happend here, read on!

I've expected some performance drop because this algorithm is using the password data itself inside the iteration loop.
That is different to PBKDF2, which I've converted in mode 2100 before and which did not show any performance as expected.

So after I've finished converting this kernel and testing everything works using the unit test, I did some benchmarks to see how much the
performance drop is.

On my 750ti, the speed dropped (minimal) from 981kH/s -> 948kH/s, that's mostly because of the SIMD support i had to drop.
If I'd turn off the SIMD support in the original, the drop would be even less, that us 967kH/s -> 948kH/s which is a bit of a more reasable
comparison in case we just want to rate the drop that is actually caused by the code change itself.

The drop was acceptable for me, so I've decided to check on my GTX1080.Now the weird thing: The performance increased from 6619kH/s to
7134kH/s!!

When I gave it a second thought, it turned out that:

1. The GTX1080 is a scalar GPU so it wont suffer from the drop of the SIMD code as the 750ti did
2. There's a change in how the global data (password) is read into the registers, it reads only that amount of data it actually needs by using
the pw_len information
3. I've added a barrier for CLK_GLOBAL_MEM_FENCE as it turned out to increase the performance in the 750ti

Note that this kernel is now branched into password length < 40 and larger.

There's a large drop on performance where SIMD is really important, for example CPU.

We could workaround this issue by sticking to SIMD inside the length < 40 branch, but I don't know yet how this can be done efficiently.
2017-06-22 13:49:15 +02:00