AVX-Optimized SM3 Hashing For The Linux Kernel Nets Up To 38% Improvement
Written by Michael Larabel in Linux Kernel on 20 December 2021 at 05:06 AM EST. 18 Comments
LINUX KERNEL --
An Alibaba engineer is proposing a standalone SM3 crypto library within the Linux kernel and with optimizations for x86_64 AVX usage nets up to a 38% performance improvement for this crypto algorithm.

SM3 is another Chinese hashing function standard for digital signatures and other use-cases similar to SHA256 and part of the Chinese Commercial Cryptography suite. There has been SM3 hashing code in the Linux kernel since 2017 as well as support within Arm's TrustZone CryptoCell "CCREE" driver.

While the use of SM3 within the Linux kernel has been limited, Alibaba has been working to improve the implementation and introduce an AVX-optimized implementation for faster performance on modern Intel and AMD processors.

This patch series provides that updated implementation for this Chinese alternative to SHA256. Benchmarks of the SM3 AVX code on an Intel Skylake processor show up to a 38% performance improvement over the generic path.

At the moment these patches are just residing on the kernel mailing list and haven't yet been queued into the crypto branch for mainlining. Similarly, a few months back Alibaba also provided an AVX2-optimized SM4 block cipher implementation for that Chinese crypto algorithm used within their WLAN WAPI and other domestic purposes.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week