[kismac] [binaervarianz] r169 - trunk/Sources/Crypto

  • From: svn@xxxxxxxxxxxxxxxx
  • To: kismac@xxxxxxxxxxxxx
  • Date: Sat, 26 Aug 2006 17:28:43 +0200

Author: gkruse
Date: 2006-08-26 17:28:38 +0200 (Sat, 26 Aug 2006)
New Revision: 169

Modified:
   trunk/Sources/Crypto/WaveNetWPACrack.m
Log:
Fixed wpa crack on intel thanks to cowaptty.  Seems that might be where our alg 
came from in the first place.  There is also some asm optimizations we should 
use in the future.  Closes #48

Modified: trunk/Sources/Crypto/WaveNetWPACrack.m
===================================================================
--- trunk/Sources/Crypto/WaveNetWPACrack.m      2006-08-23 02:20:24 UTC (rev 
168)
+++ trunk/Sources/Crypto/WaveNetWPACrack.m      2006-08-26 15:28:38 UTC (rev 
169)
@@ -54,12 +54,18 @@
 
 /* blk0() and blk() perform the initial expand. */
 /* I got the idea of expanding during the round function from SSLeay */
+#if BYTE_ORDER == BIG_ENDIAN
 #define blk0(i) buffer[i]
+#else
+#define blk0(i) (buffer[i] = (rol(buffer[i], 24) & 0xFF00FF00) | \
+       (rol(buffer[i], 8) & 0x00FF00FF))
+#endif
 
 #define blk(i) (buffer[i & 15] = rol(buffer[(i + 13) & 15] ^ \
        buffer[(i + 8) & 15] ^ buffer[(i + 2) & 15] ^ buffer[i & 15], 1))
 
 /* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
+//there are some intel asm versions of these we should use from cowpatty
 #define R0(v,w,x,y,z,i) \
        z += ((w & (x ^ y)) ^ y) + blk0(i) + 0x5A827999 + rol(v, 5); \
        w = rol(w, 30);


Other related posts: