Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 15 Feb 2012 19:00:24 +0400
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: sha1 + hex salt

On Wed, Feb 15, 2012 at 09:01:47AM -0500, aprivater@...il.com wrote:
> Solar Designer wrote:
> >On Wed, Feb 15, 2012 at 12:39:05AM -0500, aprivater@...il.com wrote:
> >>sha1:20c59472b34ec4b9678b7149d519a2338bc31ba9   salt:00000000
> >>password is 92086390
> 
> this is pl script do the job, but it takes about 15min to complete on 
> average computer with no gpu, is any way to speed it up?
> how can i convert it to asm or c? thank you

Rewriting your script in another language is mostly off-topic here, but
discussion of how these hashes may be supported in JtR now or in the
future is on topic.

>   my $plain = sprintf ("%08d\0\0\0\0\0\0\0\0", $i);
> 
>   my $hash = sha1_hex ($plain);

So this is what you actually have - you append a constant string (why do
you call it a salt?) of 8 zero bytes.  This is different from what you
wrote initially, where you specified only 4 zero bytes (8 hex digits).

The following would work (to be placed in john.conf) if we could encode
a zero byte in a string:

[List.Generic:dynamic_1999]
Expression=sha1($p."\0\0\0\0\0\0\0\0")
Flag=MGF_SHA1_40_BYTE_FINISH
Func=DynamicFunc__clean_input
Func=DynamicFunc__append_keys
Func=DynamicFunc__append_input1_from_CONST1
Func=DynamicFunc__SHA1_crypt_input1_to_output1_FINAL
Test=$dynamic_1999$20c59472b34ec4b9678b7149d519a2338bc31ba9:92086390
CONST1=\x00\x00\x00\x00\x00\x00\x00\x00

Unfortunately, this setting of CONST1 does not appear to work right (so
this format fails self-test).

Jim - is this something you'd enhance in a future revision of your code?
Alternatively/additionally, how about supporting hex-encoded salts?

Alexander

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.