Re: [1/1 take 2] HIFN: preliminary HIFN 795x driver for new async cryptoapi.

2007-06-08 Thread Herbert Xu
On Mon, Jun 04, 2007 at 05:42:48PM +0400, Evgeniy Polyakov wrote: > > take2: > * added a lot of cryptoapi interfaces (i.e. support for all crypto >modes and three ciphers: aes, des and 3des via cryptoapi). > >My cat has pissed on my domestic slippers when he saw that. >And believe

[PATCH 2/3] [CRYPTO] Add optimized SHA-1 implementation for i486+

2007-06-08 Thread Benjamin Gilbert
Add x86-optimized implementation of the SHA-1 hash function, taken from Nettle under the LGPL. This code will be enabled on kernels compiled for 486es or better; kernels which support 386es will use the generic implementation (since we need BSWAP). We disable building lib/sha1.o when an optimized

[PATCH 3/3] [CRYPTO] Add optimized SHA-1 implementation for x86_64

2007-06-08 Thread Benjamin Gilbert
Add optimized implementation of the SHA-1 hash function for x86_64, ported from the x86 implementation in Nettle (which is LGPLed). The code has been tested with tcrypt and the NIST test vectors. Signed-off-by: Benjamin Gilbert <[EMAIL PROTECTED]> --- arch/x86_64/kernel/x8664_ksyms.c |3 a

[PATCH 0/3] Add optimized SHA-1 implementations for x86 and x86_64

2007-06-08 Thread Benjamin Gilbert
The following 3-part series adds assembly implementations of the SHA-1 transform for x86 and x86_64. For x86_64 the optimized code is always selected; on x86 it is selected if the kernel is compiled for i486 or above (since the code needs BSWAP). These changes primarily improve the performance of

Re: Where has CRYPTO_TFM_MODE_nnn gone?

2007-06-08 Thread Herbert Xu
On Fri, Jun 08, 2007 at 12:13:17PM -0700, Marc St-Jean wrote: > > In CBC mode we had a line of code copying cipher_desc.info to get the > initialization vector. Such as: > /* Copy in IV */ > memcpy((u8*)(sa->crypt_iv), desc->info, > crypto_tfm_alg_

[PATCH 1/3] [CRYPTO] Move sha_init() into cryptohash.h

2007-06-08 Thread Benjamin Gilbert
Make sha_init() a static inline in cryptohash.h rather than an (unexported) function in lib/sha1.c, in preparation for making sha1.c optional. This also allows some cleanups: - Modular code can now use sha_init() rather than reimplementing it - The optimized implementation of SHA-1 for ARM no lo

Re: Where has CRYPTO_TFM_MODE_nnn gone?

2007-06-08 Thread Marc St-Jean
Herbert Xu wrote: > Marc St-Jean <[EMAIL PROTECTED]> wrote: > > > > I'm porting a security engine driver from 2.6.18 to 2.6.21/22. I've > found > > that although 'cit_mode' is still in struct cipher_tfm, the definitions > > for CRYPTO_TFM_MODE_ECB and CRYPTO_TFM_MODE_CBC are gone! > > Thanks

[PATCH/RFC] [Crypto] Check if ablkcipher->queue field is used.

2007-06-08 Thread Sebastian Siewior
Evgeniy's hifn driver and probably mine don't use ablkcipher->queue at all. The show method of ablkcipher will access this field without checking if it is valid. Signed-off-by: Sebastian Siewior <[EMAIL PROTECTED]> Index: b/crypto/ablkcipher.c