Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 23 Feb 2011 02:22:54 +0300
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: bitslice DES on AVX

Hi,

Does anyone in here have a CPU with AVX already (Intel Sandy Bridge) in
a machine running 64-bit Linux?  If so, please try the attached patch
and report back in here.

For me, the patched tree builds cleanly with "make -j8 linux-x86-64-avx",
then correctly fails with:

Benchmarking: Traditional DES [256/256 BS AVX]... Illegal instruction

This is on a Core i7 920, which does not have AVX yet.  The system is
Owl 3.0 with a user-local build of gcc 4.5.0:

http://openwall.info/wiki/internal/gcc-local-build

The version of binutils is:

solar@owl:~/john/john-1.7.6-avx/src $ rpm -q binutils
binutils-2.20.51.0.11-owl3

If you get this to fail at runtime with other than "Illegal instruction",
please try swapping the "a" and "b" arguments to _mm256_blendv_ps().
I put them in arbitrary order without bothering to look at the
documentation and without checking this in any other way, so there's a
50% chance I got this wrong. ;-)  If this does not help, please try
changing DES_BS from 3 to 1.  In fact, please try this second change
either way - I am not entirely sure that 3 will produce faster code than
1, although I expect that it will (hence the default of 3).  Of course,
please document any such change in your e-mail reply.

Once we get this working, a further step will be to try mixed AVX+SSE2
builds and the like.

Thanks,

Alexander

P.S. It took me a whopping 40 minutes to come up with this patch and to
write this message.  The bitslice DES intrinsics "framework" introduced
in 1.7.6 is nice, making things like this trivial.

View attachment "john-1.7.6-avx-1.diff" of type "text/plain" (4186 bytes)

Powered by blists - more mailing lists

Your e-mail address:

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