Follow @Openwall on Twitter for new release announcements and other news
[<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

Download attachment "rawSHA1_fmt_faster-1.diff" of type "application/octet-stream" (403 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.