From bb498ccb1c5d5448fdcb106cacc1ef1bfbc69e16 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Ganne?= Date: Thu, 24 Mar 2022 13:39:22 +0100 Subject: [PATCH] crypto-native: fix index in VAES aes-cbc encrypt MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Type: fix Change-Id: Id7ae0d4c53cbca3785964f0bef92e9cd589d4ce9 Signed-off-by: Benoît Ganne --- src/plugins/crypto_native/aes_cbc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/crypto_native/aes_cbc.c b/src/plugins/crypto_native/aes_cbc.c index 247322dab0d..20b6fd61499 100644 --- a/src/plugins/crypto_native/aes_cbc.c +++ b/src/plugins/crypto_native/aes_cbc.c @@ -317,9 +317,9 @@ more: { #ifdef __VAES__ r[0] = u8x64_xor3 (r[0], aes_block_load_x4 (src, i), k[0][0]); - r[1] = u8x64_xor3 (r[1], aes_block_load_x4 (src, i), k[0][1]); - r[2] = u8x64_xor3 (r[2], aes_block_load_x4 (src, i), k[0][2]); - r[3] = u8x64_xor3 (r[3], aes_block_load_x4 (src, i), k[0][3]); + r[1] = u8x64_xor3 (r[1], aes_block_load_x4 (src + 4, i), k[0][1]); + r[2] = u8x64_xor3 (r[2], aes_block_load_x4 (src + 8, i), k[0][2]); + r[3] = u8x64_xor3 (r[3], aes_block_load_x4 (src + 12, i), k[0][3]); for (j = 1; j < rounds; j++) { -- 2.16.6