From patchwork Fri Jan 26 14:00:09 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: 125987 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp355958ljd; Fri, 26 Jan 2018 06:02:24 -0800 (PST) X-Google-Smtp-Source: AH8x224drLRYSSYdTL2b8iXZnc0w08SHUNWq0OkwiuPoCreYdyv7qeSeJI63v+C68EhNq0XMFygv X-Received: by 10.55.40.41 with SMTP id o41mr20769168qkh.176.1516975344018; Fri, 26 Jan 2018 06:02:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516975344; cv=none; d=google.com; s=arc-20160816; b=fjP5DtTJYEk6toYatBRkGg5A/PmiGulU0TnrIkM7llk64uDhd0lLMIsT/hCpcL0Spd l8kJ8FpnbcamOujk/KxndLwmCbcve8WFSUGnCjMl67rzntT5mRtRQ7mYENT0KXRcXaTt PBZKQqnikYFYf4hsGRWQg4Vxvab20VPKHA/ykwFgwXc/OHVZXHde/f7FfQ7A39bTYXbB /LqYLF/xccZw8ZfTqjSrdFWMtXh1npxi5a59i+eluNLoxEsvdFWKWMLh0WrUV8Jhqv5Z d9xpTeC8NiYPDdPRsD20aOb6UOUM1/aH24uBgunHHXDBPyquVr2QgBGa16TdsQtgBMSr JI6w== 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=npM62i4khL54ShuQyl6jhyRL/NrrVnihCNIoJhlyYn0=; b=fMno74SuDD5sg02hsLaxApuBy3ruvUESMC5j/iAMLvif35yhLZYgMN4togWagOoaD1 tRLf1Wts0zvL+1hPsooplHfsMGZju7YTMSbcMa5FyOaqPT5VqycE5EP5VgCXqwKDVG8b puTKTilvBO6r0S2RH7sdQg0Tk6HmQDWjfKwwc0p8Utz3FvIhV8dlSn1mbTvd8E3J08Pm r17tWouIqjQLW5ZNebFQT1sldTyHFjdwSRBH5iypzoQLnut+r2fkTFMGIwa8wmOG7uBr gqLJY0TgTyRPFiIjKCni8A2F3vraw84894Z8Ng/K4PEE+uGG61Yui0NlMDSXRqfYLJfJ 5XTw== 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 p18si546928qtk.356.2018.01.26.06.02.21; Fri, 26 Jan 2018 06:02:24 -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 A7BDD61801; Fri, 26 Jan 2018 14:02:21 +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 27CBF61777; Fri, 26 Jan 2018 14:00:35 +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 60376617C1; Fri, 26 Jan 2018 14:00:22 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 2DC6E60940 for ; Fri, 26 Jan 2018 14:00:17 +0000 (UTC) Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward101j.mail.yandex.net (Yandex) with ESMTP id AE7791241AF6 for ; Fri, 26 Jan 2018 17:00:15 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 7PFfBVyNzK-0FRixINC; Fri, 26 Jan 2018 17:00:15 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id eWPAvjBUnV-0F1GuEpj; Fri, 26 Jan 2018 17:00:15 +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: Fri, 26 Jan 2018 17:00:09 +0300 Message-Id: <1516975214-22205-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516975214-22205-1-git-send-email-odpbot@yandex.ru> References: <1516975214-22205-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 428 Subject: [lng-odp] [PATCH API-NEXT v5 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: 2e711497bfd4fd2a2ca2c0882de3d93ae7d567af **/ 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;