dpdk: ipsec gcm fixes 79/23179/3
authorChristian Hopps <chopps@labn.net>
Sun, 3 Nov 2019 05:02:18 +0000 (01:02 -0400)
committerDamjan Marion <dmarion@me.com>
Thu, 7 Nov 2019 21:39:40 +0000 (21:39 +0000)
commitd58419f19b33560d224471bc16674a525427308e
treeeeb78abb002c0e6d05b64d99280ab31aac989883
parentbc2e640db7533394a3de7bdffd78fadf2a2ffd9f
dpdk: ipsec gcm fixes

- Fix AAD initialization. With use-esn the aad data consists of the SPI
and the 64-bit sequence number in big-endian order. Fix the u32 swapped
code.

- Remove salt-reinitialization. The GCM code seems inspired by the GCM
RFCs recommendations on IKE keydata and how to produce a salt
value (create an extra 4 octets of keying material). This is not IKE
code though and the SA already holds the configured salt value which
this code is blowing away. Use the configured value instead.

Type: fix

Change-Id: I5e75518aa7c1d91037bb24b2a40fe4fc90bdfdb0
Signed-off-by: Christian Hopps <chopps@labn.net>
src/plugins/dpdk/ipsec/esp_decrypt.c
src/plugins/dpdk/ipsec/esp_encrypt.c
src/plugins/dpdk/ipsec/ipsec.c