Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 Apr 2011 23:01:24 +0200
From: Łukasz Odzioba <>
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" resulted following nvcc errors:
In function typename
__gnu_cxx::__enable_if<std::__is_arithmetic::__value, int>::__type
error: FP_NAN was not declared in this scope
error: FP_INFINITE was not declared in this scope
error: FP_NORMAL was not declared in this scope
error: FP_SUBNORMAL was not declared in this scope
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:
Any comments, advices, critics, tests will be welcomed!

Powered by blists - more mailing lists

Your e-mail address:

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