[PATCH 0/6] crypto: shash - Require all algorithms to support export/import

2009-07-22 Thread Herbert Xu
Hi: This series ensures that all existing shash/ahash implementations support the export/import interface. It is now also a requirement that all new ones must do so as well. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} herb...@gondor.apana.org.au Home Page:

[PATCH 1/6] crypto: xcbc - Use crypto_xor

2009-07-22 Thread Herbert Xu
crypto: xcbc - Use crypto_xor This patch replaces the local xor function with the generic crypto_xor function. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- crypto/xcbc.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/crypto/xcbc.c

[PATCH 2/6] crypto: xcbc - Fix shash conversion

2009-07-22 Thread Herbert Xu
crypto: xcbc - Fix shash conversion Although xcbc was converted to shash, it didn't obey the new requirement that all hash state must be stored in the descriptor rather than the transform. This patch fixes this issue and also optimises away the rekeying by precomputing K2 and K3 within setkey.

[PATCH 4/6] crypto: sha512_generic - Use 64-bit counters

2009-07-22 Thread Herbert Xu
crypto: sha512_generic - Use 64-bit counters This patch replaces the 32-bit counters in sha512_generic with 64-bit counters. It also switches the bit count to the simpler byte count. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- crypto/sha512_generic.c | 28

[PATCH 5/6] crypto: sha512-s390 - Add export/import support

2009-07-22 Thread Herbert Xu
crypto: sha512-s390 - Add export/import support This patch adds export/import support to sha512-s390 (which includes sha384-s390). The exported type is defined by struct sha512_state, which is basically the entire descriptor state of sha512_generic. Since sha512-s390 only supports a 64-bit

Re: [PATCH v2] crypto: authenc - convert to ahash

2009-07-22 Thread Steffen Klassert
On Wed, Jul 22, 2009 at 03:02:59PM +0800, Herbert Xu wrote: On Tue, Jul 21, 2009 at 11:02:17AM +0200, Steffen Klassert wrote: + err = crypto_ahash_finup(ahreq); + if (err == -EINPROGRESS) + return; This is redundant. All completion functions must expect to be called

Re: [PATCH v2] crypto: authenc - convert to ahash

2009-07-22 Thread Herbert Xu
On Wed, Jul 22, 2009 at 09:32:11AM +0200, Steffen Klassert wrote: On Wed, Jul 22, 2009 at 03:02:59PM +0800, Herbert Xu wrote: On Tue, Jul 21, 2009 at 11:02:17AM +0200, Steffen Klassert wrote: + err = crypto_ahash_finup(ahreq); + if (err == -EINPROGRESS) + return; This

RE: Picture, Event or Logo?

2009-07-22 Thread iCandy Soaps
Hello, We can put your picture, event or logo in soap for promotional or personal purposes! Please check out these cool cleaning options at http://www.icandysoaps.com and don't forget while you're there to enter our FREE giveaway for your chance to win your very own custom designed soaps!!!

[PATCH] crypto: ahash - Use GFP_KERNEL on allocation if the request can sleep

2009-07-22 Thread Steffen Klassert
ahash_op_unaligned() and ahash_def_finup() allocate memory atomically, regardless whether the request can sleep or not. This patch changes this to use GFP_KERNEL if the request can sleep. Signed-off-by: Steffen Klassert steffen.klass...@secunet.com --- crypto/ahash.c |4 ++-- 1 files

Re: [PATCH] crypto: ahash - Use GFP_KERNEL on allocation if the request can sleep

2009-07-22 Thread Herbert Xu
On Wed, Jul 22, 2009 at 11:51:23AM +0200, Steffen Klassert wrote: ahash_op_unaligned() and ahash_def_finup() allocate memory atomically, regardless whether the request can sleep or not. This patch changes this to use GFP_KERNEL if the request can sleep. Signed-off-by: Steffen Klassert

[PATCH] crypto: shash - Test for the algorithms import function before exporting it

2009-07-22 Thread Steffen Klassert
crypto_init_shash_ops_async() tests for setkey and not for import before exporting the algorithms import function to ahash. This patch fixes this. Signed-off-by: Steffen Klassert steffen.klass...@secunet.com --- crypto/shash.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

[PATCH 1/1] crypto: Undefined behaviour in crypto_aes_expand_key

2009-07-22 Thread Phil Carmody
It's undefined behaviour in C to write outside the bounds of an array. The key expansion routine takes a shortcut of creating 8 words at a time, but this creates 4 additional words which don't fit in the array. As everyone is hopefully now aware, GCC is at liberty to make any assumptions and

[PATCH 0/1] crypto: Undefined behaviour in crypto_aes_expand_key

2009-07-22 Thread Phil Carmody
The following patch applies to the current head of torvalds/linux-2.6.git. However, due to the relatively stable nature of the only file patched, it should apply anywhere. Apologies if there are any mail mangling issues, they aren't unheard of, alas, and I will resend from home if need be. The