linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Introduce x86 assembly accelerated implementation for SM3 algorithm
@ 2021-12-20  8:22 Tianjia Zhang
  2021-12-20  8:22 ` [PATCH 1/6] crypto: sm3 - create SM3 stand-alone library Tianjia Zhang
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Tianjia Zhang @ 2021-12-20  8:22 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Vitaly Chikunov, Eric Biggers,
	Eric Biggers, Gilad Ben-Yossef, Ard Biesheuvel, Jussi Kivilinna,
	Catalin Marinas, Will Deacon, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin, linux-crypto, x86,
	linux-arm-kernel, linux-kernel
  Cc: Tianjia Zhang

This series of patches creates an stand-alone library for SM3 hash
algorithm in the lib/crypto directory, and makes the implementations
that originally depended on sm3-generic depend on the stand-alone SM3
library, which also includes sm3-generic itself.

On this basis, the AVX assembly acceleration implementation of SM3
algorithm is introduced, the main algorithm implementation based on
SM3 AES/BMI2 accelerated work by libgcrypt at:
https://gnupg.org/software/libgcrypt/index.html

From the performance benchmark data, the performance improvement of
SM3 algorithm after AVX optimization can reach up to 38%.

Tianjia Zhang (6):
  crypto: sm3 - create SM3 stand-alone library
  crypto: arm64/sm3-ce - make dependent on sm3 library
  crypto: sm2 - make dependent on sm3 library
  crypto: sm3 - make dependent on sm3 library
  crypto: x86/sm3 - add AVX assembly implementation
  crypto: tcrypt - add asynchronous speed test for SM3

 arch/arm64/crypto/Kconfig        |   2 +-
 arch/arm64/crypto/sm3-ce-glue.c  |  20 +-
 arch/x86/crypto/Makefile         |   3 +
 arch/x86/crypto/sm3-avx-asm_64.S | 521 +++++++++++++++++++++++++++++++
 arch/x86/crypto/sm3_avx_glue.c   | 134 ++++++++
 crypto/Kconfig                   |  16 +-
 crypto/sm2.c                     |  36 +--
 crypto/sm3_generic.c             | 142 +--------
 crypto/tcrypt.c                  |  14 +-
 include/crypto/sm3.h             |  35 ++-
 lib/crypto/Kconfig               |   3 +
 lib/crypto/Makefile              |   3 +
 lib/crypto/sm3.c                 | 246 +++++++++++++++
 13 files changed, 1010 insertions(+), 165 deletions(-)
 create mode 100644 arch/x86/crypto/sm3-avx-asm_64.S
 create mode 100644 arch/x86/crypto/sm3_avx_glue.c
 create mode 100644 lib/crypto/sm3.c

-- 
2.32.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-12-21  7:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20  8:22 [PATCH 0/6] Introduce x86 assembly accelerated implementation for SM3 algorithm Tianjia Zhang
2021-12-20  8:22 ` [PATCH 1/6] crypto: sm3 - create SM3 stand-alone library Tianjia Zhang
2021-12-20  8:22 ` [PATCH 2/6] crypto: arm64/sm3-ce - make dependent on sm3 library Tianjia Zhang
2021-12-20  8:22 ` [PATCH 3/6] crypto: sm2 " Tianjia Zhang
2021-12-20  8:22 ` [PATCH 4/6] crypto: sm3 " Tianjia Zhang
2021-12-20  8:22 ` [PATCH 5/6] crypto: x86/sm3 - add AVX assembly implementation Tianjia Zhang
2021-12-20 18:03   ` Jussi Kivilinna
2021-12-21  7:39     ` Tianjia Zhang
2021-12-20  8:22 ` [PATCH 6/6] crypto: tcrypt - add asynchronous speed test for SM3 Tianjia Zhang

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).