Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 4 Sep 2012 19:52:08 +0200
From: magnum <>
Subject: Re: memory usage (was: [john-users] JTR against 135 millions MD5 hashes)

On 4 Sep, 2012, at 11:06 , 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 [] 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...


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.