Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150827175713.GA7920@openwall.com>
Date: Thu, 27 Aug 2015 20:57:13 +0300
From: Aleksey Cherepanov <lyosha@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: optimization of constants in first rounds of raw formats

For raw-sha512, raw-md5 and similar formats, it is possible to reduce
first round to constant+w[0]. Next rounds can be reduced a bit too. I
played with it in john-devkit.

I tried sse code for sha512 with gcc 5.1: gcc optimizes most of
things, but not all. I think it does not optimize rotates (right
rotate).

I replaced 23 instructions in my intermediate representation. Number
of lines in disassembler dropped from 5030 to 4996. But it does not
seem to affect speed. Maybe there is 1% speed up, but fluctuations
does not allow me to say reliably.

I don't know if gcc optimizes it in john at all, because there are
'if's for multiblock computation IIRC.

Such optimization needs unrolling of main loop. I think it is not the
case in bitslice versions, so they might be improved this way.

Thanks!

-- 
Regards,
Aleksey Cherepanov

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.