diff mbox series

[05/26] crypto: Add new cipher definitions

Message ID 20221021191307.31492-5-denkenz@gmail.com (mailing list archive)
State New
Headers show
Series [01/26] eapol: More strictly validate key_descriptor_version | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

Denis Kenzior Oct. 21, 2022, 7:12 p.m. UTC
---
 src/crypto.c | 8 ++++++++
 src/crypto.h | 6 ++++++
 2 files changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/src/crypto.c b/src/crypto.c
index 89e315df6a36..840d9ee4dd5b 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -500,9 +500,17 @@  int crypto_cipher_key_len(enum crypto_cipher cipher)
 	case CRYPTO_CIPHER_TKIP:
 		return 32;
 	case CRYPTO_CIPHER_CCMP:
+	case CRYPTO_CIPHER_GCMP:
 		return 16;
+	case CRYPTO_CIPHER_CCMP_256:
+	case CRYPTO_CIPHER_GCMP_256:
+		return 32;
 	case CRYPTO_CIPHER_BIP_CMAC:
+	case CRYPTO_CIPHER_BIP_GMAC:
 		return 16;
+	case CRYPTO_CIPHER_BIP_CMAC_256:
+	case CRYPTO_CIPHER_BIP_GMAC_256:
+		return 32;
 	}
 
 	return 0;
diff --git a/src/crypto.h b/src/crypto.h
index b2cd8839aa77..ed430abb00d8 100644
--- a/src/crypto.h
+++ b/src/crypto.h
@@ -31,6 +31,12 @@  enum crypto_cipher {
 	CRYPTO_CIPHER_TKIP = 0x000fac02,
 	CRYPTO_CIPHER_CCMP = 0x000fac04,
 	CRYPTO_CIPHER_BIP_CMAC = 0x000fac06,
+	CRYPTO_CIPHER_GCMP = 0x000fac08,
+	CRYPTO_CIPHER_GCMP_256 = 0x000fac09,
+	CRYPTO_CIPHER_CCMP_256 = 0x000fac0a,
+	CRYPTO_CIPHER_BIP_GMAC = 0x000fac0b,
+	CRYPTO_CIPHER_BIP_GMAC_256 = 0x000fac0c,
+	CRYPTO_CIPHER_BIP_CMAC_256 = 0x000fac0d,
 };
 
 enum crypto_akm {