From: Herbert Xu <herbert@gondor.apana.org.au>
To: Martin Willi <martin@strongswan.org>
Cc: linux-crypto@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH 00/10] crypto: x86_64 - Add SSE/AVX2 ChaCha20/Poly1305 ciphers
Date: Mon, 13 Jul 2015 15:01:48 +0800 [thread overview]
Message-ID: <20150713070148.GA8430@gondor.apana.org.au> (raw)
In-Reply-To: <1436602552.2882.16.camel@martin>
On Sat, Jul 11, 2015 at 10:15:52AM +0200, Martin Willi wrote:
>
> > If you're going to use sec you need to use at least 10 in order
> > for it to be meaningful as shorter values often result in bogus
> > numbers.
>
> Ok, I'll use sec=10 in v2. There is no fundamental difference compared
> to sec=1 (except for very short blocks):
Thanks.
> Yes, another extreme:
>
> testing speed of cbc(aes) (cbc(aes-aesni)) decryption
> test 0 (128 bit key, 16 byte blocks): 1 operation in 593 cycles (16 bytes)
> test 1 (128 bit key, 64 byte blocks): 1 operation in 1589 cycles (64 bytes)
> test 2 (128 bit key, 256 byte blocks): 1 operation in 5311 cycles (256 bytes)
> test 3 (128 bit key, 1024 byte blocks): 1 operation in 20666 cycles (1024 bytes)
> test 4 (128 bit key, 8192 byte blocks): 1 operation in 161483 cycles (8192 bytes)
> test 5 (192 bit key, 16 byte blocks): 1 operation in 593 cycles (16 bytes)
> test 6 (192 bit key, 64 byte blocks): 1 operation in 1659 cycles (64 bytes)
> test 7 (192 bit key, 256 byte blocks): 1 operation in 5609 cycles (256 bytes)
> test 8 (192 bit key, 1024 byte blocks): 1 operation in 21568 cycles (1024 bytes)
> test 9 (192 bit key, 8192 byte blocks): 1 operation in 172484 cycles (8192 bytes)
> test 10 (256 bit key, 16 byte blocks): 1 operation in 612 cycles (16 bytes)
> test 11 (256 bit key, 64 byte blocks): 1 operation in 1687 cycles (64 bytes)
> test 12 (256 bit key, 256 byte blocks): 1 operation in 5836 cycles (256 bytes)
> test 13 (256 bit key, 1024 byte blocks): 1 operation in 22400 cycles (1024 bytes)
> test 14 (256 bit key, 8192 byte blocks): 1 operation in 177799 cycles (8192 bytes)
>
> testing speed of cbc(aes) (cbc(aes-aesni)) decryption
> test 0 (128 bit key, 16 byte blocks): 1 operation in 1130 cycles (16 bytes)
> test 1 (128 bit key, 64 byte blocks): 1 operation in 3002 cycles (64 bytes)
> test 2 (128 bit key, 256 byte blocks): 1 operation in 10135 cycles (256 bytes)
> test 3 (128 bit key, 1024 byte blocks): 1 operation in 39911 cycles (1024 bytes)
> test 4 (128 bit key, 8192 byte blocks): 1 operation in 308130 cycles (8192 bytes)
> test 5 (192 bit key, 16 byte blocks): 1 operation in 1151 cycles (16 bytes)
> test 6 (192 bit key, 64 byte blocks): 1 operation in 3096 cycles (64 bytes)
> test 7 (192 bit key, 256 byte blocks): 1 operation in 11486 cycles (256 bytes)
> test 8 (192 bit key, 1024 byte blocks): 1 operation in 42155 cycles (1024 bytes)
> test 9 (192 bit key, 8192 byte blocks): 1 operation in 328148 cycles (8192 bytes)
> test 10 (256 bit key, 16 byte blocks): 1 operation in 1186 cycles (16 bytes)
> test 11 (256 bit key, 64 byte blocks): 1 operation in 3260 cycles (64 bytes)
> test 12 (256 bit key, 256 byte blocks): 1 operation in 11909 cycles (256 bytes)
> test 13 (256 bit key, 1024 byte blocks): 1 operation in 44794 cycles (1024 bytes)
> test 14 (256 bit key, 8192 byte blocks): 1 operation in 325349 cycles (8192 bytes)
Weird. I don't see this variance with tcrypt mode=200 at all.
I do however see it with mode=500 but that's probably just telling
us that the async tcrypt code path is buggy.
It'd be good if we can figure out what's going on here.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2015-07-13 7:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 19:36 [PATCH 00/10] crypto: x86_64 - Add SSE/AVX2 ChaCha20/Poly1305 ciphers Martin Willi
2015-07-07 19:36 ` [PATCH 01/10] crypto: tcrypt - Add ChaCha20/Poly1305 speed tests Martin Willi
2015-07-07 19:36 ` [PATCH 02/10] crypto: chacha20 - Export common ChaCha20 helpers Martin Willi
2015-07-07 19:36 ` [PATCH 03/10] crypto: chacha20 - Add a SSSE3 SIMD variant for x86_64 Martin Willi
2015-07-07 19:36 ` [PATCH 04/10] crypto: chacha20 - Add a four block SSSE3 " Martin Willi
2015-07-07 19:36 ` [PATCH 05/10] crypto: chacha20 - Add an eight block AVX2 " Martin Willi
2015-07-07 19:36 ` [PATCH 06/10] crypto: testmgr - Add a longer ChaCha20 test vector Martin Willi
2015-07-07 19:36 ` [PATCH 07/10] crypto: poly1305 - Export common Poly1305 helpers Martin Willi
2015-07-07 19:36 ` [PATCH 08/10] crypto: poly1305 - Add a SSE2 SIMD variant for x86_64 Martin Willi
2015-07-07 19:36 ` [PATCH 09/10] crypto: poly1305 - Add a two block SSE2 " Martin Willi
2015-07-07 19:36 ` [PATCH 10/10] crypto: poly1305 - Add a four block AVX2 " Martin Willi
2015-07-07 22:13 ` [PATCH 00/10] crypto: x86_64 - Add SSE/AVX2 ChaCha20/Poly1305 ciphers Herbert Xu
2015-07-08 20:36 ` Martin Willi
2015-07-08 20:41 ` Herbert Xu
2015-07-11 8:15 ` Martin Willi
2015-07-13 7:01 ` Herbert Xu [this message]
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=20150713070148.GA8430@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=martin@strongswan.org \
--cc=x86@kernel.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