]> git.ipfire.org Git - thirdparty/openssl.git/commit
optimize ossl_sm4_set_key speed
authorzhangzhilei <zhangzhilei@360.cn>
Sat, 24 Sep 2022 02:32:36 +0000 (10:32 +0800)
committerTomas Mraz <tomas@openssl.org>
Wed, 23 Nov 2022 17:21:54 +0000 (18:21 +0100)
commit69bcdb7dcdfc5bcfa47075f8e26be017fe6b17d1
tree3b58524492ae6f95f4f818dbbecd44bd9cbba6f5
parent10c2f19420e69a4b8baa19f79ceba61d04147c9f
optimize ossl_sm4_set_key speed

this optimization comes from libgcrypt, increse about 48% speed

Benchmark on my AMD Ryzen Threadripper 3990X

before:
Did 5752000 SM4 setup operations in 1000151us (5751131.6 ops/sec)
after:
Did 8506000 SM4 setup operations in 1000023us (8505804.4 ops/sec)

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19270)

(cherry picked from commit 704e8090b4a789f52af07de9a3ebbe11db8e19f8)
crypto/sm4/sm4.c