summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-02-10 19:21:14 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-12 15:59:46 +0000
commit062357dc6ef1b632b0fe8001672be76c97637121 (patch)
tree008d62b2371431c3aa3a184a9883da383cb8400d
parent82c4eac772abfaed5e9fef2687bede51f498881a (diff)
ipsec: fix AES-GCM block size
Type: fix Change-Id: I0c9640dab2c0eaba369bc8f3ff7ae56d8e97e170 Signed-off-by: Damjan Marion <damarion@cisco.com> (cherry picked from commit f1ecb6555326f8a7d5bba6f56aa676f064675dc0)
-rw-r--r--src/vnet/ipsec/ipsec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vnet/ipsec/ipsec.c b/src/vnet/ipsec/ipsec.c
index 9f3e1d36507..a84f6d30bde 100644
--- a/src/vnet/ipsec/ipsec.c
+++ b/src/vnet/ipsec/ipsec.c
@@ -361,21 +361,24 @@ ipsec_init (vlib_main_t * vm)
a->enc_op_id = VNET_CRYPTO_OP_AES_128_GCM_ENC;
a->dec_op_id = VNET_CRYPTO_OP_AES_128_GCM_DEC;
a->alg = VNET_CRYPTO_ALG_AES_128_GCM;
- a->iv_size = a->block_size = 8;
+ a->iv_size = 8;
+ a->block_size = 16;
a->icv_size = 16;
a = im->crypto_algs + IPSEC_CRYPTO_ALG_AES_GCM_192;
a->enc_op_id = VNET_CRYPTO_OP_AES_192_GCM_ENC;
a->dec_op_id = VNET_CRYPTO_OP_AES_192_GCM_DEC;
a->alg = VNET_CRYPTO_ALG_AES_192_GCM;
- a->iv_size = a->block_size = 8;
+ a->iv_size = 8;
+ a->block_size = 16;
a->icv_size = 16;
a = im->crypto_algs + IPSEC_CRYPTO_ALG_AES_GCM_256;
a->enc_op_id = VNET_CRYPTO_OP_AES_256_GCM_ENC;
a->dec_op_id = VNET_CRYPTO_OP_AES_256_GCM_DEC;
a->alg = VNET_CRYPTO_ALG_AES_256_GCM;
- a->iv_size = a->block_size = 8;
+ a->iv_size = 8;
+ a->block_size = 16;
a->icv_size = 16;
vec_validate (im->integ_algs, IPSEC_INTEG_N_ALG - 1);