Re: [PATCH] do not unroll big stuff in twofish key setup if OPTIMIZE_FOR_SIZE

2007-10-22 Thread Herbert Xu
On Sun, Oct 21, 2007 at 08:16:25PM +0100, Denys Vlasenko wrote: > Hello Herbert, > > Currently twofish cipher key setup code > has unrolled loops - approximately 70-100 > instructions are repeated 40 times. > > As a result, twofish module is the biggest module > in crypto/*. > > Attached patch c

Re: GCM & CTR (fwd)

2007-10-22 Thread Joy Latten
>On Fri, Oct 19, 2007 at 10:29:32PM +, Joy Latten wrote: >> >> I think the change to CTR would be simple. >> If noncesize + ivsize == blocksize, then use >> entire counterblock as counter and pass to >> ctr_inc_quad(). Currently, we just fail >> if noncesize + ivsize == blocksize. > >Ho

Re: [RFC 2/5] [crypto] geode: relax in busy loop and care about return value

2007-10-22 Thread Sebastian Siewior
* Herbert Xu | 2007-10-21 16:14:52 [+0800]: >I'd like to see the error propagated up though. We'd need >to change the simple cipher interface to allow errors to be >returned. okey. >Cheers, Sebastian - To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a messa

Re: [RFC 4/5] [crypto] geode: add fallback for unsupported modes.

2007-10-22 Thread Sebastian Siewior
* Herbert Xu | 2007-10-21 16:31:58 [+0800]: >> +if (type == CRYPTO_ALG_TYPE_BLKCIPHER) { >> +op->fallback.blk = crypto_alloc_blkcipher(name, 0, >> +CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK); >> + >> +} else if (type == CRYPTO_ALG_TYPE_CIPHER) { >>

[RFC] group common used functions in software AES modules

2007-10-22 Thread Sebastian Siewior
Hello Herbert, this little patch series moves the the key generation routine and the four tables which are used encrypt/decrypt function into a separate module. Currently I converted the generic AES and the x86_64 variant. My 32bit asm is rusted so the i586 assembly has to wait for a while :) Se

[RFC 1/3] AES: group common functions

2007-10-22 Thread Sebastian Siewior
From: Sebastian Siewior <[EMAIL PROTECTED]> There are three AES softwore modules in the kernel: One C version and two arch specific assembly versions. The key expansion routine as well as the the four lookup tables which are used during encryption and/or decryption are the same. This patch simply

[RFC 2/3] [crypto] generic AES use new common module

2007-10-22 Thread Sebastian Siewior
From: Sebastian Siewior <[EMAIL PROTECTED]> Share the tables and set_key function. Signed-off-by: Sebastian Siewior <[EMAIL PROTECTED]> --- crypto/Kconfig |1 + crypto/aes_generic.c | 281 ++ 2 files changed, 35 insertions(+), 247 deleti

[RFC 3/3] [crypto] x86_64 asm AES use new common module

2007-10-22 Thread Sebastian Siewior
From: Sebastian Siewior <[EMAIL PROTECTED]> Share the tables and set_key function. Signed-off-by: Sebastian Siewior <[EMAIL PROTECTED]> --- arch/x86/crypto/aes-x86_64-asm_64.S | 68 arch/x86/crypto/aes_64.c| 282 +-- crypto/Kconfig