https://bugzilla.wikimedia.org/show_bug.cgi?id=28419

Aryeh Gregor <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |om

--- Comment #7 from Aryeh Gregor <[email protected]> 2011-04-28 
14:09:33 UTC ---
I wound up doing a project on GPU cracking of hashes for a university course,
using OpenCL.  My code and results are here:

http://aryeh.name/gitweb.cgi?p=hpc-final;a=tree

The proposal and writeup of results are here:

http://aryeh.name/gitweb.cgi?p=hpc-final;a=blob_plain;f=proposal.pdf;hb=HEAD
http://aryeh.name/gitweb.cgi?p=hpc-final;a=blob_plain;f=writeup.pdf;hb=HEAD

Among other things, I found that a PBKDF-style iteration scheme was about six
times slower in PHP than in C, not orders of magnitude.  With 32k iterations of
SHA1, PHP took around 50-100 ms, while C (using OpenSSL's SHA1 implementation)
took around 8 ms, or about 120 passwords/second.  On a GPU, I got about 10,000
passwords a second.  (With straight uniterated SHA1, I got 1.8 million
passwords/second on a CPU, and 220 million on a GPU.  I didn't salt, but
salting would make no difference to the performance, since it only affects
initialization.)

The str_repeat() idea sounds like it could make the PHP code closer to the C
code.  Did you time it?  Just make sure the hash function you're using can't be
easily optimized for the case where the same string is repeated many times,
particularly in the case where the string happens to align on block boundaries.
 If you could reuse any computations, it would obviously defeat the point.

I thought about this when working on my project.  I had to write an OpenCL
implementation of SHA1, so I'm somewhat familiar with how it works, and I don't
see an obvious way to speed it up based on repetition in the input.  But I
haven't looked at Whirlpool.  Unfortunately, hashes are usually not designed
with slowness in mind.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to