Re: [BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv

2009-08-14 Thread Artem Bityutskiy
On Fri, 2009-08-14 at 23:02 +1000, Herbert Xu wrote: > diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c > index 03fb5fa..f6f0833 100644 > --- a/crypto/ablkcipher.c > +++ b/crypto/ablkcipher.c > @@ -183,6 +183,12 @@ EXPORT_SYMBOL_GPL(crypto_givcipher_type); > > const char *crypto_default_ge

Re: [BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv

2009-08-14 Thread Herbert Xu
On Thu, Aug 13, 2009 at 11:12:53PM +1000, Herbert Xu wrote: > > Actually we can't use seqiv on raw counter mode because it cannot > guarantee IV uniqueness. I think reverting to chainiv is the safer > option. In fact this is needed by all stream ciphers, not just ctr. commit 63b5ac286d5d7f668da

Re: [BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv

2009-08-13 Thread Herbert Xu
On Fri, Aug 14, 2009 at 09:01:07AM +0800, Huang Ying wrote: > > I see seqiv is used in rfc3686 mode, it means seqiv can not be used on > raw counter mode but can be used for rfc3686? Yeah, with rfc3686 a portion of the counter is available for counting bytes within each request. This allows a seq

Re: [BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv

2009-08-13 Thread Huang Ying
On Thu, 2009-08-13 at 21:12 +0800, Herbert Xu wrote: > On Thu, Aug 13, 2009 at 05:39:10PM +1000, Herbert Xu wrote: > > > > Oh I see what's going on. It's the switch from chainiv to eseqiv > > that created the error. I'll apply your patch. > > Actually we can't use seqiv on raw counter mode beca

Re: [BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv

2009-08-13 Thread Herbert Xu
On Thu, Aug 13, 2009 at 05:39:10PM +1000, Herbert Xu wrote: > > Oh I see what's going on. It's the switch from chainiv to eseqiv > that created the error. I'll apply your patch. Actually we can't use seqiv on raw counter mode because it cannot guarantee IV uniqueness. I think reverting to chai

Re: [BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv

2009-08-13 Thread Herbert Xu
On Thu, Aug 13, 2009 at 02:53:00PM +1000, Herbert Xu wrote: > > I'll look into it. Oh I see what's going on. It's the switch from chainiv to eseqiv that created the error. I'll apply your patch. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http

Re: [BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv

2009-08-12 Thread Herbert Xu
On Wed, Aug 12, 2009 at 10:27:00AM +0800, Huang Ying wrote: > > Any follow-up for this patch? Still can not re-produce? I can now that I'm on a 32-bit machine. I wonder if it's 32-bit specific or perhaps I was just using an old kernel. I'll look into it. Cheers, -- Visit Openswan at http://www

Re: [BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv

2009-08-11 Thread Huang Ying
On Thu, 2009-08-06 at 10:12 +0800, Huang Ying wrote: > On Wed, 2009-08-05 at 17:45 +0800, Herbert Xu wrote: > > On Mon, Aug 03, 2009 at 03:44:43PM +0800, Huang Ying wrote: > > > When doing "modeprobe tcrypt mode=10", the following error will show > > > in dmesg. > > > > > > alg: skcipher: Failed t

Re: [BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv

2009-08-05 Thread Huang Ying
On Wed, 2009-08-05 at 17:45 +0800, Herbert Xu wrote: > On Mon, Aug 03, 2009 at 03:44:43PM +0800, Huang Ying wrote: > > When doing "modeprobe tcrypt mode=10", the following error will show > > in dmesg. > > > > alg: skcipher: Failed to load transform for ctr(aes): -22 > > alg: skcipher: Failed to l

Re: [BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv

2009-08-05 Thread Herbert Xu
On Mon, Aug 03, 2009 at 03:44:43PM +0800, Huang Ying wrote: > When doing "modeprobe tcrypt mode=10", the following error will show > in dmesg. > > alg: skcipher: Failed to load transform for ctr(aes): -22 > alg: skcipher: Failed to load transform for ctr(aes): -22 > tcrypt: one or more tests faile

[BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv

2009-08-03 Thread Huang Ying
When doing "modeprobe tcrypt mode=10", the following error will show in dmesg. alg: skcipher: Failed to load transform for ctr(aes): -22 alg: skcipher: Failed to load transform for ctr(aes): -22 tcrypt: one or more tests failed! Because ctr(aes) testing code will allocate ctr(aes) with geniv, but