|
|
Message-ID: <008101cd65e1$b67d89e0$23789da0$@net>
Date: Thu, 19 Jul 2012 14:07:15 -0500
From: "jfoug" <jfoug@....net>
To: <john-dev@...ts.openwall.com>
Subject: RE: Keychain format speedup on CPU.
This could be done 2x to 3x faster with SSE (likely). I would like to help,
but am working on other projects. But since we do have SSE2 for sha1, it
certainly could be used.
I would only worry about setting up the SSE buffers, and using them within
the inner loop (but big_hmac_sha1 function)
>From: Dhiru Kholia [mailto:dhiru.kholia@...il.com]
>
>With the following commit Keychain format is now 2.4x faster on CPU and
>scales almost linearly. However, Passware Kit Enterprise 11.7 achieves a
>speed of roughly 2,300 c/s whereas our plug-in achieves
>1,513 c/s (thanks to Lukas).
>
>Can we beat Passware? What are the possible optimization in Lukas code?
>Can SSE acceleration be used (salt size is 20)? Thanks!
Also one very small optimization (less than 1%) is to avoid the non-needed
assignments.
for (lo = 1; lo < ITERATIONS; lo++) {
A = ipad_state[0];
B = ipad_state[1];
C = ipad_state[2];
D = ipad_state[3];
E = ipad_state[4];
W[5] = 0x80000000;
W[15] = 0x2A0;
SHA2(A, B, C, D, E, W);
// A += ipad_state[0];
// B += ipad_state[1];
// C += ipad_state[2];
// D += ipad_state[3];
// E += ipad_state[4];
//
// W[0] = A;
// W[1] = B;
// W[2] = C;
// W[3] = D;
// W[4] = E;
// W[5] = 0x80000000;
// W[15] = 0x2A0;
W[0] = A + ipad_state[0];
W[1] = B + ipad_state[1];
W[2] = C + ipad_state[2];
W[3] = D + ipad_state[3];
W[4] = E + ipad_state[4];
W[5] = 0x80000000;
W[15] = 0x2A0;
A = opad_state[0];
B = opad_state[1];
C = opad_state[2];
D = opad_state[3];
E = opad_state[4];
SHA2(A, B, C, D, E, W);
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.