From: Taehee Yoo <ap420073@gmail.com>
To: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au,
davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com,
x86@kernel.org, jussi.kivilinna@iki.fi
Cc: ap420073@gmail.com
Subject: [PATCH v2 0/3] crypto: aria: implement aria-avx2 and aria-avx512
Date: Sat, 5 Nov 2022 08:20:18 +0000 [thread overview]
Message-ID: <20221105082021.17997-1-ap420073@gmail.com> (raw)
This patchset is to implement aria-avx2 and aria-avx512.
There are some differences between aria-avx, aria-avx2, and aria-avx512,
but they are not core logic(s-box, diffusion layer).
ARIA-AVX2
It supports 32way parallel processing using 256bit registers.
Like ARIA-AVX, it supports both AES-NI based s-box layer algorithm and
GFNI based s-box layer algorithm.
These algorithms are the same as ARIA-AVX except that AES-NI doesn't
support 256bit registers, so it is used twice.
ARIA-AVX512
It supports 64way parallel processing using 512bit registers.
It supports only GFNI based s-box layer algorithm.
Benchmarks with i3-12100
commands: modprobe tcrypt mode=610 num_mb=8192
ARIA-AVX512(128bit and 256bit)
testing speed of multibuffer ecb(aria) (ecb-aria-avx512) encryption
tcrypt: 1 operation in 1504 cycles (1024 bytes)
tcrypt: 1 operation in 4595 cycles (4096 bytes)
tcrypt: 1 operation in 1763 cycles (1024 bytes)
tcrypt: 1 operation in 5540 cycles (4096 bytes)
testing speed of multibuffer ecb(aria) (ecb-aria-avx512) decryption
tcrypt: 1 operation in 1502 cycles (1024 bytes)
tcrypt: 1 operation in 4615 cycles (4096 bytes)
tcrypt: 1 operation in 1759 cycles (1024 bytes)
tcrypt: 1 operation in 5554 cycles (4096 bytes)
ARIA-AVX2 with GFNI(128bit and 256bit)
testing speed of multibuffer ecb(aria) (ecb-aria-avx2) encryption
tcrypt: 1 operation in 2003 cycles (1024 bytes)
tcrypt: 1 operation in 5867 cycles (4096 bytes)
tcrypt: 1 operation in 2358 cycles (1024 bytes)
tcrypt: 1 operation in 7295 cycles (4096 bytes)
testing speed of multibuffer ecb(aria) (ecb-aria-avx2) decryption
tcrypt: 1 operation in 2004 cycles (1024 bytes)
tcrypt: 1 operation in 5956 cycles (4096 bytes)
tcrypt: 1 operation in 2409 cycles (1024 bytes)
tcrypt: 1 operation in 7564 cycles (4096 bytes)
ARIA-AVX with GFNI(128bit and 256bit)
testing speed of multibuffer ecb(aria) (ecb-aria-avx) encryption
tcrypt: 1 operation in 2761 cycles (1024 bytes)
tcrypt: 1 operation in 9390 cycles (4096 bytes)
tcrypt: 1 operation in 3401 cycles (1024 bytes)
tcrypt: 1 operation in 11876 cycles (4096 bytes)
testing speed of multibuffer ecb(aria) (ecb-aria-avx) decryption
tcrypt: 1 operation in 2735 cycles (1024 bytes)
tcrypt: 1 operation in 9424 cycles (4096 bytes)
tcrypt: 1 operation in 3369 cycles (1024 bytes)
tcrypt: 1 operation in 11954 cycles (4096 bytes)
v2:
- Add new "add keystream array into struct aria_ctx" patch.
- Use keystream array in the aria_ctx instead of stack memory
Taehee Yoo (3):
crypto: aria: add keystream array into struct aria_ctx
crypto: aria: implement aria-avx2
crypto: aria: implement aria-avx512
arch/x86/crypto/Kconfig | 38 +
arch/x86/crypto/Makefile | 6 +
arch/x86/crypto/aria-aesni-avx2-asm_64.S | 1436 +++++++++++++++++++++
arch/x86/crypto/aria-avx.h | 41 +-
arch/x86/crypto/aria-gfni-avx512-asm_64.S | 1023 +++++++++++++++
arch/x86/crypto/aria_aesni_avx2_glue.c | 236 ++++
arch/x86/crypto/aria_aesni_avx_glue.c | 30 +-
arch/x86/crypto/aria_gfni_avx512_glue.c | 232 ++++
include/crypto/aria.h | 24 +
9 files changed, 3051 insertions(+), 15 deletions(-)
create mode 100644 arch/x86/crypto/aria-aesni-avx2-asm_64.S
create mode 100644 arch/x86/crypto/aria-gfni-avx512-asm_64.S
create mode 100644 arch/x86/crypto/aria_aesni_avx2_glue.c
create mode 100644 arch/x86/crypto/aria_gfni_avx512_glue.c
--
2.17.1
next reply other threads:[~2022-11-05 8:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 8:20 Taehee Yoo [this message]
2022-11-05 8:20 ` [PATCH v2 1/3] crypto: aria: add keystream array into struct aria_ctx Taehee Yoo
2022-11-05 8:20 ` [PATCH v2 2/3] crypto: aria: implement aria-avx2 Taehee Yoo
2022-11-05 8:20 ` [PATCH v2 3/3] crypto: aria: implement aria-avx512 Taehee Yoo
2022-11-05 16:20 ` Elliott, Robert (Servers)
2022-11-05 17:31 ` Dave Hansen
2022-11-06 7:07 ` Taehee Yoo
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=20221105082021.17997-1-ap420073@gmail.com \
--to=ap420073@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=jussi.kivilinna@iki.fi \
--cc=linux-crypto@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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;
as well as URLs for NNTP newsgroup(s).