From patchwork Tue Jan 30 17:00:06 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: 126283 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp3538592ljd; Tue, 30 Jan 2018 09:04:33 -0800 (PST) X-Google-Smtp-Source: AH8x2262PfcQheDAvnUJCWtc70bdmEMQqAQkEl6KLer+FWc1QMRLeH1NbXYOjp202M933w39BTn0 X-Received: by 10.55.17.143 with SMTP id 15mr41323926qkr.148.1517331873359; Tue, 30 Jan 2018 09:04:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517331873; cv=none; d=google.com; s=arc-20160816; b=byv7fMElFe7g3BuZTwIzPV3i8M3u8sgUHPpF3/aQ15+VWC1hiFI3Ti84gwyoqytuq7 YMDz/i71iDgMYCPI1HFwJPp2t6sbzHeMYrqNpnYOwPcOANP4c/P7LpuJwhE0NkHKEth8 IrWW+SwKqvFSuBTQgkAggOY39iaJCnpyF3fTa6i71F6Rqqztm4gB1mS5Lf6y6ihqWSWo KvMg00ZPpy69DFfMoDJ56QiXvYhrdniEPIIOZqlIf6QgqWfOSE87W5Xa5I1nk9K8vV5l zJZjOab8tRaKPBVFSKZB6KLhWN3hXtNM42g0QmENgTfs2/gib3zbRY4WYiGhiRey2F5t JOzg== 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=xZehqSNm6e8XRnfrzE5+dl4aFYoa4R6mPJd1ZWtwqjA=; b=RvLoVKeHnkSfeX0p4c2VHiO0sls94hz/A5kzfj7/5fiRlfienQki3A0hwcmMpRwtux rPFyCwJKZbv0My/C1z91z8seQWibzplFNpUHaQyYob+Hdyru8YB2rCGZHni+/jn3bhSR VoH6ADEuF05ogWi1JOdRd8ncl+IJ2sB9z0xWaLGykzbDO6FFUlg4cleQ5zu259MPMtzz oOj/PlIo3gha6LpcowBpHz7ExvS3Aungo5RP0X9tXx8KtzRcWkXnqdwR4sbAaClr1VCo Xc3xbedRdfy1GgawoDxqUSyXsPW/hJFKlUaeQDcY1tvr9BU7Eba90DNH379/VJs6VqKe z56g== 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 133si1698709qkj.153.2018.01.30.09.04.33; Tue, 30 Jan 2018 09:04: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 0498061739; Tue, 30 Jan 2018 17:04:33 +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 1A66161763; Tue, 30 Jan 2018 17:02:25 +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 4BB2061736; Tue, 30 Jan 2018 17:02:05 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id 618D1609C7 for ; Tue, 30 Jan 2018 17:00:38 +0000 (UTC) Received: from mxback13j.mail.yandex.net (mxback13j.mail.yandex.net [IPv6:2a02:6b8:0:1619::88]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 9C3A44302870 for ; Tue, 30 Jan 2018 20:00:36 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback13j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id SFAjSyhpok-0aXOWfJn; Tue, 30 Jan 2018 20:00:36 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 3C5hSSv4xg-0areeR7J; Tue, 30 Jan 2018 20:00:36 +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: Tue, 30 Jan 2018 20:00:06 +0300 Message-Id: <1517331619-18755-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517331619-18755-1-git-send-email-odpbot@yandex.ru> References: <1517331619-18755-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 434 Subject: [lng-odp] [PATCH API-NEXT v4 2/15] 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 434 (lumag:crypto-upd) ** https://github.com/Linaro/odp/pull/434 ** Patch: https://github.com/Linaro/odp/pull/434.patch ** Base sha: 5718327018debbb02aacb464493504c95fbe57a3 ** Merge commit sha: c5d9389a8d3b1a532e290aff4508756a920173ee **/ include/odp/api/spec/crypto.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index 421080c2b..b7ab53620 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -101,6 +101,15 @@ typedef enum { */ ODP_CIPHER_ALG_AES_CCM, + /** ChaCha20-Poly1305 + * + * ChaCha20 with Poly1305 provide both authentication and ciphering of + * data (authenticated encryption) in the same operation. Hence this + * algorithm must be paired always with ODP_AUTH_ALG_CHACHA20_POLY1305 + * authentication. + */ + ODP_CIPHER_ALG_CHACHA20_POLY1305, + /** @deprecated Use ODP_CIPHER_ALG_AES_CBC instead */ ODP_DEPRECATE(ODP_CIPHER_ALG_AES128_CBC), @@ -183,6 +192,15 @@ typedef enum { */ ODP_AUTH_ALG_AES_CMAC, + /** ChaCha20-Poly1305 AEAD + * + * ChaCha20 with Poly1305 provide both authentication and ciphering of + * data (authenticated encryption) in the same operation. Hence this + * algorithm must be paired always with + * ODP_CIPHER_ALG_CHACHA20_POLY1305 cipher. + */ + ODP_AUTH_ALG_CHACHA20_POLY1305, + /** @deprecated Use ODP_AUTH_ALG_MD5_HMAC instead */ ODP_DEPRECATE(ODP_AUTH_ALG_MD5_96), @@ -221,6 +239,9 @@ typedef union odp_crypto_cipher_algos_t { /** ODP_CIPHER_ALG_AES_CCM */ uint32_t aes_ccm : 1; + /** ODP_CIPHER_ALG_CHACHA20_POLY1305 */ + uint32_t chacha20_poly1305 : 1; + /** @deprecated Use aes_cbc instead */ uint32_t ODP_DEPRECATE(aes128_cbc) : 1; @@ -269,6 +290,9 @@ typedef union odp_crypto_auth_algos_t { /** ODP_AUTH_ALG_AES_CMAC*/ uint32_t aes_cmac : 1; + /** ODP_AUTH_ALG_CHACHA20_POLY1305 */ + uint32_t chacha20_poly1305 : 1; + /** @deprecated Use md5_hmac instead */ uint32_t ODP_DEPRECATE(md5_96) : 1;