From patchwork Fri May 19 22:00:07 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: 100211 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp517104qge; Fri, 19 May 2017 15:03:44 -0700 (PDT) X-Received: by 10.36.138.131 with SMTP id v125mr30139511itd.66.1495231424598; Fri, 19 May 2017 15:03:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495231424; cv=none; d=google.com; s=arc-20160816; b=ObFAL3Pld3Ci43UYiCC/xZbOCIjBBmOgYiNeOSw57blkEDCtfQlfHzSBv1HztLzKM8 J74ooHivF30doXBEXtlnTwxThn8nn2etp59r/DQzP6O5q/D7IfDXl2YtbZV31YXQhCCP c30Bq60zT6awneAB30RyMjhptG2Q6e8USq7p9qxsg2UnGVc+pdohzl6JXnvYmVoWRsJv X2G7pUpRhMW8atBNwacPRJKGVgL59gAvg07/PgjTshXuqgTKdJr9azaeQeVDiJ2cbrY/ wdWgB/18+qihrN1NKANAdRSt6pHuJrbCksfOBOm7By5cwvW/2OUZWcR482Fe/ln4oora PBMg== 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=JKCfL+Vw2iZj5012hkTeB/EUih714mQZh7nvyKS4Qi8=; b=xyTmfOwq5WGE2NsiecnZf7gg0qXHlyBhkS+2P6PuLxQPwh81k1Ky+Ke3gRSup9Vu5Q xlzS+xeiDSzTts0o+nd3AgOgWcptVxGeKHRr+4hLyWya16GgsBolUw03OEPsc4Z2kdBZ zAm6qPZ84lf62wjzeG6mC5y3fr4w6KSZQAYCBVMBeYCBixmJxm31JUpXYRr3jnZVSJev l0a6FL62433y6PlNfUrQxpPfahhxKToBsbjm9Ss9Xskmj/FZIIBe8buJoWNihXnUhRHT AY5k7AferhkHRDsIC9ycH1Yd+eQw7VasFzkd9Yy/fTxRo4anyhf4Gk7f26z8MhusDGU/ 2qag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c5si11454261ith.16.2017.05.19.15.03.44; Fri, 19 May 2017 15:03:44 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 1C1A660E68; Fri, 19 May 2017 22:03:44 +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 5B1A860ECA; Fri, 19 May 2017 22:01:08 +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 266B76089E; Fri, 19 May 2017 22:00:54 +0000 (UTC) Received: from forward1j.cmail.yandex.net (forward1j.cmail.yandex.net [5.255.227.19]) by lists.linaro.org (Postfix) with ESMTPS id 882D160EAE for ; Fri, 19 May 2017 22:00:21 +0000 (UTC) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::27]) by forward1j.cmail.yandex.net (Yandex) with ESMTP id B38A220730 for ; Sat, 20 May 2017 01:00:19 +0300 (MSK) Received: from smtp3o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3o.mail.yandex.net (Yandex) with ESMTP id 88F792940E81 for ; Sat, 20 May 2017 01:00:19 +0300 (MSK) Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 53lQSrIN00-0IwicwTd; Sat, 20 May 2017 01:00:18 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sat, 20 May 2017 01:00:07 +0300 Message-Id: <1495231208-19354-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1495231208-19354-1-git-send-email-odpbot@yandex.ru> References: <1495231208-19354-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 24 Subject: [lng-odp] [PATCH API-NEXT v3 4/5] linux: crypto: add SHA* capabilities for full length digests 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 In addition to truncated digests (used by IPsec) add full-length capabilities to SHA* algos. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 24 (lumag:crypto-dal) ** https://github.com/Linaro/odp/pull/24 ** Patch: https://github.com/Linaro/odp/pull/24.patch ** Base sha: 826ee894aa0ebd09d42a17e1de077c46bc5b366a ** Merge commit sha: 78b12f0da50bf257f978a197b2667405a94a4938 **/ platform/linux-generic/odp_crypto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index d6b4ee3f..2fdcfa3f 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -52,10 +52,12 @@ static const odp_crypto_cipher_capability_t cipher_capa_aes_gcm[] = { * Keep sorted: first by digest length, then by key length */ static const odp_crypto_auth_capability_t auth_capa_md5_hmac[] = { -{.digest_len = 12, .key_len = 16, .aad_len = {.min = 0, .max = 0, .inc = 0} } }; +{.digest_len = 12, .key_len = 16, .aad_len = {.min = 0, .max = 0, .inc = 0} }, +{.digest_len = 16, .key_len = 16, .aad_len = {.min = 0, .max = 0, .inc = 0} } }; static const odp_crypto_auth_capability_t auth_capa_sha256_hmac[] = { -{.digest_len = 16, .key_len = 32, .aad_len = {.min = 0, .max = 0, .inc = 0} } }; +{.digest_len = 16, .key_len = 32, .aad_len = {.min = 0, .max = 0, .inc = 0} }, +{.digest_len = 32, .key_len = 32, .aad_len = {.min = 0, .max = 0, .inc = 0} } }; static const odp_crypto_auth_capability_t auth_capa_aes_gcm[] = { {.digest_len = 16, .key_len = 0, .aad_len = {.min = 8, .max = 12, .inc = 4} } };