Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 7 Jan 2013 9:48:27 -0500
From:  <jfoug@....net>
To: john-dev@...ts.openwall.com
Subject: mask-mode speed

Here are some timings with mask-mode. Note, I made a couple of small tweaks to the mask code, so that the right most mask (the one in the outermost of the loop) now does not walk through some of the array accesses, but has specific variables. It sped things up a little.

The timings I did, were for 1 hash, of crc32 type.

Here is -test for crc on this system.

$ ../run/john -test=5 -form=crc32
Benchmarking: CRC-32 [32/32]... DONE
Many salts:     52329K c/s real, 52662K c/s virtual
Only one salt:  25396K c/s real, 25566K c/s virtual

The test to look at is the 1 salt (25.4M)  NOTE, this benches 6, 5, 9 and 7 byte crc32's.  The format speed is based on the number of characters.  All tests below were for 10 character numbers, so there IS expected slowdown, probably in the 5 to 10% range, due to longer passwords.

Here is a speed test for 10 digit incremental (rebuilt JtR to do 10 digits).  This has min and max length set to 10.  This one runs 4.9M slower than the bench.  That is about 20% slower than bench.

$ ../run/john -inc:digits10 -form=crc32 in
Loaded 1 password hash (CRC-32 [32/32])
guesses: 0  time: 0:00:08:08 DONE (Sun Jan  6 21:41:19 2013)  c/s: 20491K  trying: 8777764219 - 8777777779

Here is a 10 digit mask.  It is running 1.8M slower than bench.  This is only about 7.5% slower than bench. The thing to notice, however, is this runs about 3x 'faster' than incremental mode (in the amount of net overhead)

$ ../run/john -mask='?d?d?d?d?d?d?d?d?d?d' -form=crc32 in
Loaded 1 password hash (CRC-32 [32/32])
guesses: 0  time: 0:00:07:24  c/s: 22522K  trying: 9999998976 - 9999999999

Here is an extern run. This extern (listed at the end of the post), is probably about as fast as it can be done externally.  This one is almost 12M slower than bench, getting only about 50% or so of the possible speed.  

$ ../run/john -extern:ten_digits -form=crc32 in
Loaded 1 password hash (CRC-32 [32/32])
guesses: 0  time: 0:00:13:26 DONE (Sun Jan  6 22:30:58 2013)  c/s: 12406K  trying: 9999998977 - 9999999999


Here is the extern:

[List.External:ten_digits]
int pos;

void init()
{
	pos=0;
	while(pos<10) { word[pos++] = '0'; }
	word[10] = 0;
}

void generate()
{
    pos = 9;
	++word[pos];
	while (word[pos] == ':') {
		word[pos] = '0';
		--pos;
		if (pos == -1) { word = 0; return; }
		++word[pos];
	}
}

void restore()
{
}

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.