10-19-2022, 09:19 AM
I'm trying to brute-force an encryption algorithm for some game. It takes a passphrase, hashes it with PBKDF2-HMAC-SHA1 (mode 12000), and then uses that as a key for encryption. This hash is pretty slow though, with my own Rust implementation on the CPU only it got about 11kH/s.
That's where I wanted to use hashcat, as it can use the GPU to generate hashes way faster. Running a benchmark with
it got around 2300kH/s, over 200x faster. The only problem is that I can't directly use hashcat to compare against some known hash, I have to first run the encryption algorithm using that guess of the key to see if the message decrypts. This decrypting is really fast though, the hash is really the bottleneck.
One thing that would solve my problem is if hashcat had a way to output every single hash is generates, basically just hashing all the words you give it and putting them in a file. Then I would be able to use this file full of hashes for the next encryption step which is way faster.
I could not find any way to output these hashes, but it should be as simple as making hashcat match everything, so it thinks everything is a correct hash so it outputs it. I thought there might be some
kind of function I could make, but I'm not a C programmer by any means and couldn't find anything in the source like it.
If anyone has any idea's that would be great, if not, that's fine too. It's just a bit of practice for a random game after all. Thanks.
That's where I wanted to use hashcat, as it can use the GPU to generate hashes way faster. Running a benchmark with
Code:
hashcat -b -m 12000
it got around 2300kH/s, over 200x faster. The only problem is that I can't directly use hashcat to compare against some known hash, I have to first run the encryption algorithm using that guess of the key to see if the message decrypts. This decrypting is really fast though, the hash is really the bottleneck.
One thing that would solve my problem is if hashcat had a way to output every single hash is generates, basically just hashing all the words you give it and putting them in a file. Then I would be able to use this file full of hashes for the next encryption step which is way faster.
I could not find any way to output these hashes, but it should be as simple as making hashcat match everything, so it thinks everything is a correct hash so it outputs it. I thought there might be some
Code:
bool compare() { return true; }
kind of function I could make, but I'm not a C programmer by any means and couldn't find anything in the source like it.
If anyone has any idea's that would be great, if not, that's fine too. It's just a bit of practice for a random game after all. Thanks.