Re: [PATCH] libcrc32c: keep intermediate crc state in cpu order

2007-11-08 Thread Benny Halevy
On Nov. 08, 2007, 20:41 +0200, Dave Jiang <[EMAIL PROTECTED]> wrote: > Resolved my issue with BE open-iscsi initiator and LE IET target. Thanks! Super! Thanks for testing! And many thanks to Tomo for identifying the byte-order problem in the crypto code. Benny > > Benny Halevy wrote: >> cryp

Re: [PATCH] libcrc32c: keep intermediate crc state in cpu order

2007-11-08 Thread Dave Jiang
Resolved my issue with BE open-iscsi initiator and LE IET target. Thanks! Benny Halevy wrote: > crypto/crc32.c:chksum_final() is computing the digest as > *(__le32 *)out = ~cpu_to_le32(mctx->crc); > so the low-level crc32c_le routines should just keep > the crc in cpu order, otherwise it is gettin

Re: Fwd: Re: [PATCH] iSCSI fix endieness of digest to be network byte order

2007-11-08 Thread Vlad Yasevich
Herbert Xu wrote: > On Thu, Nov 08, 2007 at 05:04:09PM +0900, FUJITA Tomonori wrote: >> I wonder why crc32c isn't used directly while crc32 is used directly >> since they vary by only the polynomial. > > It's because iSCSI uses it with scatterlists. The crypto layer > provides a nice interface fo

Re: [PATCH 3/3] [crypto] AES x86_64, remove setkey

2007-11-08 Thread Sebastian Siewior
* Herbert Xu | 2007-11-08 21:26:33 [+0800]: >On Sun, Oct 28, 2007 at 01:30:09PM +0100, Sebastian Siewior wrote: >> >> The setkey() function can be shared with the generic algorithm. >> >> Signed-off-by: Sebastian Siewior <[EMAIL PROTECTED]> > >Beautiful. All applied. Thanks Sebastian! thx. The

Re: [PATCH] libcrc32c: keep intermediate crc state in cpu order

2007-11-08 Thread Herbert Xu
On Thu, Nov 08, 2007 at 10:20:34AM +0200, Benny Halevy wrote: > crypto/crc32.c:chksum_final() is computing the digest as > *(__le32 *)out = ~cpu_to_le32(mctx->crc); > so the low-level crc32c_le routines should just keep > the crc in cpu order, otherwise it is getting swabbed > one too many times on

Re: [PATCH 5/5] camellia: de-unrolling, 64bit-ization

2007-11-08 Thread Herbert Xu
On Wed, Nov 07, 2007 at 01:22:52PM +, Denys Vlasenko wrote: > > *I* am happy with 5% speed sacrifice. I'm afraid other people won't be. I'd like to hear the opinion of the author. Takamiya-san, what do you think about this change? Thanks, -- Visit Openswan at http://www.openswan.org/ Email:

Re: [PATCH] [crypto] don't make CTR default M

2007-11-08 Thread Herbert Xu
On Sun, Oct 28, 2007 at 04:49:02PM +0100, Sebastian Siewior wrote: > NO other block mode is M by default. > > Signed-off-by: Sebastian Siewior <[EMAIL PROTECTED]> Patch applied. Thanks. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: htt

Re: [PATCH 3/3] [crypto] AES x86_64, remove setkey

2007-11-08 Thread Herbert Xu
On Sun, Oct 28, 2007 at 01:30:09PM +0100, Sebastian Siewior wrote: > > The setkey() function can be shared with the generic algorithm. > > Signed-off-by: Sebastian Siewior <[EMAIL PROTECTED]> Beautiful. All applied. Thanks Sebastian! -- Visit Openswan at http://www.openswan.org/ Email: Herber

Re: Fwd: Re: [PATCH] iSCSI fix endieness of digest to be network byte order

2007-11-08 Thread Herbert Xu
On Thu, Nov 08, 2007 at 05:04:09PM +0900, FUJITA Tomonori wrote: > > I wonder why crc32c isn't used directly while crc32 is used directly > since they vary by only the polynomial. It's because iSCSI uses it with scatterlists. The crypto layer provides a nice interface for that while using it dire

Re: Fwd: Re: [PATCH] iSCSI fix endieness of digest to be network byte order

2007-11-08 Thread FUJITA Tomonori
On Thu, 8 Nov 2007 09:18:49 +0800 Herbert Xu <[EMAIL PROTECTED]> wrote: > On Wed, Nov 07, 2007 at 07:04:52PM +, Benny Halevy wrote: > > Am I dreaming (or just sleep deprived ;), or crc32c swabs the crc > > one too many times on big-endian machines when CRC_LE_BITS != 1? > > Your patch looks g

[PATCH] libcrc32c: keep intermediate crc state in cpu order

2007-11-08 Thread Benny Halevy
crypto/crc32.c:chksum_final() is computing the digest as *(__le32 *)out = ~cpu_to_le32(mctx->crc); so the low-level crc32c_le routines should just keep the crc in cpu order, otherwise it is getting swabbed one too many times on big-endian machines. Signed-off-by: Benny Halevy <[EMAIL PROTECTED]> -