I want to measure the performance (speed) of the Hashcat module
#1
Wink 
I want to measure the performance (speed) of the Hashcat module
In addition to comparing hash values in the Hashcat module, I am curious about the time it takes to run the pure module once.
Can you tell me how to do it?
Reply
#2
The -b flag gives you a benchmark speed you can go off. For example: hashcat -m 0 -b. Using -w will turn off the default to the optimised kernels, so you can do "hashcat -m 0 -b -w 4" for pure and "hashcat -m 0 -b -w 4 -O" for optimised
Reply
#3
(05-13-2024, 11:37 AM)penguinkeeper Wrote: The -b flag gives you a benchmark speed you can go off. For example: hashcat -m 0 -b. Using -w will turn off the default to the optimised kernels, so you can do "hashcat -m 0 -b -w 4" for pure and "hashcat -m 0 -b -w 4 -O" for optimised

What I mean is, I want to measure how long it takes to run the algorithm once
I understand that Hashcat's speed measurement involves generating a hash and comparing it to the value to be decrypted
What I want to know is how long it takes to generate one hash, excluding comparisons
Am I doing something wrong? Please tell me if I'm wrong
If what I'm thinking is correct, I'll have to write my own code to measure the time, but it seems like the run_kernel function in hashcat's backend.c actually calls the module's cl code
If you write code that measures the time and print the output, and then run the mode, you can measure the time it takes to generate the hash, right?

Is there another way?
Reply
#4
Most hashes are generated so quickly that measuring the time to generate one would be very inaccurate, hence why we usually measure per second, like with the -b benchmark option. if you really want to, you can just divide 1 by the hashrate, so if you had 5000H/s, the time to generate one would be 1/5000, which is 0.0002 seconds per hash
Reply