[PATCH] [crypto] Make crypto core API modular

2007-12-01 Thread Sebastian Siewior
This patch makes the whole crypto API is modular. Signed-off-by: Sebastian Siewior [EMAIL PROTECTED] --- crypto/Kconfig |2 +- crypto/Makefile|3 ++- include/linux/crypto.h |2 +- 3 files changed, 4 insertions(+), 3 deletions(-) --- linux-2.6.orig/crypto/Kconfig

[0/5] Various authenc fixes

2007-12-01 Thread Herbert Xu
Hi: Here's a set of patches to fix authenc for use by IPsec. Most importantly, the encryption key length and ICV size are no longer template parameters but are set at run-time. This is important for future drivers that need to use this interface. Cheers, -- Visit Openswan at

[PATCH 1/4] [CRYPTO] authenc: Use or instead of max on alignment masks

2007-12-01 Thread Herbert Xu
[CRYPTO] authenc: Use or instead of max on alignment masks Since alignment masks are always one less than a power of two, we can use binary or to find their maximum. Signed-off-by: Herbert Xu [EMAIL PROTECTED] --- crypto/authenc.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 2/4] [CRYPTO] aead: Make authsize a run-time parameter

2007-12-01 Thread Herbert Xu
[CRYPTO] aead: Make authsize a run-time parameter As it is authsize is an algorithm paramter which cannot be changed at run-time. This is inconvenient because hardware that implements such algorithms would have to register each authsize that they support separately. Since authsize is a property

[PATCH 3/4] [CRYPTO] authenc: Move enckeylen into key itself

2007-12-01 Thread Herbert Xu
[CRYPTO] authenc: Move enckeylen into key itself Having enckeylen as a template parameter makes it a pain for hardware devices that implement ciphers with many key sizes since each one would have to be registered separately. Since the authenc algorithm is mainly used for legacy purposes where

[PATCH 4/4] [CRYPTO] authenc: Fix hash verification

2007-12-01 Thread Herbert Xu
[CRYPTO] authenc: Fix hash verification The previous code incorrectly included the hash in the verification which also meant that we'd crash and burn when it comes to actually verifying the hash since we'd go past the end of the SG list. This patch fixes that by subtracting authsize from