Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 13 Jan 2012 19:07:57 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: binary ciphertext and salt alignment

On 01/13/2012 11:34 AM, Solar Designer wrote:
> Right now, loader.c uses MEM_ALIGN_WORD for binary ciphertexts and
> salts.  I am going to adjust this such that it will use 4 when the
> corresponding size (format->params.binary_size or .salt_size) is between
> 4 and ARCH_SIZE-1, and MEM_ALIGN_NONE if the size is less than 4.
> 
> Sounds good?

Yes!

On a related note, I once tried to establish (using google) what speed
penalties there are - if any - for various kinds of misalignment on a
modern intel CPU. But I came up with nothing. Maybe this is simply not
an issue even for our purposes.

I suppose the following could possibly be different sorts of
misalignments affecting performance:

1. read/write misaligned 64-bit
2. read/write 32-bit not aligned to 8
3. read/write 32-bit not aligned to 4

I would not be surprised if you know the answers.

magnum


Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ