From patchwork Wed Jan 24 19:00:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 125707 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp603254ljf; Wed, 24 Jan 2018 11:00:33 -0800 (PST) X-Google-Smtp-Source: AH8x227yJKOOSqGZ9mctshuvfGvDAB6t8e34qboqGFdOiyz+V2JYmNUOdzZkSabBdD2elJqo1HPo X-Received: by 10.55.182.3 with SMTP id g3mr11349650qkf.238.1516820433709; Wed, 24 Jan 2018 11:00:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516820433; cv=none; d=google.com; s=arc-20160816; b=HMnuohKxIkHvQjs0xL8zOMW9SgRjl9PeCN4f8tpoKozQhNujKxD5sGDJrAzOhifLxd 3hgS5aCKxrZOzK4+GNiND3/+PMs0mcbwVP9Q4RlvDRQdhL21aXWs/5GJ9kHgHxWsKU2M cfDP1qaBA8/1gGdA6wF2Gl0UhAvPJH1mtntvkvKOszz1TrcPz94sDBzKsQ1YKOVP68oR 1B9ENDobrFqfFOyz4gMa3hSa7r2J7lGvbzF9PXm6fjxckaTZ97cy0OrIgYOYZPaeKLHq 5XWrgeweDgv+6YaECkABgAHRgW4qfv31uyKdM7onh6ln5LnfD2y+pSUqG4tC/Dmmk31u Nwjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=mGSbNA9c81AnHU7nOqr/Y1nin0UUragYIeNIwpurbjk=; b=ar3ucYR0r5Sbl+pUClqmlS44pse2YXQH9W1eiyFG8cQ7nFK3XziZoKVD67vs7Vy7uU oF6LNVOyFStUnZmyvmu8Uhe4y0qKe+3M/uT7lmEfFBCk+ony4mzizDSryBx67zRaEUZD Q7/LXuGE0nC7LjiOG7r3hq451Zys28L6lRIqgXoc+klFcppC1CH4E3BOvrtXWh65zuSo BX8rPTGFybp5SYg2WASZRy3P3YE4osml/X/aT4LSZ1cptu/0PQHf7IbLQpnyyqF5FrMq 8z3T06SK71Q/cL6tm6Qyhm9L4jLUEaXHwXgm8Akrhc4hfjr2ozNgX5UPcKOM/ukI7uGj PpZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id 126si781174qkg.234.2018.01.24.11.00.30; Wed, 24 Jan 2018 11:00:33 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 301D26176C; Wed, 24 Jan 2018 19:00:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id BB966614E2; Wed, 24 Jan 2018 19:00:21 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 65DD360725; Wed, 24 Jan 2018 19:00:19 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id EA0C460725 for ; Wed, 24 Jan 2018 19:00:16 +0000 (UTC) Received: from mxback13g.mail.yandex.net (mxback13g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:92]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 42FED5102776 for ; Wed, 24 Jan 2018 22:00:15 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback13g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id bfpqam2FAm-0FVCPp7U; Wed, 24 Jan 2018 22:00:15 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id eveK2VsYyq-0CGqUwQM; Wed, 24 Jan 2018 22:00:13 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 24 Jan 2018 22:00:05 +0300 Message-Id: <1516820410-23442-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516820410-23442-1-git-send-email-odpbot@yandex.ru> References: <1516820410-23442-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 428 Subject: [lng-odp] [PATCH API-NEXT v4 1/6] api: crypto: add ChaCha20-Poly1305 support X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov ChaCha20-Poly1305 is a promising AEAD algorithm. Add decarations to support it. Signed-off-by: Dmitry Eremin-Solenikov --- /** 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: 516808773882a012c221502d190787c1cdddd1b9 **/ include/odp/api/spec/crypto.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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;