diff mbox series

[API-NEXT,v3,2/17] api: crypto: add enumeration for AES-CCM

Message ID 1517324412-24567-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v3,1/17] api: crypto: clarify special nature of gcm and gmac | expand

Commit Message

Github ODP bot Jan. 30, 2018, 2:59 p.m. UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


Added enumerations for AES CCM authentication / encryption
algorithm.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 434 (lumag:crypto-upd)
 ** https://github.com/Linaro/odp/pull/434
 ** Patch: https://github.com/Linaro/odp/pull/434.patch
 ** Base sha: abc7b3bb0babe8efa0fde52752bcd514f2f0d422
 ** Merge commit sha: 15e0c830b5937ae889b7bcf6822797dbe0ecb799
 **/
 include/odp/api/spec/crypto.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index e4b0e8cef..b8c7b9d80 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -92,6 +92,15 @@  typedef enum {
 	 */
 	ODP_CIPHER_ALG_AES_GCM,
 
+	/** AES-CCM
+	 *
+	 *  AES in Counter with CBC-MAC (CCM) mode algorithm. CCM provides both
+	 *  authentication and ciphering of data (authenticated encryption)
+	 *  in the same operation. Hence this algorithm must be paired always
+	 *  with ODP_AUTH_ALG_AES_CCM authentication.
+	 */
+	ODP_CIPHER_ALG_AES_CCM,
+
 	/** @deprecated  Use ODP_CIPHER_ALG_AES_CBC instead */
 	ODP_DEPRECATE(ODP_CIPHER_ALG_AES128_CBC),
 
@@ -157,6 +166,15 @@  typedef enum {
 	 */
 	ODP_AUTH_ALG_AES_GMAC,
 
+	/** AES-CCM
+	 *
+	 *  AES in Counter with CBC-MAC (CCM) mode algorithm. CCM provides both
+	 *  authentication and ciphering of data (authenticated encryption)
+	 *  in the same operation. Hence this algorithm must be paired always
+	 *  with ODP_CIPHER_ALG_AES_CCM cipher.
+	 */
+	ODP_AUTH_ALG_AES_CCM,
+
 	/** @deprecated  Use ODP_AUTH_ALG_MD5_HMAC instead */
 	ODP_DEPRECATE(ODP_AUTH_ALG_MD5_96),
 
@@ -192,6 +210,9 @@  typedef union odp_crypto_cipher_algos_t {
 		/** ODP_CIPHER_ALG_AES_GCM */
 		uint32_t aes_gcm     : 1;
 
+		/** ODP_CIPHER_ALG_AES_CCM */
+		uint32_t aes_ccm     : 1;
+
 		/** @deprecated  Use aes_cbc instead */
 		uint32_t ODP_DEPRECATE(aes128_cbc) : 1;
 
@@ -234,6 +255,9 @@  typedef union odp_crypto_auth_algos_t {
 		/** ODP_AUTH_ALG_AES_GMAC*/
 		uint32_t aes_gmac    : 1;
 
+		/** ODP_AUTH_ALG_AES_CCM */
+		uint32_t aes_ccm     : 1;
+
 		/** @deprecated  Use md5_hmac instead */
 		uint32_t ODP_DEPRECATE(md5_96)     : 1;