Fix SM4-CBC regression on Armv8
authorfangming.fang <fangming.fang@arm.com>
Thu, 8 Dec 2022 10:46:27 +0000 (10:46 +0000)
committerPauli <pauli@openssl.org>
Mon, 12 Dec 2022 22:42:06 +0000 (09:42 +1100)
commitd89e0361d5ff5b32c24edac6c60c5ae38714e6c3
treeeaffec88b2657689297efa6336a2e5db45a00108
parenta5342007e7832cbd427fb62af24998f81d20c5f6
Fix SM4-CBC regression on Armv8

Fixes #19858

During decryption, the last ciphertext is not fed to next block
correctly when the number of input blocks is exactly 4. Fix this
and add the corresponding test cases.

Thanks xu-yi-zhou for reporting this issue and proposing the fix.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19872)
crypto/sm4/asm/vpsm4-armv8.pl
test/recipes/30-test_evp_data/evpciph_sm4.txt