Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 13 Mar 2012 18:55:57 +0100
From: magnum <>
Subject: Re: Enginering OpenCL formats

On 03/13/2012 11:03 AM, Samuele Giovanni Tonon wrote:
> i'm trying to move find_best_kpc to common-opencl, thanks to magnum
> advice it's a matter of dividing crypt_all in two parts

Great, my own experiments did not work well on GPU and I have little
time to investigate why.

> however i'm stuck on how to pass those two function
> and release_clobj and create_clobj, i really miss what is the best
> way to do that: create a struct with a pointer to those functions
> and pass that struct as argumento to find_best_kpc ?
> Any other solution ?

In my experiments I just called the global find_best_kpc from ssha's
init() like this:

    find_best_kpc(pFmt, &release_clobj, &create_clobj);

This passes the format struct with pointers to set_key etc, as well as
the function pointers to create/release_clobj()

The definition in common-opencl.c was like this:

    void find_best_kpc(struct fmt_main *pFmt,
                        void release_clobj(void),
                        void create_clobj(int kpc)) {

...but I was going to revisit the latter mess and clean it up with
external function declarations. Not that it matters, it works fine.


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.