Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 10 Apr 2013 12:10:10 -0700
From: Jeremi Gosney <>
Subject: Re: [patch] sse/xop implementation of raw-sha256

On 4/10/2013 5:30 AM, wrote:
> Jeremi,
> You might want to look at the cmp_all function.  I think things are not what they seem, and the code is always returning true, then using the current cmp_one logic.  The tmp value is always 0000 for non matches and fffff for matches.  Then what is returned is a short int where all 0 words are converted to a f and all ffff words converted to a 0.  So if all 4 hashes were cracked at once, then cmp_all would return 0.  Otherwise cmp_all is always returning some non-zero value.
> However, digging deeper into JtR's actual running, I found out something I did not know before.  cmp_all is ONLY called for salted types.  I thought cmp_all was always called.  The cmp_all does get called, always, within the self test code, but the expectation there, is that cmp_all should return true, which this version does.
> Magnum, I wonder if self-test code should mirror this logic (not calling cmp_all for non-salted), or if possibly all non-salted formats should have their cmp_all functions removed, and replaced with fmt_default_cmp_all  ?
> Jim.

Ah, ok. So I admit this is the result of my own ignorance of the JTR
framework, and trying to figure out how to make it work with SIMD. I did
a majority of my testing and debugging with the self-test code as well,
so I think that might have contributed in leading me astray.

I'll take another look at it and see if I can't make better sense of it.

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.