diff mbox series

[API-NEXT,v8,1/10] api: crypto: add AES-GMAC declarations

Message ID 1510689611-17861-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v8,1/10] api: crypto: add AES-GMAC declarations | expand

Commit Message

Github ODP bot Nov. 14, 2017, 8 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Add AES-GMAC declarations to support RFC4543.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 288 (lumag:gmac)
 ** https://github.com/Linaro/odp/pull/288
 ** Patch: https://github.com/Linaro/odp/pull/288.patch
 ** Base sha: ba93e355ddf151215aa18b59cbfca08fe175fe65
 ** Merge commit sha: 8363c3a4073075d0f3dd68864b9a33819005aab4
 **/
 include/odp/api/spec/crypto.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index ed1fd6784..6a4304d8b 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -134,6 +134,20 @@  typedef enum {
 	 */
 	ODP_AUTH_ALG_AES_GCM,
 
+	/** AES in Galois/Counter MAC Mode
+	 *
+	 * NIST and RFC specifications of GCM/GMAC refer to all data to be
+	 * authenticated as AAD. In constrast to that, ODP API specifies the
+	 * bulk of authenticated data to be located in packet payload for all
+	 * authentication algorithms, including GMAC. Thus for GMAC application
+	 * should also pass all data to be authenticated as packet data. AAD is
+	 * not used for GMAC. GMAC IV should be passed via session IV or
+	 * per-packet IV override.
+	 *
+	 * @note Must be paired with cipher ODP_CIPHER_ALG_NULL
+	 */
+	ODP_AUTH_ALG_AES_GMAC,
+
 	/** @deprecated  Use ODP_AUTH_ALG_MD5_HMAC instead */
 	ODP_DEPRECATE(ODP_AUTH_ALG_MD5_96),
 
@@ -208,6 +222,9 @@  typedef union odp_crypto_auth_algos_t {
 		/** ODP_AUTH_ALG_AES_GCM */
 		uint32_t aes_gcm     : 1;
 
+		/** ODP_AUTH_ALG_AES_GMAC*/
+		uint32_t aes_gmac    : 1;
+
 		/** @deprecated  Use md5_hmac instead */
 		uint32_t ODP_DEPRECATE(md5_96)     : 1;