Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 4 Sep 2012 19:52:08 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: memory usage (was: [john-users] JTR against 135 millions MD5 hashes)

On 4 Sep, 2012, at 11:06 , jfoug@....net wrote:

> On Tue, Sep 4, 2012 at 1:57 AM, magnum wrote:
> 
>>>>> Another potential source of memory usage reduction are the alignments.
>>>>> For raw MD5 hashes, a 4-byte alignment should suffice (they're 4x4
>>>>> bytes), yet we were using 8-byte alignment on 64-bit builds.
>>>> 
>>>> Very good point. I had not even thought of things like these new alignment requirements.
>> 
>> I do not know of *any* format using larger alignment than ARCH_WORD_32 except for salts (where we sometimes pass a pointer).

For the record I do know of one: raw-sha1-ng. But it's not using DEFAULT_ALIGN but MEM_ALIGN_SIMD so I did not count it. It's solely for performance though, it runs fine unaligned too.

> Do the builds drop to binary align=1 on intel boxes?  We probably should, or at least allow a compile define to get this, in case it causes a slight runtime slowdown.  Even for salts, I think we should drop to align=1 on systems allowing non-aligned access, and fix any formats which core due to actually having alignment issues (such as SIMD access).  The requires aligned systems (like sparc) but even there, it might be better to have the default be 1, and fix any format with issues.  Possibly it would be better with more than 1 default value.

That's what I did at first, and contemplated using 4 instead of 1, but for some reason Solar suggested [http://www.openwall.com/lists/john-dev/2012/07/17/6] I should just use ARCH_WORD instead. Anyway, the best solution (though most work) is to not use any DEFAULT_* but specify a known-good value for each format. Otherwise the whole point is lost...

magnum


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.