From: Stephan Mueller <smueller@chronox.de>
To: noloader@gmail.com
Cc: linux-crypto@vger.kernel.org
Subject: Re: AES-NI: slower than aes-generic?
Date: Thu, 26 May 2016 20:14:26 +0200 [thread overview]
Message-ID: <48835296.96C5xuvVCT@positron.chronox.de> (raw)
In-Reply-To: <3163610.mmC4VCYNt8@tauon.atsec.com>
Am Donnerstag, 26. Mai 2016, 19:30:01 schrieb Stephan Mueller:
Hi,
>
> However, the key difference to a standard speed test is that I set up a new
> key schedule quite frequently. And I would suspect that something is going
> on here...
With tcrypt, there is some interesting hint: on smaller blocks, the C
implementation is indeed faster:
[ 20.391510]
testing speed of async ecb(aes) (ecb(aes-generic)) encryption
20.391513] test 0 (128 bit key, 16 byte blocks): 1 operation in 275 cycles
(16 bytes)
[ 20.391517] test 1 (128 bit key, 64 byte blocks): 1 operation in 702 cycles
(64 bytes)
[ 20.391521] test 2 (128 bit key, 256 byte blocks): 1 operation in 2431
cycles (256 bytes)
[ 20.391532] test 3 (128 bit key, 1024 byte blocks): 1 operation in 9347
cycles (1024 bytes)
[ 20.391570] test 4 (128 bit key, 8192 byte blocks): 1 operation in 74375
cycles (8192 bytes)
vs for ecb-aes-aesni:
[ 143.482123] test 0 (128 bit key, 16 byte blocks): 1 operation in 1203
cycles (16 bytes)
[ 143.482138] test 1 (128 bit key, 64 byte blocks): 1 operation in 1328
cycles (64 bytes)
[ 143.482148] test 2 (128 bit key, 256 byte blocks): 1 operation in 1922
cycles (256 bytes)
[ 143.482159] test 3 (128 bit key, 1024 byte blocks): 1 operation in 3328
cycles (1024 bytes)
[ 143.482176] test 4 (128 bit key, 8192 byte blocks): 1 operation in 19483
cycles (8192 bytes)
As I use crypto_cipher_encrypt_one, I only send one block at a time to AES-NI.
Ciao
Stephan
next prev parent reply other threads:[~2016-05-26 18:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 16:10 AES-NI: slower than aes-generic? Stephan Mueller
2016-05-26 17:25 ` Jeffrey Walton
2016-05-26 17:30 ` Stephan Mueller
2016-05-26 18:14 ` Stephan Mueller [this message]
2016-05-26 18:20 ` Sandy Harris
2016-05-26 18:49 ` Stephan Mueller
2016-05-26 19:15 ` Sandy Harris
2016-05-27 2:14 ` Theodore Ts'o
2016-05-27 7:08 ` Stephan Mueller
2016-05-27 20:40 ` Jeffrey Walton
2016-06-08 12:21 ` Stephan Mueller
2016-05-28 0:28 ` Aaron Zauner
2016-05-29 19:51 ` Stephan Mueller
2016-05-30 4:08 ` Theodore Ts'o
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=48835296.96C5xuvVCT@positron.chronox.de \
--to=smueller@chronox.de \
--cc=linux-crypto@vger.kernel.org \
--cc=noloader@gmail.com \
/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