diff options
author | Damjan Marion <damarion@cisco.com> | 2020-01-29 10:31:26 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-01-30 10:10:06 +0000 |
commit | 78b58f65f1c94d7a5efbf191b4a6e8b6cc12ae66 (patch) | |
tree | 8bbe3016a856434923f4cbf754be84a8578a3334 /src/plugins/crypto_native/aes_cbc.c | |
parent | 27d12d30cdf5af37fad0e14db0877ca716af2115 (diff) |
crypto-native: don't expand aes-cbc keys twice
Type: refactor
Change-Id: If0d9ec70f9e8c228c39505864a4a73bf94b67479
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/crypto_native/aes_cbc.c')
-rw-r--r-- | src/plugins/crypto_native/aes_cbc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/crypto_native/aes_cbc.c b/src/plugins/crypto_native/aes_cbc.c index c814b13725f..e60f53db92b 100644 --- a/src/plugins/crypto_native/aes_cbc.c +++ b/src/plugins/crypto_native/aes_cbc.c @@ -407,8 +407,7 @@ aesni_cbc_key_exp (vnet_crypto_key_t * key, aes_key_size_t ks) aes_cbc_key_data_t *kd; kd = clib_mem_alloc_aligned (sizeof (*kd), CLIB_CACHE_LINE_BYTES); aes_key_expand (e, key->data, ks); - aes_key_expand (d, key->data, ks); - aes_key_enc_to_dec (d, ks); + aes_key_enc_to_dec (e, d, ks); for (int i = 0; i < AES_KEY_ROUNDS (ks) + 1; i++) { #if __VAES__ |