diff options
author | “mukeshyadav1984” <mukyadav@cisco.com> | 2017-11-28 10:52:34 -0800 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-11-29 10:18:41 +0000 |
commit | 72454dd4c5196594b366883bbf732c9e067c64ec (patch) | |
tree | 7d3b1398317da09e3cd52cd45fef871857a11a6e /src/vnet/ipsec/esp.h | |
parent | 176fd570e672e7307710e448eb51c08b7f9853d8 (diff) |
DES-CBC/3DES-CBC support for VPP IPSec Core
Change-Id: I876f215b129e5e59d3acc6447ce40458cc341eba
Signed-off-by: “mukeshyadav1984” <mukyadav@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/esp.h')
-rw-r--r-- | src/vnet/ipsec/esp.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/vnet/ipsec/esp.h b/src/vnet/ipsec/esp.h index 82e3c961e1a..10f2f2df88a 100644 --- a/src/vnet/ipsec/esp.h +++ b/src/vnet/ipsec/esp.h @@ -52,6 +52,8 @@ typedef CLIB_PACKED (struct { typedef struct { const EVP_CIPHER *type; + u8 iv_size; + u8 block_size; } ipsec_proto_main_crypto_alg_t; typedef struct @@ -258,6 +260,23 @@ ipsec_proto_init () EVP_aes_192_cbc (); em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_AES_CBC_256].type = EVP_aes_256_cbc (); + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_AES_CBC_128].iv_size = 16; + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_AES_CBC_192].iv_size = 16; + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_AES_CBC_256].iv_size = 16; + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_AES_CBC_128].block_size = + 16; + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_AES_CBC_192].block_size = + 16; + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_AES_CBC_256].block_size = + 16; + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_DES_CBC].type = + EVP_des_cbc (); + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_3DES_CBC].type = + EVP_des_ede3_cbc (); + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_DES_CBC].block_size = 8; + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_3DES_CBC].block_size = 8; + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_DES_CBC].iv_size = 8; + em->ipsec_proto_main_crypto_algs[IPSEC_CRYPTO_ALG_3DES_CBC].iv_size = 8; vec_validate (em->ipsec_proto_main_integ_algs, IPSEC_INTEG_N_ALG - 1); ipsec_proto_main_integ_alg_t *i; |