From 063549f9605c018618670ecb6c5bbbdbedd62c04 Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Wed, 19 Jan 2022 10:09:42 +0100 Subject: crypto: remove VNET_CRYPTO_OP_FLAG_INIT_IV flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IV requirements vary wildly with the selected mode of operation. For example, for AES-CBC the IV must be unpredictable whereas for AES counter mode (CTR or GCM), it can be predictable but reusing an IV with the same key material is catastrophic. Because of that, it is hard to generate IV in a generic way, and it is better left to the crypto user (eg. IPsec). Type: improvement Change-Id: I32689c591d8c6572b8d37c4d24f175ea6132d3ec Signed-off-by: Benoît Ganne --- src/vnet/crypto/crypto.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/vnet/crypto') diff --git a/src/vnet/crypto/crypto.h b/src/vnet/crypto/crypto.h index 8f12a7216b0..0bb5e367f21 100644 --- a/src/vnet/crypto/crypto.h +++ b/src/vnet/crypto/crypto.h @@ -260,9 +260,8 @@ typedef struct vnet_crypto_op_id_t op:16; vnet_crypto_op_status_t status:8; u8 flags; -#define VNET_CRYPTO_OP_FLAG_INIT_IV (1 << 0) -#define VNET_CRYPTO_OP_FLAG_HMAC_CHECK (1 << 1) -#define VNET_CRYPTO_OP_FLAG_CHAINED_BUFFERS (1 << 2) +#define VNET_CRYPTO_OP_FLAG_HMAC_CHECK (1 << 0) +#define VNET_CRYPTO_OP_FLAG_CHAINED_BUFFERS (1 << 1) union { -- cgit 1.2.3-korg