[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 19 Oct 2008 05:53:41 +0400
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: fast freebsd MD5 implementation
On Fri, Oct 17, 2008 at 01:52:02PM +0200, Simon Marechal wrote:
> And for more spam, this adds an ICC target
>
> http://btb.banquise.net/bin/john-1.7.3.1-all-5-fastMD5.3.diff.gz
I compiled this on linux-x86-64 with gcc 4.3.1 after some trivial
changes (patch attached).
> gcc:
> Benchmarking: FreeBSD MD5 [12x]... DONE
> Raw: 2640 c/s real, 2613 c/s virtual
What version of gcc is that? I am not getting results this poor on
x86-64 with gcc 4.3.1. Indeed, it is possible that gcc's shortcomings
manifest themselves in a worse way when fewer registers are available.
> icc:
> Benchmarking: FreeBSD MD5 [12x]... DONE
> Raw: 10380 c/s real, 10380 c/s virtual
Here's what I am getting:
Athlon 64 3000+ 2.0 GHz
old code: 8970 c/s
4x: 7060
8x: 4500
12x: 5100
16x: 5100
20x: 5020
Q6600 2.4 GHz (one core):
old code: 10200 c/s
4x: 14844
8x: 9592
12x: 9374
16x: 3200
20x: 3100
So even with gcc there's an improvement on Core 2, but only when no
extra parallelism is introduced (beyond "one instance" of SSE2).
This time all 5 builds actually crack all of my 120 test hashes.
Thanks,
Alexander
diff -ur john-1.7.3.1-all-5-fastMD5.3/src/MD5_std.h john-1.7.3.1-all-5-fastMD5.3bis/src/MD5_std.h
--- john-1.7.3.1-all-5-fastMD5.3/src/MD5_std.h 2008-10-19 05:32:20 +0400
+++ john-1.7.3.1-all-5-fastMD5.3bis/src/MD5_std.h 2008-10-19 05:38:25 +0400
@@ -60,6 +60,9 @@
#endif
#ifdef MD5_SSE_PARA
+# ifndef MMX_COEF
+# define MMX_COEF 4
+# endif
# define MD5_N (MD5_SSE_PARA*MMX_COEF)
# define MD5_ALGORITHM_NAME MD5_N_STR
#else
diff -ur john-1.7.3.1-all-5-fastMD5.3/src/Makefile john-1.7.3.1-all-5-fastMD5.3bis/src/Makefile
--- john-1.7.3.1-all-5-fastMD5.3/src/Makefile 2008-10-19 05:34:01 +0400
+++ john-1.7.3.1-all-5-fastMD5.3bis/src/Makefile 2008-10-19 05:40:20 +0400
@@ -193,7 +193,7 @@
linux-x86-64:
$(LN) x86-64.h arch.h
$(MAKE) $(PROJ) \
- JOHN_OBJS="$(JOHN_OBJS_MINIMAL) x86-64.o"
+ JOHN_OBJS="$(JOHN_OBJS_MINIMAL) x86-64.o sse-intrinsics.o"
linux-x86-64-32-sse2:
$(LN) x86-sse.h arch.h
@@ -216,6 +216,7 @@
$(MAKE) $(PROJ) \
JOHN_OBJS="$(JOHN_OBJS_MINIMAL) x86.o x86-sse.o sha1-mmx.o md5-mmx.o sse-intrinsics.o" \
CFLAGS="$(CFLAGS) -march=nocona"
+
linux-x86-sse2-icc:
$(LN) x86-sse.h arch.h
$(MAKE) $(PROJ) \
diff -ur john-1.7.3.1-all-5-fastMD5.3/src/sse-intrinsics.c john-1.7.3.1-all-5-fastMD5.3bis/src/sse-intrinsics.c
--- john-1.7.3.1-all-5-fastMD5.3/src/sse-intrinsics.c 2008-10-17 15:54:30 +0400
+++ john-1.7.3.1-all-5-fastMD5.3bis/src/sse-intrinsics.c 2008-10-19 05:37:14 +0400
@@ -4,6 +4,10 @@
#include "memory.h"
#include "md5.h"
+#ifndef MMX_COEF
+#define MMX_COEF 4
+#endif
+
#define SSE_NUM_KEYS (MMX_COEF*MD5_SSE_PARA)
#define PARA_DO(x) for((x)=0;(x)<MD5_SSE_PARA;(x)++)
diff -ur john-1.7.3.1-all-5-fastMD5.3/src/x86-64.h john-1.7.3.1-all-5-fastMD5.3bis/src/x86-64.h
--- john-1.7.3.1-all-5-fastMD5.3/src/x86-64.h 2008-08-24 08:59:02 +0400
+++ john-1.7.3.1-all-5-fastMD5.3bis/src/x86-64.h 2008-10-19 05:45:44 +0400
@@ -41,6 +41,8 @@
#define MD5_ASM 0
#define MD5_X2 1
#define MD5_IMM 1
+#define MD5_SSE_PARA 3
+#define MD5_N_STR "12x"
#define BF_ASM 0
#define BF_SCALE 1
--
To unsubscribe, e-mail john-users-unsubscribe@...ts.openwall.com and reply
to the automated confirmation request that will be sent to you.
Powered by blists - more mailing lists
Powered by Openwall GNU/*/Linux -
Powered by OpenVZ