Re: [RFC 2/7] crypto: Use GHASH digest algorithm in GCM

2009-06-21 Thread Herbert Xu
On Mon, Jun 22, 2009 at 10:07:27AM +0800, Huang Ying wrote: > > Oh, I see. I will do this. Just to be clear, it should be added to gcm_base, not gcm. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http:

Re: [RFC 2/7] crypto: Use GHASH digest algorithm in GCM

2009-06-21 Thread Huang Ying
On Mon, 2009-06-22 at 10:03 +0800, Herbert Xu wrote: > On Mon, Jun 22, 2009 at 09:41:16AM +0800, Huang Ying wrote: > > > > Can crypto_alloc_ahash("ghash",...) select among different ghash > > implementation automatically based on priority? I think > > crypto_alloc_ablkcipher("cbc(aes)",...) can sel

Re: [RFC 2/7] crypto: Use GHASH digest algorithm in GCM

2009-06-21 Thread Herbert Xu
On Mon, Jun 22, 2009 at 09:41:16AM +0800, Huang Ying wrote: > > Can crypto_alloc_ahash("ghash",...) select among different ghash > implementation automatically based on priority? I think > crypto_alloc_ablkcipher("cbc(aes)",...) can select among different AES > implementation automatically. They ar

Re: [RFC 2/7] crypto: Use GHASH digest algorithm in GCM

2009-06-21 Thread Huang Ying
On Sun, 2009-06-21 at 21:46 +0800, Herbert Xu wrote: > Huang Ying wrote: > > > > + ghash = crypto_alloc_ahash("ghash", 0, 0); > > + if (IS_ERR(ghash)) > > + return PTR_ERR(ghash); > > We should add this as an extra parameter to gcm_base. This is > so that the user can s

Re: [RFC 2/7] crypto: Use GHASH digest algorithm in GCM

2009-06-21 Thread Herbert Xu
Huang Ying wrote: > > + ghash = crypto_alloc_ahash("ghash", 0, 0); > + if (IS_ERR(ghash)) > + return PTR_ERR(ghash); We should add this as an extra parameter to gcm_base. This is so that the user can select an alternative ghash implementation. Cheers, -- Visit Openswa

Re: [RFC 2/7] crypto: Use GHASH digest algorithm in GCM

2009-06-17 Thread Huang Ying
On Thu, 2009-06-18 at 04:47 +0800, Sebastian Andrzej Siewior wrote: > * Huang Ying | 2009-06-11 15:10:28 [+0800]: > > >Remove the dedicated GHASH implementation in GCM, and uses the GHASH > >digest algorithm instead. This will make GCM uses hardware accelerated > >GHASH implementation automaticall

Re: [RFC 2/7] crypto: Use GHASH digest algorithm in GCM

2009-06-17 Thread Sebastian Andrzej Siewior
* Huang Ying | 2009-06-11 15:10:28 [+0800]: >Remove the dedicated GHASH implementation in GCM, and uses the GHASH >digest algorithm instead. This will make GCM uses hardware accelerated >GHASH implementation automatically if available. > >ahash instead of shash interface is used, because some hard