Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 24 May 2015 06:14:21 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: interleaving in SHA256 & SHA512

On Sat, May 23, 2015 at 10:55:38AM +0800, Lei Zhang wrote:
> I managed to add interleaving to SHA256 & SHA512, but the work is incomplete yet. When the interleaving factor is set other than 1, SHA256 works with a few formats, and SHA512 only works with sapH currently. Below are some statistics obtained from experimenting various interleaving factors:

Thanks!

> It seems interleaving doesn't help much here.

Yes, but please don't give up so soon.  Here's a test to perform:
compare the speeds with and without interleaving (and with different
factors) when running just one thread (OMP_NUM_THREADS=1 or/and a
non-OpenMP build).  Obviously, all of them will be low in absolute
terms, and all will use this one core suboptimally (since running fewer
than max threads on it), but we need to know whether interleaving
achieves relative speedup in that test or not.  It should, even if it
does not achieve a speedup when running multiple threads per core.
Whether a relative speedup is seen in this test or not may affect our
next steps.

BTW, there are some modern CPUs that are only capable of 1 hardware
thread per core - such as some lower-priced versions of Intel CPUs.
So speedup for that scenario may be relevant for better performance on
those CPUs, as long as it does not hurt performance on CPUs capable of
2 threads/core.  (We can't easily choose the interleave factor based on
runtime CPU detection currently.)

Alexander

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ