Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150309220534.GA6266@openwall.com>
Date: Tue, 10 Mar 2015 01:05:34 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: john-devkit and sha512

On Mon, Mar 09, 2015 at 11:49:12PM +0300, Aleksey Cherepanov wrote:
> I am happy to introduce my code generator for john.
> https://github.com/AlekseyCherepanov/john-devkit

Thank you!

> At the moment, it may produce raw-sha512 that works a bit faster. The
> produced code:
> https://gist.github.com/AlekseyCherepanov/75b6621d3e5abb0c19d6
> 
> I compare peak speeds of several 5s tests:
> the generated code
> Raw:	2237K c/s real, 2237K c/s virtual
> original Raw-SHA512
> Raw:	2180K c/s real, 2180K c/s virtual

I am seeing slight slowdown with the generated code:

[solar@...er src]$ OMP_NUM_THREADS=1 ../run/john -te -form=raw-sha512
Warning: OpenMP is disabled; a non-OpenMP build may be faster
Benchmarking: Raw-SHA512 [SHA512 128/128 SSE4.1 2x]... DONE
Raw:    3532K c/s real, 3568K c/s virtual

[solar@...er src]$ OMP_NUM_THREADS=1 ../run/john -te -form=raw-sha512-my
Warning: OpenMP is disabled; a non-OpenMP build may be faster
Benchmarking: Raw-SHA512-my [SHA512 128/128 SSE4.1 (2 * 1)x]... DONE
Raw:    3491K c/s real, 3527K c/s virtual

[solar@...er src]$ ../run/john -te -form=raw-sha512
Will run 32 OpenMP threads
Benchmarking: Raw-SHA512 [SHA512 128/128 SSE4.1 2x]... (32xOMP) DONE
Raw:    20316K c/s real, 635475 c/s virtual

[solar@...er src]$ ../run/john -te -form=raw-sha512-my
Will run 32 OpenMP threads
Benchmarking: Raw-SHA512-my [SHA512 128/128 SSE4.1 (2 * 1)x]... (32xOMP) DONE
Raw:    19922K c/s real, 623761 c/s virtual

I ran all of these tests a few times - the results are similar to the
above, with -my being slightly slower.  A more important test would be
cumulative performance for --fork=32, though.  Clearly, this hash is too
fast to scale well with OpenMP.

BTW, even though I called the file raw-sha512-my_plug.c, and it got
built and linked into john, I had to manually add lines to fmt_externs.h
and fmt_registers.h to get the format registered.  Perhaps there's some
bug preventing this from happening automatically.

> I propose development of john-devkit as an idea for GSoC. The task is
> huge. So I'd like to hear suggestions on how to choose a part.
> 
> I see a chance to implement better support of sha-2 using john-devkit
> before the GSoC. Suggestions?

I see even better chance to implement interleaving for SHA-2 before GSoC
without making any use of john-devkit. ;-)

Alexander

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.