[PATCH] crypto: add alignment handling to digest layer

2006-03-08 Thread Atsushi Nemoto
Some hash modules load/store data words directly. The digest layer should pass properly aligned buffer to update()/final() method. This patch also add cra_alignmask to some hash modules. Signed-off-by: Atsushi Nemoto <[EMAIL PROTECTED]> digest.c | 42 +++-

[PATCH] crypto: fix unaligned access in khazad module

2006-03-08 Thread Atsushi Nemoto
On 64-bit platform, reading directly from keys (which supposed to be 32-bit aligned) will result in unaligned access. Signed-off-by: Atsushi Nemoto <[EMAIL PROTECTED]> diff --git a/crypto/khazad.c b/crypto/khazad.c index 807f2bf..c7e1d25 100644 --- a/crypto/khazad.c +++ b/crypto/khazad.c @@ -26,6

[PATCH] crypto: fix key alignment in tcrypt

2006-03-08 Thread Atsushi Nemoto
Force 32-bit alignment on keys in tcrypt test vectors. Signed-off-by: Atsushi Nemoto <[EMAIL PROTECTED]> diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h index 733d07e..050f852 100644 --- a/crypto/tcrypt.h +++ b/crypto/tcrypt.h @@ -31,7 +31,7 @@ struct hash_testvec { char digest[MAX_DIGEST_

[PATCH] crypto: add missing cra_alignmask

2006-03-08 Thread Atsushi Nemoto
The "des3_ede" and "serpent" lack cra_alignmask. Signed-off-by: Atsushi Nemoto <[EMAIL PROTECTED]> diff --git a/crypto/des.c b/crypto/des.c index 7bb5486..2d74cab 100644 --- a/crypto/des.c +++ b/crypto/des.c @@ -965,6 +965,7 @@ static struct crypto_alg des3_ede_alg = .cra_blocksize