]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: sm4 - create SM4 library based on sm4 generic code
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Tue, 20 Jul 2021 03:46:39 +0000 (11:46 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Jul 2021 02:58:30 +0000 (10:58 +0800)
commit7f34ce07a00abfde28cb91f98e6d72955f70e884
tree198253c3073b746bd7e3e0921d8e16647695bff5
parent289c92bd0bed513fb8f63954b98a93e59ebea7d9
crypto: sm4 - create SM4 library based on sm4 generic code

Take the existing small footprint and mostly time invariant C code
and turn it into a SM4 library that can be used for non-performance
critical, casual use of SM4, and as a fallback for, e.g., SIMD code
that needs a secondary path that can be taken in contexts where the
SIMD unit is off limits.

Secondly, some codes have been optimized, such as unrolling small
times loop, removing unnecessary memory shifts, exporting sbox, fk,
ck arrays, and basic encryption and decryption functions.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/Kconfig
crypto/sm4_generic.c
include/crypto/sm4.h
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/sm4.c [new file with mode: 0644]