Re: block-sha1: improve code on large-register-set machines
- From
- Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
- Date
- Aug 11, 2009, 23:13 UTC
- Message-ID
- <64Kyx_w-_2GgXIdUn26ky9qHnuvHBH2QTe9tAj1uuLv-1YDZNVLNKA@cipher.nrlssc.navy.mil>
- In-Reply-To
- <alpine.LFD.2.01.0908111553460.28882@localhost.localdomain>
Linus Torvalds wrote:
Show 7 quoted lines
>
> On Tue, 11 Aug 2009, Brandon Casey wrote:
>> In that case, why not change the interface of blk_SHA1Block() so that its
>> second argument is const unsigned char* and get rid of __d and the { } ?
>
> Because on big-endian, or on architectures like x86 that have an efficient
> byte swap, that would be horrible.Sorry, I missed Nicolas's first message where he said his SHA_SRC macro was for arm only.
I started at your reply to him which only has the snippet which says "...this provides the exact same performance as the ntohl() based version except that this now cope with unaligned buffers too".
My mistake.
-brandon