lkml.org 
[lkml]   [2006]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] crypto: alignment fixes
From
On Wed, Mar 08, 2006 at 04:05:29PM +0900, Atsushi Nemoto wrote:
> This patch fixes some alignment problem on crypto modules.

Thanks for the patch. Please split this up and cc
linux-crypto@vger.kernel.org.

> 1. Many cipher setkey functions load key words directly but the key
> words might not be aligned. Enforce correct alignment in the
> setkey wrapper.

This isn't right. The alignmask applies to source/destination buffers
only. The only requirement on the key is that it must always be
32-bit aligned.

> 2. Some cipher modules lack cra_alignmask.

Good catch.

> 3. Some hash modules (and sha_transform() library function) load/store
> data words directly. Use get_unaligned()/put_unaligned() for them.

We should extend alignmask to cover this and handle it in the digest
layer.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
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-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-08 11:30    [W:0.083 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site