Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Francis Moreau
On 4/17/07, Herbert Xu <[EMAIL PROTECTED]> wrote: On Mon, Apr 16, 2007 at 10:37:01AM +0200, Francis Moreau wrote: > > BTW, here are figures I got with 2 different versions of the driver > when using tcrypt module. The second being the result with the > optimized driver (no key reloading on each b

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Evgeniy Polyakov
On Tue, Apr 17, 2007 at 04:01:51PM +0200, Francis Moreau ([EMAIL PROTECTED]) wrote: > On 4/17/07, Herbert Xu <[EMAIL PROTECTED]> wrote: > > > >Yep. We don't need such a flag anyway. All we need is a way to tweak > >the priority and Bob's your uncle. > > > > Could you elaborate please, I don't s

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Francis Moreau
On 4/17/07, Evgeniy Polyakov <[EMAIL PROTECTED]> wrote: > OK, I tried to cook up something very simple. Since I don't know this > code, please be indulgent when reading the following patch ;) Which means that after one has loaded ecryptfs module it can not use ipsec and dm-crypt if there is only

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Francis Moreau
On 4/17/07, Evgeniy Polyakov <[EMAIL PROTECTED]> wrote: If there are another users, then flag should not be set. depends if there's a 'generic' algo that can be used at the same time. Admin should know that. If there are no another users, your code already has exclusive access. sorry I don

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Francis Moreau
On 4/17/07, Evgeniy Polyakov <[EMAIL PROTECTED]> wrote: On Tue, Apr 17, 2007 at 04:01:51PM +0200, Francis Moreau ([EMAIL PROTECTED]) wrote: > On 4/17/07, Herbert Xu <[EMAIL PROTECTED]> wrote: > > > >Yep. We don't need such a flag anyway. All we need is a way to tweak > >the priority and Bob's

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Roland Dreier
> Again, my code is faster only because I skip the key loading in > "cia_encrypt" method. Actually the gain is bigger in decryption mode > than in encryption one because I also generate the decryption key for > each block. I wonder if there's some way you can cache the last caller and reloa

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Evgeniy Polyakov
On Tue, Apr 17, 2007 at 05:34:12PM +0200, Francis Moreau ([EMAIL PROTECTED]) wrote: > >Preventing anyone from using the module is incorrect. > >How will you handle the case when you have only one algo registered and > >it will be exclusively used by ecryptfs? > > > > As I tried to explain, in tha

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Roland Dreier
> > I wonder if there's some way you can cache the last caller and reload > > the key lazily (only when it changes). > > yes something that allows crypto drivers to detect if the key has > changed would be good. It seems trivial to keep the last key you were given and do a quick memcmp in yo

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Herbert Xu
Francis Moreau <[EMAIL PROTECTED]> wrote: > >> > normal version: >> > test 4 (128 bit key, 8192 byte blocks): 1 operation in 67991 cycles (8192 >> > bytes) >> > >> > optimized version: >> > test 4 (128 bit key, 8192 byte blocks): 1 operation in 51783 cycles (8192 >> > bytes) >> > >> > So the gain i

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Herbert Xu
Francis Moreau <[EMAIL PROTECTED]> wrote: > On 4/17/07, Herbert Xu <[EMAIL PROTECTED]> wrote: >> >> Actually, I was referring to your AES module :) > > Well I don't if I can do that unfortunately. What's the problem? > Actually there's nothing really interesting in this code, only key or > acc l

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Francis Moreau
On 4/17/07, Herbert Xu <[EMAIL PROTECTED]> wrote: Yep. We don't need such a flag anyway. All we need is a way to tweak the priority and Bob's your uncle. Could you elaborate please, I don't see how you prevent others users to use this module with priority. Priority is a stuff that tells yo

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Francis Moreau
On 4/17/07, Herbert Xu <[EMAIL PROTECTED]> wrote: Actually, I was referring to your AES module :) Well I don't if I can do that unfortunately. Actually there's nothing really interesting in this code, only key or acc loadings and that's it. What do you want to see exactly ? Thanks -- Franc

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Evgeniy Polyakov
On Tue, Apr 17, 2007 at 02:36:09PM +0200, Francis Moreau ([EMAIL PROTECTED]) wrote: > >> BTW, here are figures I got with 2 different versions of the driver > >> when using tcrypt module. The second being the result with the > >> optimized driver (no key reloading on each block): > >> > >> normal

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Francis Moreau
On 4/17/07, Roland Dreier <[EMAIL PROTECTED]> wrote: > Again, my code is faster only because I skip the key loading in > "cia_encrypt" method. Actually the gain is bigger in decryption mode > than in encryption one because I also generate the decryption key for > each block. I wonder if ther

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Herbert Xu
Evgeniy Polyakov <[EMAIL PROTECTED]> wrote: > >> OK, I tried to cook up something very simple. Since I don't know this >> code, please be indulgent when reading the following patch ;) > > Which means that after one has loaded ecryptfs module it can not use > ipsec and dm-crypt if there is only one

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Francis Moreau
On 4/17/07, Herbert Xu <[EMAIL PROTECTED]> wrote: Francis Moreau <[EMAIL PROTECTED]> wrote: > On 4/17/07, Herbert Xu <[EMAIL PROTECTED]> wrote: >> >> Actually, I was referring to your AES module :) > > Well I don't if I can do that unfortunately. What's the problem? Always the same problem. S

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Evgeniy Polyakov
On Tue, Apr 17, 2007 at 06:18:42PM +0200, Francis Moreau ([EMAIL PROTECTED]) wrote: > >If there are no another users, your code already has exclusive access. > > sorry I don't understand that. Since there are no users except your module, you do have exclusive access already, i.e. you can stop ke

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Francis Moreau
On 4/17/07, Roland Dreier <[EMAIL PROTECTED]> wrote: > > I wonder if there's some way you can cache the last caller and reload > > the key lazily (only when it changes). > > yes something that allows crypto drivers to detect if the key has > changed would be good. It seems trivial to keep t

Re: [CRYPTO] is it really optimized ?

2007-04-17 Thread Roland Dreier
> > It seems trivial to keep the last key you were given and do a quick > > memcmp in your setkey method to see if it's different from the last > > key you pushed to hardware, and set a flag if it is. Then only do > > your set_key() if you have a new key to pass to hardware. > > > > I'm assu

[PATCH] crypto: convert "crypto" subdirectory to UTF-8

2007-04-17 Thread John Anthony Kazos Jr.
From: John Anthony Kazos Jr. <[EMAIL PROTECTED]> Convert the subdirectory "crypto" to UTF-8. The files changed are and . Signed-off-by: John Anthony Kazos Jr. <[EMAIL PROTECTED]> --- I can't get my mail client to send in ISO-8859-1 instead of UTF-8, so the actual patch is attached in octet-s