Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151206145312.GA29142@openwall.com>
Date: Sun, 6 Dec 2015 17:53:12 +0300
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: hashcat CPU vs. JtR

On Sun, Dec 06, 2015 at 05:40:44PM +0300, Solar Designer wrote:
> [solar@...er hashcat-build]$ ./hashcat-cli64.bin -b -m 3200 
> Initializing hashcat v2.00 with 32 threads and 32mb segment-size...
> 
> Device...........: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
> Instruction set..: x86_64

Oh, I just realized I should have explicitly built for AVX.  I just did,
with "make posixAVX".  This produced hashcat-cliAVX.bin.  Somehow it's a
bit slower at bcrypt:

[solar@...er hashcat-build]$ ./hashcat-cliAVX.bin -b -m 3200 
Initializing hashcat v2.00 with 32 threads and 32mb segment-size...

Device...........: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
Instruction set..: AVX
Number of threads: 32

Hash type: bcrypt, Blowfish(OpenBSD)
Speed/sec: 16.46k words

but anyway these SIMD extensions (until we get faster gather loads) are
not (very) helpful for bcrypt (if at all).  JtR's 16k to 16.9k at bcrypt
on this machine is without SIMD.

> [solar@...er hashcat-build]$ ./hashcat-cli64.bin -b -m 8900
> Initializing hashcat v2.00 with 32 threads and 32mb segment-size...
> 
> Device...........: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
> Instruction set..: x86_64
> Number of threads: 32
> 
> Hash type: scrypt
> Speed/sec: 639 words

[solar@...er hashcat-build]$ ./hashcat-cliAVX.bin -b -m 8900
Initializing hashcat v2.00 with 32 threads and 32mb segment-size...

Device...........: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
Instruction set..: AVX
Number of threads: 32

Hash type: scrypt
Speed/sec: 839 words

This is much closer to JtR's speed (but still slightly slower):

> [solar@...er src]$ GOMP_CPU_AFFINITY=0-31 ../run/john -test -form=scrypt
> Will run 32 OpenMP threads
> Benchmarking: scrypt (16384, 8, 1) [Salsa20/8 128/128 AVX]... (32xOMP) DONE
> Speed for cost 1 (N) of 16384, cost 2 (r) of 8, cost 3 (p) of 1
> Raw:    878 c/s real, 27.6 c/s virtual
> 
> (BTW, I think this used to be ~960 c/s.  Looks like we got a performance
> regression we need to look into, or just get the latest yescrypt code in
> first and then see.)
> 
> hashcat is at 639/878 = 73% of JtR's speed at scrypt here

839/878 = 95.6% of JtR's speed

> For most other hash types I checked, JtR is a lot faster, e.g.:
> 
> [solar@...er hashcat-build]$ ./hashcat-cli64.bin -b -m 500
> Initializing hashcat v2.00 with 32 threads and 32mb segment-size...
> 
> Device...........: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
> Instruction set..: x86_64
> Number of threads: 32
> 
> Hash type: md5crypt, MD5(Unix), FreeBSD MD5, Cisco-IOS MD5
> Speed/sec: 269.21k words

[solar@...er hashcat-build]$ ./hashcat-cliAVX.bin -b -m 500
Initializing hashcat v2.00 with 32 threads and 32mb segment-size...

Device...........: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
Instruction set..: AVX
Number of threads: 32

Hash type: md5crypt, MD5(Unix), FreeBSD MD5, Cisco-IOS MD5
Speed/sec: 274.32k words

> [solar@...er src]$ GOMP_CPU_AFFINITY=0-31 ../run/john -test -form=md5crypt
> Will run 32 OpenMP threads
> Benchmarking: md5crypt, crypt(3) $1$ [MD5 128/128 AVX 4x3]... (32xOMP) DONE
> Raw:    729600 c/s real, 22750 c/s virtual
> 
> 729600/269210 = 2.71 times faster

729600/274320 = 2.66

> sha512crypt:
> 
> [solar@...er hashcat-build]$ ./hashcat-cli64.bin -b -m 1800
> Initializing hashcat v2.00 with 32 threads and 32mb segment-size...
> 
> Device...........: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
> Instruction set..: x86_64
> Number of threads: 32
> 
> Hash type: sha512crypt, SHA512(Unix)
> Speed/sec: 5.35k words

[solar@...er hashcat-build]$ ./hashcat-cliAVX.bin -b -m 1800
Initializing hashcat v2.00 with 32 threads and 32mb segment-size...

Device...........: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
Instruction set..: AVX
Number of threads: 32

Hash type: sha512crypt, SHA512(Unix)
Speed/sec: 6.04k words

> [solar@...er src]$ GOMP_CPU_AFFINITY=0-31 ../run/john -test -form=sha512crypt
> Will run 32 OpenMP threads
> Benchmarking: sha512crypt, crypt(3) $6$ (rounds=5000) [SHA512 128/128 AVX 2x]... (32xOMP) DONE
> Speed for cost 1 (iteration count) of 5000
> Raw:    11299 c/s real, 354 c/s virtual
> 
> 11299/5350 = 2.11 times faster

11299/6040 = 1.87

So clearly AVX does improve speeds at some of these, but overall it's
the same picture as before.

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.