Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 17 Dec 2010 09:03:51 +0300
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: OpenMP patch/DES SSE key setup patch

Tim,

On Thu, Dec 16, 2010 at 01:36:21PM -0600, Tim Yardley wrote:
> I decided to play around with the new DES/OpenMP patch on x86 (32bit)
> architectures with SSE2.  A simple CFLAGS change of adding -msse2 will
> get it to pass your compile checks.  After that though, the code fails
> to actually run correctly.

Thank you for trying this and for reporting the problem!

> a john -test outputs the following:
> 
> Benchmarking: Traditional DES [128/128 BS SSE2]... FAILED (get_hash[0](0))
> Benchmarking: BSDI DES (x725) [128/128 BS SSE2]... FAILED (get_hash[0](0))

Does bcrypt (OpenBSD Blowfish) work fine in that build?  Do you see the
speedup from its parallelization?

> I'd attempt to debug what is going on, but I doubt I'd get much
> success.  So instead, I'll just report that it does not work for build
> linux-x86-sse2, on gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5).
> 
> It would be nice if you could get it working on non-64bit machines, as
> that would be handy for some of my work.  I realize that it probably
> isn't a priority though.

You're right about all of the above.  I'll try to get to it on a
suitable occasion.

The performance will be relatively poor, though.  32-bit x86 is register
starved as it is, so thread-safe code incurs more of a performance hit
on 32-bit x86 than it does on x86-64.  Additionally, I did not bother
implementing thread-safe assembly code, so you're switching to SSE2
intrinsics in the C source when you enable OpenMP.  On x86-64 this is
fine (with modern compilers), but on 32-bit x86 it is likely a
performance hit (since it is still too hard for some modern compilers to
generate near-optimal code when there are only 8 registers).

Thanks,

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.