Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sun, 20 May 2012 18:46:24 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: Blowfish OpenCL

Hi Sayantan,

On Sun, May 20, 2012 at 07:48:58PM +0530, SAYANTAN DATTA wrote:
> Can you please explain these #define in bf_std.h / bf_std.c
> 
> 1. BF_mt
> 2. BF_cpt

These two are for OpenMP-enabled builds.  BF_mt is the maximum thread
slot count.  BF_cpt is "crypts per thread"; it increases the amount of
work every thread does before the threads are forced to sync.

> 3. BF_X2

BF_X2 = 1 enables the computation of two hashes at once with mixed
instructions, thereby increasing the instruction-level parallelism.
At high level, it is similar to but independent from BF_cpt, and it may
be set in non-OpenMP builds as well.  For example, when BF_X2 is enabled
and BF_cpt is 3 and OpenMP is enabled (BF_mt > 1), a total of 6 hashes
are computed per thread before the threads are sync'ed.

For your OpenCL work, you may start by modifying this simplified
implementation:

john-1.7.8-fpga-hooks.diff.gz available near the bottom of this wiki page:

http://openwall.info/wiki/john/FPGA#VII-JtR-integration

I originally prepared it for interfacing to an FPGA implementation of
Eksblowfish (multiple Eksblowfish cores in an FPGA chip), but it should
work equally well for OpenCL (multiple instances of Eksblowfish computed
by an OpenCL kernel).

If you're curious, some further FPGA implementation stuff is here:

http://openwall.info/wiki/crypt-dev/files

The john-1.7.8-fpga-hooks.diff.gz patch removes BF_X2 and unties BF_N
from the BF_cpt and BF_mt settings, which it also removes.  However, it
keeps BF_N, because you'll need it to compute multiple instances of
Eksblowfish in parallel.

If you use this, we'll need to port it to 1.7.9's revision of the code
at some point, but that's easy.

Thanks,

Alexander

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.