Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e08b9c25291cd7c1b4c9737dc6bc1237@smtp.hushmail.com>
Date: Tue, 11 Aug 2015 15:02:17 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Lei's weekly report #15

On 2015-08-10 18:27, Lei Zhang wrote:
> I'm still struggling to make episerver work with the SIMD SHA1/2 functions. Magnum, could you take a look at my code?
> 	https://github.com/zzlei/JohnTheRipper/blob/sha2/src/episerver_fmt_plug.c <https://github.com/zzlei/JohnTheRipper/blob/sha2/src/episerver_fmt_plug.c>
> I've been tweaking this file hard, but there's still something wrong. Maybe you can notice some obvious mistake in it (?)


You should write the salt in set_salt(). Doing it in crypt_all() is an 
awful waste unless salt actually changed. Also, you need to drop 
FMT_UTF8 for SIMD until you actually implement an encoding-aware 
set_key(). But neither of these is the reason it fails.

I'm pretty sure you miss a byte-swap when writing the salt but even 
fixing that doesn't make it pass. I can't find the problem right now.

Here's alternative "naive" code for salt-write.

#if 1
			for (k = 0; k < 16; ++k) // copy the salt to the vector buffer
				((unsigned char*)saved_key)[GETPOS(k, (index+j))] = ((unsigned 
char*)cur_salt->esalt)[k];
#else
			for (k = 0; k < 4; ++k) // copy the salt to the vector buffer
				in[(j&(SIMD_COEF_32-1)) + j/SIMD_COEF_32*SHA_BUF_SIZ*SIMD_COEF_32 + 
k*SIMD_COEF_32] = ((uint32_t*)cur_salt->esalt)[k];
#endif


magnum

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.