diff mbox series

[API-NEXT,v5,1/6] api: crypto: add ChaCha20-Poly1305 support

Message ID 1516975214-22205-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v5,1/6] api: crypto: add ChaCha20-Poly1305 support | expand

Commit Message

Github ODP bot Jan. 26, 2018, 2 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


ChaCha20-Poly1305 is a promising AEAD algorithm. Add decarations to
support it.

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

---
/** Email created from pull request 428 (lumag:chacha-poly1305)
 ** https://github.com/Linaro/odp/pull/428
 ** Patch: https://github.com/Linaro/odp/pull/428.patch
 ** Base sha: 44974a09b01c79adb9637a5dff38539598a76737
 ** Merge commit sha: 2e711497bfd4fd2a2ca2c0882de3d93ae7d567af
 **/
 include/odp/api/spec/crypto.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index 77ea317b8..ef0b267fa 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -89,6 +89,12 @@  typedef enum {
 	 */
 	ODP_CIPHER_ALG_AES_GCM,
 
+	/** ChaCha20-Poly1305 AEAD
+	 *
+	 * @note Must be paired with ODP_AUTH_ALG_CHACHA20_POLY1305
+	 */
+	ODP_CIPHER_ALG_CHACHA20_POLY1305,
+
 	/** @deprecated  Use ODP_CIPHER_ALG_AES_CBC instead */
 	ODP_DEPRECATE(ODP_CIPHER_ALG_AES128_CBC),
 
@@ -148,6 +154,12 @@  typedef enum {
 	 */
 	ODP_AUTH_ALG_AES_GMAC,
 
+	/** ChaCha20-Poly1305 AEAD
+	 *
+	 * @note Must be paired with ODP_CIPHER_ALG_CHACHA20_POLY1305
+	 */
+	ODP_AUTH_ALG_CHACHA20_POLY1305,
+
 	/** @deprecated  Use ODP_AUTH_ALG_MD5_HMAC instead */
 	ODP_DEPRECATE(ODP_AUTH_ALG_MD5_96),
 
@@ -183,6 +195,9 @@  typedef union odp_crypto_cipher_algos_t {
 		/** ODP_CIPHER_ALG_AES_GCM */
 		uint32_t aes_gcm     : 1;
 
+		/** ODP_CIPHER_ALG_CHACHA20_POLY1305 */
+		uint32_t chacha20_poly1305 : 1;
+
 		/** @deprecated  Use aes_cbc instead */
 		uint32_t ODP_DEPRECATE(aes128_cbc) : 1;
 
@@ -225,6 +240,9 @@  typedef union odp_crypto_auth_algos_t {
 		/** ODP_AUTH_ALG_AES_GMAC*/
 		uint32_t aes_gmac    : 1;
 
+		/** ODP_AUTH_ALG_CHACHA20_POLY1305 */
+		uint32_t chacha20_poly1305 : 1;
+
 		/** @deprecated  Use md5_hmac instead */
 		uint32_t ODP_DEPRECATE(md5_96)     : 1;