Date: Thu, 4 Jul 2013 20:46:52 +1000 From: Michael Samuel <mik@...net.net> To: john-dev@...ts.openwall.com Subject: Re: OpenCL PBKDFv2 Kernel With Python Hi Marcus, On 4 July 2013 20:34, marcus.desto <marcus.desto@...pl> wrote: > __kernel void pbkdf2_init(__global const pbkdf2_password *inbuffer, > __constant pbkdf2_salt *salt, > __global pbkdf2_state *state) > > Does anyone of you has any idea, how I can access inbuffer of type pbkdf2_password from pyopencl? If you have a look in opencl_pbkdf2_hmac_sha1.h you'll see the 3 structs. You'll probably need to do struct.pack() to create one of each of those structures. So for example, I'd construct it with something like this: password_host_buffer = "".join([ struct.pack("=I65s", len(plaintext), plaintext) for plaintext in plaintexts ]) password_dev_buffer = cl.Buffer(ctx, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=password_host_buffer) Regards, Michael
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.