Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 4 Jul 2013 14:46:55 +1000
From: Michael Samuel <mik@...net.net>
To: john-dev@...ts.openwall.com
Subject: Re: OpenCL PBKDFv2 Kernel With Python

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

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ