linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andre Hedrick <andre@linux-ide.org>
To: Jari Ruusu <jari.ruusu@pp.inet.fi>
Cc: Christoph Hellwig <hch@infradead.org>,
	Chris Friesen <cfriesen@nortelnetworks.com>,
	Andrew Morton <akpm@osdl.org>,
	Andries.Brouwer@cwi.nl, akpm@digeo.com,
	linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: [PATCH] cryptoloop
Date: Sat, 5 Jul 2003 02:10:00 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.10.10307050202100.21771-100000@master.linux-ide.org> (raw)
In-Reply-To: <3F068F49.1883BE0D@pp.inet.fi>


Jari,

Word of advice from somebody who has been down this road.
Repatch and add in a dual path select, this will provide a security
blanket for the folks who do not understand the entire scope.

Cheers,

Andre Hedrick
LAD Storage Consulting Group

On Sat, 5 Jul 2003, Jari Ruusu wrote:

> Christoph Hellwig wrote:
> > On Fri, Jul 04, 2003 at 10:43:10AM +0300, Jari Ruusu wrote:
> > > Changing transfer function prototype may be a tiny speed improvement for one
> > > implementation that happens to use unoptimal API, but at same time be tiny
> > > speed degration to other implementations that use more saner APIs. I am
> > > unhappy with that change, because I happen to maintain four such transfers
> > > that would be subject to tiny speed degration.
> > 
> > You've so far only made ubacked claims in this thread.  Show the
> > numbers and tell us why your implementation is faster and show the
> > numbers and explain why this change should make your module slower.
> 
> I haven't seen the modified transfer function yet, so no test data on speed
> difference yet. Notice that I said "tiny speed degration". Tiny in this
> context may well mean unmeasurable small. However, it will add mode code to
> optimized implementation. More code == tiny bit slower.
> 
> Loop code in loop-AES does not have any significant speed advantage over
> mainline loop. Most significant advantage that loop-AES' loop code has over
> mainline, is that it includes a ton of bug fixes still missing from mainline
> loop. Loop-AES' speed advantage comes from optimized AES-only transfer
> function that does the CBC stuff and directly calls highly optimized AES
> implementation without any CryptoAPI overhead. IOW, it does loop -> transfer
> -> AES with all unnecessary crap removed. I am complaining because you guys
> are about to add unnecessary crap to loop -> transfer interface.
> 
> Following tests were run in userspace on my 300 MHz Pentium-2 test box, and
> were compiled using Debian woody gcc "version 2.95.4 20011002 (Debian
> prerelease)" with these compiler flags: -O2 -Wall -march=i686
> -mpreferred-stack-boundary=2 -fomit-frame-pointer
> 
> This tests only low level cipher functions aes_encrypt() and aes_decrypt()
> from linux-2.5.74/crypto/aes.c with all CryptoAPI overhead removed. In real
> use, including CryptoAPI overhead, these numbers should be a little bit
> smaller.
> 
> key length 128 bits, encrypt speed 68.5 Mbits/sec
> key length 128 bits, decrypt speed 58.9 Mbits/sec
> key length 192 bits, encrypt speed 58.3 Mbits/sec
> key length 192 bits, decrypt speed 50.3 Mbits/sec
> key length 256 bits, encrypt speed 51.0 Mbits/sec
> key length 256 bits, decrypt speed 43.8 Mbits/sec
> 
> This tests aes_encrypt() and aes_decrypt() from loop-AES-v1.7d/aes-i586.S
> Most users running loop-AES on modern x86 boxes get to use this code
> automatically.
> 
> key length 128 bits, encrypt speed 129.6 Mbits/sec
> key length 128 bits, decrypt speed 131.3 Mbits/sec
> key length 192 bits, encrypt speed 113.0 Mbits/sec
> key length 192 bits, decrypt speed 111.7 Mbits/sec
> key length 256 bits, encrypt speed 96.2 Mbits/sec
> key length 256 bits, decrypt speed 97.5 Mbits/sec
> 
> This tests aes_encrypt() and aes_decrypt() from loop-AES-v1.7d/aes.c
> Loop-AES users running non-x86 kernels or x86 configured for i386/i486 will
> run this version.
> 
> key length 128 bits, encrypt speed 81.2 Mbits/sec
> key length 128 bits, decrypt speed 83.4 Mbits/sec
> key length 192 bits, encrypt speed 68.5 Mbits/sec
> key length 192 bits, decrypt speed 70.6 Mbits/sec
> key length 256 bits, encrypt speed 58.9 Mbits/sec
> key length 256 bits, decrypt speed 60.9 Mbits/sec
> 
> > Either try to help improving what's in the tree or shut up.
> 
> I have posted patches to be included in mainline. Fixes are available, and
> if they are not merged, then so be it. If fixes are not merged to mainline,
> they will be maintained outside of mainline so people who need them can
> actually use them. It is not really my failt that mainline people seem to
> prefer buggy loop and slow loop crypto.
> 
> Regards,
> Jari Ruusu <jari.ruusu@pp.inet.fi>
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


  parent reply	other threads:[~2003-07-05  9:00 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-02 18:44 [PATCH] cryptoloop Andries.Brouwer
2003-07-02 19:02 ` Andrew Morton
2003-07-02 19:16   ` Linus Torvalds
2003-07-02 19:20     ` Andrew Morton
2003-07-02 19:31       ` Linus Torvalds
2003-07-03 11:21 ` Jari Ruusu
2003-07-03 15:20   ` Andrew Morton
2003-07-03 17:29     ` Jari Ruusu
2003-07-03 17:38       ` Chris Friesen
2003-07-04  7:43         ` Jari Ruusu
2003-07-04  8:44           ` Andrew Morton
2003-07-04  9:41           ` Christoph Hellwig
2003-07-05  8:41             ` Jari Ruusu
2003-07-05  8:58               ` Andrew Morton
2003-07-05  9:00                 ` Andre Hedrick
2003-07-05  9:10               ` Andre Hedrick [this message]
2003-07-05 17:16               ` James Morris
2003-07-05 17:20               ` Linus Torvalds
2003-07-08 12:43               ` Christoph Hellwig
2003-07-04  9:39       ` Christoph Hellwig
2003-07-03 16:20 ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2003-07-04 13:21 Andries.Brouwer
2003-07-04 13:28 ` Christoph Hellwig
2003-07-04 11:08 Andries.Brouwer
2003-07-04 12:13 ` Christoph Hellwig
2003-07-03 16:25 Andries.Brouwer
2003-07-03 16:31 ` Christoph Hellwig
2003-07-02 22:57 Andries.Brouwer
2003-07-02 22:27 Andries.Brouwer
2003-07-02 21:00 Andries.Brouwer
2003-07-02 21:06 ` Greg KH
2003-07-02 21:31 ` Andrew Morton
2003-07-03 16:23 ` Christoph Hellwig
2003-07-02 19:42 Andries.Brouwer
2003-07-02 19:58 ` Andrew Morton
2003-07-02 15:21 Andries.Brouwer
2003-07-02 17:16 ` Andrew Morton
2003-07-03 15:44 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.10.10307050202100.21771-100000@master.linux-ide.org \
    --to=andre@linux-ide.org \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=akpm@digeo.com \
    --cc=akpm@osdl.org \
    --cc=cfriesen@nortelnetworks.com \
    --cc=hch@infradead.org \
    --cc=jari.ruusu@pp.inet.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).