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 <>
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
- 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

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

Hope that helps,

Powered by blists - more mailing lists

Your e-mail address:

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