hashcat Forum
How is keyspace calculated - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Deprecated; Previous versions (https://hashcat.net/forum/forum-29.html)
+--- Forum: Old oclHashcat Support (https://hashcat.net/forum/forum-38.html)
+--- Thread: How is keyspace calculated (/thread-3412.html)



How is keyspace calculated - BlowCane - 05-23-2014

As noted by atom in the release notes,

Code:
atom@sf:~/oclHashcat-1.20$ ./oclHashcat64.bin some.hash -a 3 ?d?d?d?d?d?d?d --keyspace
10000
atom@sf:~/oclHashcat-1.20$ ./oclHashcat64.bin some.hash -a 3 ?d?d?d?d?d?d --keyspace
10000

These different masks return the same keyspace.

As I understand it, the keyspace for the first should be 10^7, and the keyspace for the second should be 10^6.

The same would hold for the following:
Code:
box@server:~/oclHashcat-1.20$ ./oclHashcat64.bin -a 3 ?a?a?a?a?a?a?a?a --keyspace
7737809375

I would expect that the actual keyspace is 96^8.
(Assuming I didn't make a mistake in counting the characters in ?a)
However, 96^8 is 7213895789838336.

Can someone help me understand what is actually being calculated with the --keyspace flag?


RE: How is keyspace calculated - epixoip - 05-24-2014

for -a 3, --keyspace is not the full keyspace of the attack as you might expect, but rather the keyspace of the base loop excluding the modifier. it's pretty complicated, that's why atom recommends you just use --keyspace to calculate it.

i'm trying to convince him to write a standalone 'keyspace' program for hashcat-utils though so that keyspace calculation does not rely on oclHashcat.