bruteforce-luks icon indicating copy to clipboard operation
bruteforce-luks copied to clipboard

Increasing amount of threads actually slows down the cracking process

Open mrDoctorWho opened this issue 3 years ago • 2 comments

Hello,

I'm trying to find a password for my dump of the LUKS2 header from a device. The header and dictionary are located in tmpfs.

Here is how I run the cracker:

$ bruteforce-luks -t 4 -f dict.dict -v 30 sda3-dump

And here is the speed of cracking compared having the different amount of threads.

Threads Passwords/sec
1 0.933333
2 1.400000
3 1.500000
4 1.466667
10 1.379310
24 0.800000

As you can see, when the thread amount gets higher than 3 the program starts to slow down.

I'm running the tool on Ubuntu 20.04, on a 12-core AMD Ryzen 5900X with 32 GB of RAM.

mrDoctorWho avatar May 09 '22 09:05 mrDoctorWho

This is probably caused by some lock contention in the read_dictionary_line or generate_next_password functions.

The program could be improved by generating/reading the next passwords to try in a dedicated thread...

glv2 avatar May 10 '22 13:05 glv2