Re: inconsistent handling of unaligned hash inputs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 01, 2014 at 06:06:14PM -0700, David Miller wrote:
>
> In these specific hash functions we only read the u32/u64 inputs
> a byte at a time once, to get them into the work buffer.
> 
> If we have the crypto layer do it, we'll bounce the data around
> once to the crypto layer bounce buffer, then once again into
> the hash implementation's work buffer.

Oh of course if your data is unaligned it'll be worse.  But most
in-kernel input should be aligned.  So we need to balance this
against the cost of unaligned loads on aligned data.  If the cost
of unaligned loads on aligned data is negligible then sure let's
just do unaligned loads unconditionally.

PS Sorry for the earlier HTML email, I sent it from Android and
it seems that there is no way to disable HTML.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux