Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 31 Dec 2011 05:46:18 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: SSE/intrinsics for sapB/sapG [was: john-users]

On 12/31/2011 04:30 AM, jfoug@....net wrote:
>> Jim, Simon, how would I do a crypt of between 56 and 63 bytes? Is this
>> not possible? Can we actually only do 0-55 *or* 64-119 bytes?
>
> To encrypt 56 bytes, do this:
>
> 1. set the 56 bytes, then set 0x80 as the 57th, and null out the rest.  Do the sha.
> 2. create another buffer. NULL the entire buffer, but put 56<<3 into the length location (last 8 bytes, BE format, I think).
> 3. perform sha on this, using the results of step 1 as the init seed.
>
> I believe this can be done in sha1-mmx.S also.  I know it can be done in sse2-i

Cool, I'll try it out. But I still don't get how the functions can tell 
the difference between an ending 0x80 and one that is *part* of data 
(perhaps coincidentally followed by lots of nulls plus something that 
could be a length word, but all being just parts of a 64-byte binary 
data block)

Thanks,
magnum

Powered by blists - more mailing lists

Your e-mail address:

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