Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 11 Mar 2011 08:49:39 -0600
From: "JimF" <>
To: <>
Subject: New update to md5-gen, AND changes to the john core 'format' structures. (diff posted to Wiki)


I have originally posted this to Alex, offline, since this is not going to 
be a 'pretty' patch.  It touches every *fmt.c file we have and other 'core' 
files, which always cause patch collisions.

have posted a patch which 'would' be md5-gen early, but it includes some 
significant structure changes.   This really should get put into a jumbo. 
Here are the format changes.

1.       Added a void *data to the 'fmt_private' structure.  Should be a 
zero impact for all formats (except ones that want to use it.
2.       Added fmt_main pointer to the valid() and init() functions.  This 
required changing almost every format.
3.       Added a 'new' prepare() function.   This would be called prior to 
valid().  It will 'build' the string to use as the ciphertext string.  This 
also was a change for every format, since it is a new method.  The majority, 
simply use fmt_prepare_default()
4.       Added 'multiple' format support in john.c and md5gen_fmt.c  Steps 1 
and 2 above were needed for this.
5.       Gutted the md5-gen 'logic' out of bench.c and formats.c, since the 
format is now a bunch of 'normal' formats.
6.       Gutted loader.c  (Step 3 was required for this).  All that logic is 
down in the prepare() functions of the formats which 'needed' that type of 
support.  NOTE, the generic crypt(3) was not done this way, since I had no 
way to test it.  However, all other formats which had bindings in loader.c 
have been stripped out.  All functionality is there (including a little 
'extra' for NT).  The extra is NT now can be used against a file of 'flat' 
32 byte hash values.
7.       Added the 'tiny_memory' cleanup.  It is simply a linked list each 
time real allocation happens, and then at the end of john_done(), a call to 
the 'cleanup' is done.  This is a pretty trivial change, but could easily be 
left out.  It would be nice to make sure there are no leaks, but hard to do, 
if there is lots of 'stagnant' memory, which simply appears like a leak.
8.   MD5-gen updated quite a bit. Added:  Username (normal, upper or lower 
case). ASCII-to-Unicode support (the -utf8 has not been addressed yet). 
Upper case possible for md5 to base-16 conversions. Cisco-Pix and Pix-salted 
now native formats. Fixed many bugs in not-used-yet primative functions (and 
some that were used, but did not work in one of the builds, such as MMX).
I have put the patch on the wiki, at

This patch is pretty much assured to cause the patches to have conflicts. 
That is the reason for this email. Can this possibly be put into a jumbo, so 
that the 'existing' patches can be made against this.  I do NOT see any 
additional changes to the format structure or addition/changes of 


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.