Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 24 Jan 2012 21:07:08 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: OpenCL vs Test Suite

I had a look at OpenCL patch rev 5 today. Some comments:

Here's raw-md5 in CPU:

Benchmarking: Raw MD5 [SSE2i 12x]... DONE
Raw:	24852K c/s real, 24852K c/s virtual

...and here is OpenCL version:

OpenCL Platforms: 1
OpenCL Platform: <<<NVIDIA CUDA>>> 1 device(s), using device: <<<GeForce
9600 GT>>>
Compilation log:

Max Group Work Size 512 Optimal Group work Size = 64
Benchmarking: Raw MD5 [raw-md5-opencl]... DONE
Raw:	31145K c/s real, 15572K c/s virtual

OK, that's 25% faster. But with real work, it does not deliver:

$ ./john -fo:raw-md5-opencl test/test.rawmd5 -inc:digits -pot:deleteme
OpenCL Platforms: 1
OpenCL Platform: <<<NVIDIA CUDA>>> 1 device(s), using device: <<<GeForce
9600 GT>>>
Compilation log:

Max Group Work Size 512 Optimal Group work Size = 64
Loaded 8 password hashes with no different salts (Raw MD5 [raw-md5-opencl])
guesses: 0  time: 0:00:02:09 7.54% (ETA: 2012-01-24 15:18:23)  c/s:
388451  trying: 7040624 - 94720711
Session aborted

The CPU format exhausted -inc:digits in 6 seconds for the same test.

I also tried running the OpenCL formats in the Test Suite, and more
problems showed up:

-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.11, Dec 18, 2011.  By, Jim Fougeron
- Testing:  John the Ripper password cracker, ver: 1.7.9-jumbo-5
[linux-x86-64-opencl]
--------------------------------------------------------------------------------

John Jumbo build detected.
testing: john -test=0
OpenCL error (CL_MEM_OBJECT_ALLOCATION_FAILURE) in file
(rawMD5_opencl_fmt.c) at line (126) - (Error mapping page-locked memory)

form=cryptmd5-opencl              guesses:      0 unk unk : Expected
count(s) (1500)  [!!!FAILED!!!]
sh: cannot open ./tst.pot: No such file
.pot CHK:cryptmd5-opencl          guesses:     10 time: 0:00:07:33 :
Expected count(s) (1500)  [!!!FAILED!!!]

form=phpass-opencl                guesses:   1470 time: 0:00:02:41 :
Expected count(s) (1500)  [!!!FAILED!!!]
.pot CHK:phpass-opencl            guesses:   1470 time: 0:00:02:41  [PASSED]

form=raw-md5-opencl               guesses:   1429 time: 0:00:00:01 :
Expected count(s) (1500)  [!!!FAILED!!!]
.pot CHK:raw-md5-opencl           guesses:   1429 time: 0:00:00:02  [PASSED]

form=raw-sha1-opencl              guesses:   1468 time: 0:00:00:00 :
Expected count(s) (1500)  [!!!FAILED!!!]
.pot CHK:raw-sha1-opencl          guesses:   1468 time: 0:00:00:00  [PASSED]

form=nt-opencl                    guesses:   1478 time: 0:00:00:00 :
Expected count(s) (1500)  [!!!FAILED!!!]
.pot CHK:nt-opencl                guesses:   1478 time: 0:00:00:00  [PASSED]

form=ssha-opencl                  guesses:      0 unk unk : Expected
count(s) (1500)  [!!!FAILED!!!]
sh: cannot open ./tst.pot: No such file
.pot CHK:ssha-opencl              guesses:      0 unk unk  [PASSED]

Some tests had Errors. Performed 6 tests.6 errors  1 errors reprocessing
the .POT files
Time used was 841 seconds


I enclose a patch that applies to Test Suite v1.11. With that applied,
you can test one [or more] formats "./jtrts.pl cryptmd5-opencl [...]",
or all OpenCL formats "./jtrts.pl opencl". Some of these problems may be
trivial, but hard to find without the test suite.

During manual testing I also saw other errors than the one reported
during the test suite run:
OpenCL error (CL_OUT_OF_HOST_MEMORY) in file (common-opencl.c) at line
(72) - (Error creating context)
OpenCL error (CL_OUT_OF_RESOURCES) in file (cryptmd5_opencl_fmt.c) at
line (197) - (clFinish error)

...and sometimes even just the self-test for raw-md5 failed (when not
running X):
Benchmarking: Raw MD5 [raw-md5-opencl]... FAILED (get_hash[0](4))

Maybe some/all of these problems are "caused" by my environment? BTW,
when I tried running this with no X server active, I could see some
spectacular "progress report" on the console screen: I assume John was
using GPU memory that was part of my frame buffer. Is this normal? Is it
bad?
Am I supposed to be able to run a dual screen X at the same time as
running OpenCL formats? John will just get less GPU memory? Too little?

magnum

>From 850e7e6e6667251ddda5ed87989e94b0d1cf4f81 Mon Sep 17 00:00:00 2001
From: magnum <magnum>
Date: Tue, 24 Jan 2012 16:31:11 +0100
Subject: [PATCH] OpenCL formats added

---
 jtrts.dat |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/jtrts.dat b/jtrts.dat
index d9cd69d..723853c 100644
--- a/jtrts.dat
+++ b/jtrts.dat
@@ -281,3 +281,9 @@
 (cp1252)(enc),(X),(jumbo)&(encode_valid),10000,MSSql05-cp1252,pw-gen-enc,MSSql05_tst_cp1252.in,mssql05,Y,-enc=cp1252,(1500),(1500)
 (cp1252)(enc),(X),(jumbo)&(encode_valid),10000,oracle-cp1252,pw-gen-enc,oracle_tst_cp1252.in,oracle,Y,-enc=cp1252,(1500),(1500)
 ###############################################
+(opencl),(X),(jumbo),200,cryptmd5-opencl,pw,md5_1_tst.in,cryptmd5-opencl,Y,X,(1500),(1500)
+(opencl),(X),(jumbo),150,phpass-opencl,pw,phpass_tst.in,phpass-opencl,Y,X,(1500),(1500)
+(opencl),(X),(jumbo),10000,raw-md5-opencl,pw,rawmd5_tst.in,raw-md5-opencl,Y,X,(1500),(1500)
+(opencl),(X),(jumbo),10000,raw-sha1-opencl,pw,rawsha1_tst.in,raw-sha1-opencl,Y,X,(1500),(1500)
+(opencl),(X),(jumbo),10000,nt-opencl,pw,NT_tst.in,nt-opencl,Y,X,(1500),(1500)
+(opencl),(X),(jumbo),10000,ssha-opencl,pw,openssha_tst.in,ssha-opencl,Y,X,(1500),(1500)
-- 
1.7.5.4


Powered by blists - more mailing lists

Your e-mail address:

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