Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 04 Jul 2013 08:23:08 +0200
From: marcus.desto <marcus.desto@...pl>
To: john-dev@...ts.openwall.com
Subject: Re: OpenCL PBKDFv2 Kernel With Python

Hello Michael,
 
thank you for reply.
Dnia 4 lipca 2013 6:46 Michael Samuel &lt;mik@...net.net&gt; napisał(a):
Hi Marcus,
You probably don't want the OpenCL unless you're doing many at once -
for a single password you'd be better off using a plain C version and
using Cython to create a python module.
For some example pyOpenCL code, look at
https://github.com/therealmik/otpbreak/blob/master/create_otp_blocks.py
- the basic concept is that you create a numpy.array with the correct
dtype (numpy.uint32 = OpenCL uint, numpy.int32 = OpenCL int), then
allocate a cl.Buffer(... hostbuf=myarray) which will copy it to the
GPU.
Of course, OpenCL has massive compile and launch overhead, so if
you're doing this for anything other than cracking passwords, you
probably want to go down the Cython path. Check out
http://docs.cython.org/src/userguide/external_C_code.html
Hope that helps,
 Michael
In the begining, I just want to simply use OpenCL. I know about the big overhead. You can even see it's effect in the output timings (my first mail). In fact, as you said, it does not make any sense for a single (big) operation, but in case it can be computed by dividing it into few jobs, it does make sense. Anyway, later, when my program runs using OpenCL I want to expand my implementation to encrypt a lot of passwords at the same time - that is why I am about to use OpenCL. Maybe later I will switch to C or C++ and opencl, but first I would like to create a running first version of my program.
 
Accourding to the python implementation (pyOpenCL), well, thank you for the examples. I actually stack to the steps given by A. Gloeckner in his documentation of pyopencl.
But after I ran the pbkdf2 opencl kernel I found in JtR using pyopencl I was not sure about being wrong in my python implementation, so I started to tryout the casts to convert data from python to the correct one needed in opencl. So, you confirmed that I was not wrong in the very first approaches. It seems like there is something wrong about the pbkdf2 opencl kernel, which is not generic, but tailored to mscash2. That might be the problem resulting different hashes.
 
Regards,
Marcus
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.