Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Apr 2016 14:04:49 -0500
From: jfoug <>
Subject: Re: Dynamic and Very long Salt

> I see. This salt format is very ugly, and unfortunately, keeping the integrity is important otherwise the SHA1 hash will not be right. By the way, I did the test by setting the SaltLen to -232 direct in the dynamic.conf and it appeared to work! :)
> Thanks for the help.
> FG
Yes, at that length, the 'valid' will pass (works around the issue). I 
will see if I can get this working properly.  The issue is that during 
'valid' work, we are dealing with strings.  Thus any '$HEX$' data needs 
to be converted back to raw format. HOWEVER, if there are null bytes we 
can not convert.

One other 'work' around, is to give a input test line that does not have 
the nulls (but is properly 'functionality').  The runtime of dynamic 
does not care about the null's.  It will convert data salt data into a 
salt, and this data also contains a 'length'.  So there are no str*() 
functions used after the valid.

So we can 'fix' the format like this:


This also allows salts UPTO 250 characters long.

I generated the test line using, and test the format with a 'null' byte salt.

$ ../run/ 'dynamic=num=1600,format=sha1($s.utf16($p)),saltlen=113'
#!comment: Built with using RAW mode, 0 to 128 characters dict file=stdin

Enter words to hash, one per line.

$ cat


$ ../run/john
Loaded 1 password hash (dynamic_1600 [sha1($s.utf16le($p)) 128/128 AVX 4x1])
Warning: poor OpenMP scalability for this hash type, consider --fork=8
Will run 8 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
password         (?)
1g 0:00:00:00 DONE 2/3 (2016-04-11 14:00) 11.11g/s 74666p/s 74666c/s 
74666C/s 123456..Cloclo
Use the "--show" option to display all of the cracked passwords reliably
Session completed

NOTE, this still has the 'bug', where valid does not unhex the data.  
But with the longer salt length being valid, it 'works'. NOTE, you can 
not have a salt up to 250 bytes long, and crack things with salts that 
long. The buffer length max for ANYTHING in dynamic is 256 bytes.   But 
in this case the 'salt' is really only 113 bytes, and not 232.

Again this hack should let you get things 'working', but I will work on 
the fixes needed for dynamic within valid to handle salts with nulls in 

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.