Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 15 Mar 2011 17:28:25 -0500
From: "jfoug" <jfoug@....net>
To: <john-dev@...ts.openwall.com>
Subject: Speedup of x86 .S build of raw-sha1 format

Here is about a 10% speedup.  A very trivial change.

 

I wanted to post this to the dev list first, just in case there is
'something' that will jump out from this change.  If people find this to be
a 'valid' patch, I will put it out on the wiki.

 

Here are the timing seen on my PC:

 

john_sse2 -test=5 -for=raw-sha1

Benchmarking: Raw SHA-1 SSE2 [raw-sha1 SSE2]... DONE

Raw:    7482K c/s

 

john -test=5 -for=raw-sha1

Benchmarking: Raw SHA-1 SSE2 [raw-sha1 SSE2]... DONE

Raw:    8212K c/s

 

The only change 2nd timing test is the change to the memset listed below.

 

--- john-1.7.6-jumbo-12/src/rawSHA1_fmt.c Sun Aug 22 12:35:32 2010

+++ john-1.7.6/src/rawSHA1_fmt.c    Tue Mar 15 17:11:55 2011

@@ -99,7 +104,8 @@ static void rawsha1_set_key(char *key, i

     if(index==0)

     {

           total_len = 0;

-           memset(saved_key, 0, sizeof(saved_key));

+           //memset(saved_key, 0, sizeof(saved_key));

+           memset(saved_key, 0, 64*MMX_COEF);

     }

     len = strlen(key);

     if(len>PLAINTEXT_LENGTH)

 

 

 


[ CONTENT OF TYPE text/html SKIPPED ]

[ CONTENT OF TYPE application/octet-stream SKIPPED ]

Powered by blists - more mailing lists

Your e-mail address:

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