Re: [PATCH] an XTS blockcipher mode implementation without partial blocks

2007-09-19 Thread Herbert Xu
On Thu, Sep 06, 2007 at 05:03:42PM +0200, Rik Snel wrote: XTS currently considered to be the successor of the LRW mode by the IEEE1619 workgroup. LRW was discarded, because it was not secure if the encyption key itself is encrypted with LRW. XTS does not have this problem. The implementation

Re: {twofish,aes}-{x86_64,i586} versus C implementations

2007-09-19 Thread Herbert Xu
On Mon, Sep 03, 2007 at 12:42:27AM +0200, Sebastian Siewior wrote: [crypto] do not use generic AES on i386 and x86_64 This patch automatically selects the assembly optimized version of AES (if selected) and the generic version can no longer be selected. The module will be called aes.ko You

Re: [PATCH 1/1]: CTR mode implementation

2007-09-19 Thread Herbert Xu
On Thu, Aug 30, 2007 at 11:14:45AM -0500, Joy Latten wrote: The tcrypt vectors are from rfc 3686. They all pass except for the ones with 256-bit keys. Please let me know if all looks ok or not. Thanks Joy, it looks pretty good. Please add a signed-off-by line. I need to do some surgery

Re: {twofish,aes}-{x86_64,i586} versus C implementations

2007-09-19 Thread Sebastian Siewior
* Herbert Xu | 2007-09-19 20:29:43 [+0800]: On Mon, Sep 03, 2007 at 12:42:27AM +0200, Sebastian Siewior wrote: [crypto] do not use generic AES on i386 and x86_64 This patch automatically selects the assembly optimized version of AES (if selected) and the generic version can no longer be

Re: [PATCH 1/1]: CTR mode implementation

2007-09-19 Thread Joy Latten
On Wed, 2007-09-19 at 21:06 +0800, Herbert Xu wrote: + do { + /* create keystream */ + fn(crypto_cipher_tfm(tfm), dst, ctrblk); + xor_128(dst, src); You seem to be assuming that the cipher algorithm is AES. That's not necessarily the case so either use

Re: {twofish,aes}-{x86_64,i586} versus C implementations

2007-09-19 Thread Herbert Xu
On Wed, Sep 19, 2007 at 11:46:52PM +0200, Sebastian Siewior wrote: Also please provide a way to build the generic AES code so that it can at least be tested on i386/x86_64. You want to auto compile aes-x86_64 if you are on x86_64 and additonally the generic version. Is that correct? If so,