From patchwork Tue Nov 14 20:00:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 118881 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3458506qgn; Tue, 14 Nov 2017 12:00:26 -0800 (PST) X-Google-Smtp-Source: AGs4zMYqdk1ICIqURUlUICDZTeQyYKved7lKHdYfKNVit1gd2ZOW+vrt016HmUvH2yf9l4fod66b X-Received: by 10.200.3.158 with SMTP id t30mr4578868qtg.149.1510689626320; Tue, 14 Nov 2017 12:00:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510689626; cv=none; d=google.com; s=arc-20160816; b=aBR7+UI0lGPVyfbsCOt1cz633qBN8QRxMOg6+9u+e7nPG9V4Mz7std5L+vQtU676EM CFMWZFpoBk+Yuhgi3WRZor0AJpsW+LAemNJ+qoGkNQaM9Pmz3zwh8XVG2eUM66aZYufC QPjs9Y/GlxsX+T5x0UuYP8OHrN3LDxb5ZUf0q5Ci+3dwQ+qY7bDLqzA7jzzlzva+nNHL 4imnkugISkfnm2x4q3HqeVsenWwirMtcWa0/68ywofNbrXSVzJvSSmqJEd4xAzzRvzrA Mv2e3BFIc0kq5HdAABfBlI4g/a5XYQmbzssxip8AWJ0IhK9IQUmCzh14gp4rrK5crV01 n3Tw== 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=gJhZ79yfEBYluke846SK3MR8xD9YSKbDcz6MpLj0hvg=; b=Ub1AjVLsRt94UCSGRKvsC9yMzYHqLHZj1sp9l1KQAhJEPWTBqqVXxJOnGgjfzLUz0W DBpVTb5V6jTJyuu6qz+dwdeuuz4PfhsLZYEhJG79+P2SxtfJy5aWrbBPirhs2vGUEFMM AS02x/5P9u1X9jLs31GgSZ7SraC4qgc2sVgysfECasUGfcPz8gRQaHY7hrgvQVoBOk2O 8st6vcowh2gzgnaVKeknwHavv/XtCU2wGesGsjGVrmWPEUPfHQrOiW+X9+Izv4NHIoAh im8kfD4A3J1aWgbZ740wUxLiFon++V6UoHxb8oOqeKvdPoLwR2LOin7/OM+nPs3GLtuC wr6A== 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 a17si6318026qtk.103.2017.11.14.12.00.26; Tue, 14 Nov 2017 12:00:26 -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 00E9B60606; Tue, 14 Nov 2017 20:00:25 +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,URIBL_BLOCKED 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 6B36160667; Tue, 14 Nov 2017 20:00:18 +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 A0E2D60641; Tue, 14 Nov 2017 20:00:15 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id 50D6D60606 for ; Tue, 14 Nov 2017 20:00:14 +0000 (UTC) Received: from mxback10o.mail.yandex.net (mxback10o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::24]) by forward102j.mail.yandex.net (Yandex) with ESMTP id C4B3556047A1 for ; Tue, 14 Nov 2017 23:00:12 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback10o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Pf1KpuZ7t3-0C2uRuq1; Tue, 14 Nov 2017 23:00:12 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ZsDLds7hfB-0CpGtbPu; Tue, 14 Nov 2017 23:00:12 +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, 14 Nov 2017 23:00:02 +0300 Message-Id: <1510689611-17861-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510689611-17861-1-git-send-email-odpbot@yandex.ru> References: <1510689611-17861-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 288 Subject: [lng-odp] [PATCH API-NEXT v8 1/10] api: crypto: add AES-GMAC declarations 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 Add AES-GMAC declarations to support RFC4543. Signed-off-by: Dmitry Eremin-Solenikov --- /** 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 --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;