Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sun, 14 Apr 2013 04:56:34 -0700
From: Jeremi Gosney <epixoip@...dshell.nl>
To: john-dev@...ts.openwall.com
Subject: [patch] sse/xop implementation of raw-sha512

Got a chance to work on SHA512 today, patch attached.

First thing's first: this patch is broken. It passes the self tests just
fine, but segfaults when trying to crack anything for real. I've spent
the better part of the past three hours trying to track down the
problem, and have failed. Rather than keep trying, I thought I'd just
get some more eyes on the code and see if anyone sees something obvious.

With a single hash, it crashes after finding the plaintext:

Starting program: /home/epixoip/JohnTheRipper/run/john -fo:raw-sha512-ng
-w:/home/epixoip/wordlists/rockyou.txt test2
Loaded 1 password hash (Raw SHA-512 [128/128 SSSE3 intrinsics 2x])
soappy21         (?)

Program received signal SIGSEGV, Segmentation fault.
0x000000000055cf89 in crk_remove_hash (salt=0xc6e3e0, pw=0xc6e418) at
cracker.c:168
168                     while (*current != pw)
(gdb) bt
#0  0x000000000055cf89 in crk_remove_hash (salt=0xc6e3e0, pw=0xc6e418)
at cracker.c:168
#1  0x000000000055d594 in crk_process_guess (salt=0xc6e3e0, pw=0xc6e418,
index=1) at cracker.c:294
#2  0x000000000055d793 in crk_password_loop (salt=0xc6e3e0) at cracker.c:361
#3  0x000000000055d947 in crk_salt_loop () at cracker.c:395
#4  0x000000000055da2c in crk_process_key (key=0x7ffffff9cb30
"soappy21") at cracker.c:422
#5  0x000000000057610a in do_wordlist_crack (db=0xb0b3c0, name=0xbac0a6
"/home/epixoip/wordlists/rockyou.txt", rules=0) at wordlist.c:901
#6  0x0000000000563950 in john_run () at john.c:776
#7  0x0000000000563f5a in main (argc=4, argv=0x7fffffffe658) at john.c:1009


With more than one hash, it crashes immediately on start-up:

Starting program: /home/epixoip/JohnTheRipper/run/john -fo:raw-sha512-ng
-w:/home/epixoip/wordlists/rockyou.txt test
Loaded 30 password hashes with no different salts (Raw SHA-512 [128/128
SSSE3 intrinsics 2x])

Program received signal SIGSEGV, Segmentation fault.
0x00000000005666db in ldr_remove_marked (db=0xb0b3c0) at loader.c:897
897                             if (!current_pw->binary) {
(gdb) bt
#0  0x00000000005666db in ldr_remove_marked (db=0xb0b3c0) at loader.c:897
#1  0x0000000000566e26 in ldr_fix_database (db=0xb0b3c0) at loader.c:1065
#2  0x00000000005633cb in john_load () at john.c:574
#3  0x00000000005636ae in john_init (name=0x7fffffffe8a0 "john", argc=4,
argv=0x7fffffffe668) at john.c:701
#4  0x0000000000563f18 in main (argc=4, argv=0x7fffffffe668) at john.c:1000


Since the self tests are working, we can still get an idea of the speed.
On Bulldozer, performance is as expected (almost 2x speed-up). On Intel,
however, there's little to no performance gain over OpenSSL. Need to
spend more time figuring out how to show Intel some love.


Xeon X7350, no speed-up.

Benchmarking: Raw SHA-512 [64/64 OpenSSL]... DONE
Raw:    1916K c/s real, 1916K c/s virtual

Benchmarking: Raw SHA-512 [128/128 SSSE3 instrinsics 2x]... DONE
Raw:    1922K c/s real, 1922K c/s virtual


Xeon E5645, slight speed-up. About 1.18x faster.

Benchmarking: Raw SHA-512 [64/64 OpenSSL]... DONE
Raw:    1529K c/s real, 1529K c/s virtual

Benchmarking: Raw SHA-512 [128/128 SSSE3 intrinsics 2x]... DONE
Raw:    1809K c/s real, 1809K c/s virtual


FX-4100, good performance. About 1.9x faster.

Benchmarking: Raw SHA-512 [64/64 OpenSSL]... DONE
Raw:    1854K c/s real, 1854K c/s virtual

Benchmarking: Raw SHA-512 [128/128 XOP intrinsics 2x]... DONE
Raw:    3564K c/s real, 3541K c/s virtual


Regards,
epixoip

View attachment "rawSHA512_ng_fmt.diff" of type "text/plain" (22265 bytes)

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.