Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 5 Dec 2011 10:42:01 -0600
From: "jfoug" <jfoug@....net>
To: <john-dev@...ts.openwall.com>
Subject: 2 changes to dynamic format

I have posted patch 0035 to the wiki.  This implements 2 changes to dynamic.

 

1.       Faster keyloading.

2.       Added 2 new hash functions. We were at 5, now we are at 7.

 

#1 was derived from code magnum did in raw-md5thick_fmt.c and nsldap_fmt.c
(md5 and sha1).  For the SHA1, we also implemented a new swapping macro. I
have taken that macro, and placed it into it's own header file, johnswap.h
That macro will translate down to a single __asm bswap reg instruction on
many intel systems.  On others, it uses the ROL(v,16);  return
((v&magic)>>8)|(v<<8)&magic);  method, which is faster than any other method
I have been shown.    So there is a new header.  I have also included
memory.c, using this header, and changed the alter_endianity function to use
it.  NOTE, there are other places within john where we byte swap.  Using
this header as a 'common' proper way to swap would be a good thing to do in
the near future.

 

This faster key loading will ONLY be done in the MGF_KEYS_INPUT type formats
(raw-md5, etc).  Formats such as md5($p), md5(md5($p)), etc, can 'use' this
input method.  For these methods, there is no temp variables for the keys,
they are stored 'raw' into the SSE buffers (this improvement is meaningless
in non-SSE builds).

 

#2 was attempted by magnum, in patch 0004, but he had problems for the pix
formats.  I did some looking into it, and found that each MD5 'limb' in that
format does not provide enough valid data, to handle the 7th hashes.  Thus,
for those 2 formats, we set that hash function to NULL.  This fix will
allow a VERY large number of candidates to not slow down as much, hashing
better.

 

Jim.

 

 


[ CONTENT OF TYPE text/html SKIPPED ]

Powered by blists - more mailing lists

Your e-mail address:

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