Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 29 Mar 2012 14:23:38 +0800
From: myrice <qqlddg@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: fast hashes on GPU

>

> Also, I see in bench.c file, the function benchmark_format takes one salt
> > and then executes crypt_all. This will make multiple candidate
> > passwords transferring
> > to GPU. My first step will implement XSHA512 and tested without modify
> > bench.c. Next I will make many salts with one bunch of candidate
> passwords
> > computing on GPU by modifying the bench.c for testing. I think this makes
> > sense.
>
> This sounds wrong to me.  You should not need to modify bench.c at all,
> not even for testing.  It already does both kinds of benchmarks - for
> "one salt" and for "many salts".


Well, I know there are "one salt" and "many salts". I still think we have
to copy same bunch of passwords to GPU with each salt. Look at the code in
bench.c(function benchmar_format):

226    index = salts;

227    max = format->params.max_keys_per_crypt;

228    do {

229        if (!--index) {

230            index = salts;

231            if (!(++current)->ciphertext)

232                current = format->params.tests;

233            bench_set_keys(format, current, cond);

234        }

235

236        if (salts > 1) format->methods.set_salt(two_salts[index & 1]);

237        format->methods.crypt_all(max);

238        format->methods.cmp_all(binary, max);

239

240        add32to64(&count, max);

241#if !OS_TIMER

242        sig_timer_emu_tick();

243#endif

244    } while (bench_running && !event_abort);

With index > 1, (salts >1, many salts). We execute line 236 to set a salt.
Then line 237, in crypt_all, we transfer all candidate passwords to GPU
with just one salt that 236 set. Actually, we transfer same bunch of
passwords by "salts"(index) time to GPU. However, I hope we could transfer
all salts with a bunch of passwords to GPU. After these are tested, we
switch to next bunch of passwords. This is what you previous said that we
compute one bunch of passwords with lots of salts and then move to next
bunch of passwords.

Content of type "text/html" skipped

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.