Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 Apr 2011 23:01:24 +0200
From: Łukasz Odzioba <lukas.odzioba@...il.com>
To: john-dev@...ts.openwall.com
Subject: sha256 format patches

I had some free time and have created two patches for JtR. Both are
capable to crack raw sha256 passwords.
One of them runs on CPU, and other uses CUDA library. It's zero
revision so performance is rather poor. I was focused on make it work
but i'am going to do some improvements especially in CUDA version. In
the next step i could try implement rest of SHA-2 family hashes, do
profiling and squeeze much more from a GPU.


I don't know what is the better distribution schematic:
  1) Two independent patches for GPU and CPU versions (current)
  2) One patch integrating both versions (what about users without
cuda installed? add another make option?)
  3) Patches from JTR1.7.6 to CPU and from CPU to GPU

I tried to avoid creating a new directory in src directory, but i
couldn't compile .cu file when it was directly in src.
Executing "nvcc -c sha256.cu" resulted following nvcc errors:
/usr/lib/gcc/i486-slackware-linux/4.4.4/../../../../include/c++/4.4.4/cmath:
In function ‘typename
__gnu_cxx::__enable_if<std::__is_arithmetic::__value, int>::__type
std::fpclassify(_Tp)’:
/usr/lib/gcc/i486-slackware-linux/4.4.4/../../../../include/c++/4.4.4/cmath:500:
error: ‘FP_NAN’ was not declared in this scope
/usr/lib/gcc/i486-slackware-linux/4.4.4/../../../../include/c++/4.4.4/cmath:500:
error: ‘FP_INFINITE’ was not declared in this scope
/usr/lib/gcc/i486-slackware-linux/4.4.4/../../../../include/c++/4.4.4/cmath:500:
error: ‘FP_NORMAL’ was not declared in this scope
/usr/lib/gcc/i486-slackware-linux/4.4.4/../../../../include/c++/4.4.4/cmath:501:
error: ‘FP_SUBNORMAL’ was not declared in this scope
/usr/lib/gcc/i486-slackware-linux/4.4.4/../../../../include/c++/4.4.4/cmath:501:
error: ‘FP_ZERO’ was not declared in this scope
It looks like include dirs problem, but i have no idea what it comes from.

I've modified Makefile to jump into src/cuda directory. Run Nvcc
compiler, and export .o file to the src dir where it is linked with
the rest of files. It is a bit messy, but at least it works. If
someone knows solution of this problem please contact me.

Here are my tests results: (C2Duo P7350 2GHz/GF 9600m - 32 CudaCores)
  Benchmarking: SHA256CPU [SHA256]... DONE
  Raw:    1134k c/s real, 1134k c/s virtual

  Benchmarking: SHA256CUDA [SHA256]... DONE
  Raw:    1795k c/s real, 1795k c/s virtual

Patches are available here: http://153.19.53.141/~ukasz/gsoc2011
Any comments, advices, critics, tests will be welcomed!
Lukas

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.