[CRYPTO] padlock: Rearrange context structure to reduce code size

2006-05-16 Thread Herbert Xu
Hi: i386 assembly has more compact instructions for accessing 7-bit offsets. So by moving the large members to the end of the structure we can save quite a bit of code size. This patch shaves about 10% or 300 bytes off the padlock-aes file. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Cheers,

[CRYPTO] digest: Remove unnecessary zeroing during init

2006-05-16 Thread Herbert Xu
On Tue, May 16, 2006 at 09:41:28PM +1000, herbert wrote: > > The context area is already zeroed by crypto_alloc_tfm so there is no > need for individual algorithms to zero it in their init functions. Actually this patch is bogus. We want things to continue to work when the user aborts a digest o

Re: [RFC][PATCH 1/2] Twofish cipher i586-asm optimized

2006-05-16 Thread Joachim Fritschi
On Tuesday 16 May 2006 09:44, Herbert Xu wrote: > On Sun, May 07, 2006 at 08:47:46PM +, Joachim Fritschi wrote: > > After going over my patch again, i realized i missed the .cra_priority > > and .cra_driver_name setting in the crypto api struct. Here is an updated > > version of my patch: > > >

[CRYPTO] all: Remove duplicate zeroing during init

2006-05-16 Thread Herbert Xu
Hi: The context area is already zeroed by crypto_alloc_tfm so there is no need for individual algorithms to zero it in their init functions. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home

[CRYPTO] aes-i586: Get rid of useless function wrappers

2006-05-16 Thread Herbert Xu
Hi: The wrappers aes_encrypt/aes_decrypt simply reverse the order of the function arguments. It's just as easy to get the actual assembly code to read them in the opposite order. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert

Re: [RFC][PATCH 1/2] Twofish cipher i586-asm optimized

2006-05-16 Thread Herbert Xu
On Sun, May 07, 2006 at 08:47:46PM +, Joachim Fritschi wrote: > After going over my patch again, i realized i missed the .cra_priority > and .cra_driver_name setting in the crypto api struct. Here is an updated > version of my patch: > > http://homepages.tu-darmstadt.de/~fritschi/twofish/two