From: Benoît Ganne Date: Thu, 24 Mar 2022 12:39:22 +0000 (+0100) Subject: crypto-native: fix index in VAES aes-cbc encrypt X-Git-Tag: v22.10-rc0~211 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=bb498ccb1c5d5448fdcb106cacc1ef1bfbc69e16;p=vpp.git crypto-native: fix index in VAES aes-cbc encrypt Type: fix Change-Id: Id7ae0d4c53cbca3785964f0bef92e9cd589d4ce9 Signed-off-by: Benoît Ganne --- 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++) {