Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 20 Aug 2015 05:14:51 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: PHC: Argon2 on GPU

On Tue, Aug 18, 2015 at 01:35:47AM +0200, Agnieszka Bielec wrote:
> argon2i
> CPU on well - 2480
> GeForce GTX 960M - 1861
> AMD Tahiti - 1288
> GeForce GTX TITAN - 2805
[...]
> [a@...er run]$ GWS=2048 ./john --test --format=argon2i-opencl --v=4 --dev=5
> Benchmarking: argon2i-opencl [Blake2 OpenCL]...
> memory per hash : 1.50 MB
> Device 5: GeForce GTX TITAN
> Options used: -I ./kernels -cl-mad-enable -cl-nv-verbose -D__GPU__
> -DDEVICE_INFO=65554 -DDEV_VER_MAJOR=352 -DDEV_VER_MINOR=21
> -D_OPENCL_COMPILER -DBINARY_SIZE=256 -DSALT_SIZE=64
> -DPLAINTEXT_LENGTH=125
> Local worksize (LWS) 64, global worksize (GWS) 2048
> using different password for benchmarking
> DONE
> Speed for cost 1 (t) of 3, cost 2 (m) of 1536, cost 3 (l) of 1
> Many salts:     2805 c/s real, 2805 c/s virtual
> Only one salt:  2805 c/s real, 2824 c/s virtual

You can do a lot better here (no code changes, just higher GWS):

[solar@...er run]$ GWS=3584 ./john --test --format=argon2i-opencl --v=4 --dev=5
Benchmarking: argon2i-opencl [Blake2 OpenCL]...
memory per hash : 1.50 MB
Device 5: GeForce GTX TITAN
Options used: -I ./kernels -cl-mad-enable -cl-nv-verbose -D__GPU__ -DDEVICE_INFO=65554 -DDEV_VER_MAJOR=352 -DDEV_VER_MINOR=21 -D_OPENCL_COMPILER -DBINARY_SIZE=2
56 -DSALT_SIZE=64 -DPLAINTEXT_LENGTH=125
Local worksize (LWS) 64, global worksize (GWS) 3584
using different password for benchmarking
DONE
Speed for cost 1 (t) of 3, cost 2 (m) of 1536, cost 3 (l) of 1
Many salts:     4318 c/s real, 4292 c/s virtual
Only one salt:  4292 c/s real, 4292 c/s virtual

[solar@...er run]$ GWS=3584 ./john --test=10 --format=argon2i-opencl --v=4 --dev=5
Benchmarking: argon2i-opencl [Blake2 OpenCL]...
memory per hash : 1.50 MB
Device 5: GeForce GTX TITAN
Options used: -I ./kernels -cl-mad-enable -cl-nv-verbose -D__GPU__ -DDEVICE_INFO=65554 -DDEV_VER_MAJOR=352 -DDEV_VER_MINOR=21 -D_OPENCL_COMPILER -DBINARY_SIZE=256 -DSALT_SIZE=64 -DPLAINTEXT_LENGTH=125
Local worksize (LWS) 64, global worksize (GWS) 3584
using different password for benchmarking
DONE, GPU util:99%
Speed for cost 1 (t) of 3, cost 2 (m) of 1536, cost 3 (l) of 1
Many salts:     4287 c/s real, 6023 c/s virtual
Only one salt:  4283 c/s real, 7891 c/s virtual

BTW, this uses the card's 6 GB almost fully.

I haven't tried tuning for Tahiti yet, and this may be premature given
that you have lots of optimizations yet to make.  But I suspect it, too,
can benefit from adjusted LWS and GWS.

Alexander

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ