Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 26 Jan 2013 16:24:23 -0500
From: Brian Wallace <nightstrike9809@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Proposed optimizations to pwsafe

For this, I used a search and replace for the code I wrote for the CPU
version, then did some manual optimization(as you can see I did leave room
for improvement).  The CPU version I copied from a tool I wrote called
Safe-Cracker, which I did manually unroll the code.

I didn't even notice w was 64 uints long, I guess I assumed it was 16.  I
left the H and K tables in to maintain some readability but they can be
removed.

On Sat, Jan 26, 2013 at 4:12 PM, Lukas Odzioba <lukas.odzioba@...il.com>wrote:

> 2013/1/26 Brian Wallace <nightstrike9809@...il.com>:
> > I have some working improvements to pwsafe-cuda.  I don't have the most
> > powerful GPU, but the improvement so far is as follows:
> >
> > Original:
> > Benchmarking: Password Safe SHA-256 [CUDA]... DONE
> > Raw:    51801 c/s real, 51801 c/s virtual
> >
> > New:
> > Benchmarking: Password Safe SHA-256 [CUDA]... DONE
> > Raw:    70593 c/s real, 70593 c/s virtual
>
> Thank you very much for working on that! I saw your code and that was
> exactly what we needed.
> I do have some comments:
> 1) for me code would be cleaner if we use 1 proper #define doing that:
>
> w[12] = sigma1( w[10] ) + w[5];
> +  d += Sigma1( a ) + Ch( a, b, c ) + 0xc6e00bf3 + ( (w[12]) );
> +  h += d;
> +  d += Sigma0( e ) + Maj( e, f, g );
>
> But at this point it is easier to see some improve obvious
> optimizations like: sigma0(const);
>
> 2) w[64]  should become w[16] sooner or later for now it is not
> critical, it would be good to get rid of H, and k tables too.
> 3) I guess that is true quite rare:
>  if(h + H[7] == v[7]){ ... }
> and if it is true we could do all of the rest the computations without
> following if statements.
>
> I am just curious, you wrote a tool for unrolling or did all this by hand?
>
> Lukas
>

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.