From patchwork Fri May 5 22:00:05 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: 98745 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp342964qge; Fri, 5 May 2017 15:05:22 -0700 (PDT) X-Received: by 10.200.47.83 with SMTP id k19mr15745640qta.254.1494021922899; Fri, 05 May 2017 15:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494021922; cv=none; d=google.com; s=arc-20160816; b=krygUnov9tWYGfUZIBxt33TEGlXSz1CrjhG66joaWRtqrdev3x/7CfVVxdhqxMBioV N2KOZG6heJf1fRi89QnOfZJgnzKrxFc4Q+0Foh7r2WipyWHUJs2CXCOdX0H1JooVyI6q 9R7l4xL3ODn8vVo2ueLjYah8yn9nOS8Nk7Zi4DYLIJou5ADP6jEwJv5hQSRLvlKE+Nbm HPCNMkvxXtRTh5na8669dRBbnlcgsErWwyTJjgjGJhBWDaYET1nw/FmWUzZH4oBcDJer Z0AG4ShHOCfLDU94LZxJy0MwlR2BCY6KaXm0tozTFdfnjqwuawbLeY2D9b0Id01GGUNo MU6A== 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=05H5jc5bXNR/uy7VyR5XrDZn0hZ0Ho/ZK0fyYUMbGfo=; b=jLdqJ+QwWqs5sFp5GLWDLk4vgGOjETh/JJE7yiEyj6bWJUNYBmQIu8NK0mluFdd5jO +g3pDRgVhQtE22p/sZERT8NKQ2QQjx+AuyJXs07crAFRL4+t5bzc9BhGnj0+oDqpK4eh NkqFa7uFLvjMXTapu/nwAOl7d3j2IwQCMPPWA+0NkjnCBIdUYhyKELjkHUP87tzcje9m ZCBQa+XDdxbQXDHSeKKpMW2Em9Ud6oP48yN6YJbPChJxqFS1relPCYTAlLkgPf5kDqWe axXZPDWAM46xmXEHOzQiIj7Dywb3nsw20kI+mt8dBhLtdH4Qd+PqcpFZ8lXD8NOQpMK8 qHcw== 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 p39si6011112qtc.172.2017.05.05.15.05.22; Fri, 05 May 2017 15:05:22 -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 9013860812; Fri, 5 May 2017 22:05:22 +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 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 7720B609BE; Fri, 5 May 2017 22:01:34 +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 A53C460812; Fri, 5 May 2017 22:01:25 +0000 (UTC) Received: from forward2h.cmail.yandex.net (forward2h.cmail.yandex.net [87.250.230.17]) by lists.linaro.org (Postfix) with ESMTPS id 1B94B606F3 for ; Fri, 5 May 2017 22:00:35 +0000 (UTC) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::27]) by forward2h.cmail.yandex.net (Yandex) with ESMTP id B970420C13 for ; Sat, 6 May 2017 01:00:33 +0300 (MSK) Received: from smtp3o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3o.mail.yandex.net (Yandex) with ESMTP id 900DC2940C3F for ; Sat, 6 May 2017 01:00:33 +0300 (MSK) Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id kpVTayqLEv-0WfSSNL7; Sat, 06 May 2017 01:00:32 +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, 6 May 2017 01:00:05 +0300 Message-Id: <1494021606-16187-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494021606-16187-1-git-send-email-odpbot@yandex.ru> References: <1494021606-16187-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 24 Subject: [lng-odp] [PATCH API-NEXT v2 5/7] 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: 540490ddf3a1b3da4b80ed15fc874ccdfc49b60c ** Merge commit sha: 9e32a5ccf92bee9741891a2bb50d27ee8756e388 **/ 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 774690e..421becb 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} } };