sm4: accelerate ECB (for benchmarking)
* cipher/sm4.c (_gcry_sm4_ecb_crypt): New. (sm4_setkey): Setup ECB bulk function.
Benchmark on AMD Ryzen 9 7900X:
Before:
SM4 | nanosecs/byte mebibytes/sec cycles/byte auto Mhz
ECB enc | 4.75 ns/B 200.6 MiB/s 26.74 c/B 5625 ECB dec | 4.79 ns/B 199.3 MiB/s 26.92 c/B 5625
After (OCB for reference):
SM4 | nanosecs/byte mebibytes/sec cycles/byte auto Mhz
ECB enc | 0.252 ns/B 3782 MiB/s 1.42 c/B 5624 ECB dec | 0.253 ns/B 3770 MiB/s 1.42 c/B 5625 OCB enc | 0.277 ns/B 3446 MiB/s 1.56 c/B 5625 OCB dec | 0.281 ns/B 3399 MiB/s 1.54 c/B 5500
- GnuPG-bug-id: T6242
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>