|
Message-ID: <55216DE8.8080203@mailbox.org> Date: Sun, 05 Apr 2015 19:16:24 +0200 From: Frank Dittrich <frank.dittrich@...lbox.org> To: john-dev@...ts.openwall.com Subject: Re: gpg and gpg-opencl benchmarks Alexander, On 04/05/2015 11:44 AM, Solar Designer wrote: > Frank, magnum - > > The speeds reported by our gpg and gpg-opencl benchmarks look too high > to me: > > [solar@...er run]$ export GOMP_CPU_AFFINITY=0-31 > [solar@...er run]$ ./john -te -form=gpg-opencl -dev=1 > Will run 32 OpenMP threads > Device 1: Tahiti [AMD Radeon HD 7900 Series] > Local worksize (LWS) 64, global worksize (GWS) 262144 > Benchmarking: gpg-opencl, OpenPGP / GnuPG Secret Key [SHA1 OpenCL]... (32xOMP)DONE > Speed for cost 1 (iteration count) of 65536, cost 2 (hash algorithm [1:MD5 2:SHA1 3:RIPEMD160 8:SHA256 9:SHA384 10:SHA512 11:SHA224]) of 2, cost 3 (cipher algorithm [1:IDEA 2:3DES 3:CAST5 4:Blowfish 7:AES128 8:AES192 9:AES256]) of 3 > Raw: 619237 c/s real, 46098 c/s virtual > > 619237*65536/10^9 = 40.6 billion SHA-1/second > > This is way too much for one GPU in a 7990. > > Is this really "for cost 1 (iteration count) of 65536"? And if it is, > why is it so fast? > > The --format=gpg exhibits the same problem, only with speeds lower > according to the CPU/GPU performance difference. (So it reports speeds > that look too high for the CPUs.) yes you are right, thanks for noticing. I just took my_salt->count and reported it as iteration count. But in gpg_fmt_plug.c we have 532: n = cur_salt->count / bs; 533- while (n-- > 0) { 534- SHA1_Update(&ctx, keybuf, bs); 535- } 536: SHA1_Update(&ctx, keybuf, cur_salt->count % bs); 537- SHA1_Final(key + (i * SHA_DIGEST_LENGTH), &ctx); 577: n = cur_salt->count / bs; 578- while (n-- > 0) { 579- SHA256_Update(&ctx, keybuf, bs); 580- } 581: SHA256_Update(&ctx, keybuf, cur_salt->count % bs); 582- SHA256_Final(key + (i * SHA256_DIGEST_LENGTH), &ctx); etc. This needs to be fixed. Right now I really am too tired. Frank
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.