Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 20 Sep 2012 11:21:00 -0700 (PDT)
From: deepika dutta <deepikadutta_19@...oo.com>
To: john-dev@...ts.openwall.com
Subject: Re: Bitsliced DES - SSE

hi, yaa i know that this task you can do easily and  better... but I just wanted to learn that is why I am doing it at my end too... you can do in your own way, no problem to me :)  Cheers,
Deepika


________________________________
 From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com; deepika dutta <deepikadutta_19@...oo.com> 
Sent: Thursday, September 20, 2012 10:30 AM
Subject: Re: [john-dev] Bitsliced DES - SSE
 
Hi Deepika,

On Tue, Sep 18, 2012 at 04:15:39AM -0700, deepika dutta wrote:
> Hi, I am looking into the SSE part of bitsliced des and working on adding the plain des encryption part in it. I am working with x86-sse.S. I got an idea of what is happening there but I have following doubt, please answer it so that i can proceed further... I would like to do this part as it will aid in my understanding also.

I hope you enjoy doing this.

I was/am planning to do it myself, and it'd be easy for me to do - so
there's no real need for you to get into it.  I just haven't approached
the larger task of processing your contributions yet.

> I had added a code in MSCHAP to fill plaintext in bitsliced form which was copied to DES_bs_all.B before starting encryption. (This code i have shifted now to DES-bs_b.c to make it available to any algorithm.) When using sse (linux-x86 build for 32/64 bit), the DES_bs_vector becomes a 2D array with 64 rows and 4 columns. Without sse the array was  1D each bit was put as 0 or -1 in array elements. Now for SSE, whether I should bitslice the plaintext in C function populating each column with same value or do it in assembly using 128 bit sse instructions? I know it would be easier to do in C but will it have any performance issues?? 

If this initialization of B occurs during password cracking for a given
format (that is, if it can't be done in init() just once, then
memcpy()'ed), then indeed you ought to be using the SIMD instructions.
However, you don't absolutely have to use them from the assembly file;
you may instead use the intrinsics from C.  The choice between assembly
vs. intrinsics should be the same for the entire bitslice DES thing (in
a given build), though.  Right now, JtR uses assembly when built without
OpenMP and without AVX (yet for an x86 CPU) and intrinsics otherwise
(when OpenMP or/and AVX is enabled, or when building for PPC/AltiVec).
So you should do the same.  This means having several implementations of
the B[] initialization: in .S files and in DES_bs_b.c.  The latter
should use the proper macros, so that the same source lines translate to
regular C assignments or to intrinsics.

I hope this helps.

Alexander
Content of type "text/html" skipped

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.