From patchwork Thu Jun 1 08:22:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Eremin-Solenikov X-Patchwork-Id: 100827 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp697043qge; Thu, 1 Jun 2017 01:32:29 -0700 (PDT) X-Received: by 10.55.31.12 with SMTP id f12mr266240qkf.101.1496305949193; Thu, 01 Jun 2017 01:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496305949; cv=none; d=google.com; s=arc-20160816; b=opDs8eOpp/CwQPr6PMz5k5QmnKAp0nbd0IPZ8YGDvNz7RXlWEoc3pvC563H5HlawK3 5J0V4qkYzbntapNNPeEdvJmvRnb6XepY+R7XOQT2BGjDEWKhrEuG+Eh3px8eh8a+w5qA U5IfAY3YgTIFh+wjCRbkVa3Rx43Zus9+dTQ/Rj8D9ETA0WEh9CjyiXWmdnJZWA150ONx 4hO78fwLX0FPa+kzAW3bHscJ3whC4sY+L04Xzk9z26caLT+si9YcKBdyQOTsa8rCS9X/ rY+k0cwSBLFpx7k59PPOT9K2NvaRlNw0F6BAzVe6AbvZmA5X5DaccOVr+lKXnJEv9TdT mWAw== 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:references:in-reply-to :message-id:date:to:from:delivered-to:arc-authentication-results; bh=AapxmBQ5upJG0SR8lPNSwMa3XcWHhe0tb9rDvQYRQrI=; b=TDP9Tuf1vzwquXQRhF98vkQX1+IG7VnJIEwpLJ0U9HhTmITIlB7FRFOifsZvDhW5OZ CFv34hj2b8t9Fuu6PpsGNQM5Fb4TTTo16Q6rJPh8jGNpqg0q+E5NC3wVl/0/3R3gDTHq C9W1MAAzW6w/ADA1b1DyoE4h3t4lRvmGO0bFhv88lBDpErfM6sZca8QRXlhx8macFDot R2+GTFXMe2F4nGfSlwIFSJLjsc8JYkJ0jLPCDmxyLB9sexgfrmteNWtu15cEim1dpoJv ZjScyGQbenTsMmTgsJDgk5NmP8/n2EoJwmFEVONImLf9/scyA35c9vsIQyXtlre+Diiz oV7A== 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d70si17454846qkh.318.2017.06.01.01.32.28; Thu, 01 Jun 2017 01:32:29 -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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id C93A560A1A; Thu, 1 Jun 2017 08:32:28 +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=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, 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 4F75660C0C; Thu, 1 Jun 2017 08:25: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 5F3AE60C0C; Thu, 1 Jun 2017 08:25:22 +0000 (UTC) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by lists.linaro.org (Postfix) with ESMTPS id 8FA5660C0C for ; Thu, 1 Jun 2017 08:23:34 +0000 (UTC) Received: by mail-lf0-f43.google.com with SMTP id h4so22075528lfj.3 for ; Thu, 01 Jun 2017 01:23:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=AapxmBQ5upJG0SR8lPNSwMa3XcWHhe0tb9rDvQYRQrI=; b=Z+/FyVtm+/jeC1sFFCayR+d00dkfqn0Rke6wi6rxy8Ux40RuK12cqYehYzxUbiD5DT nLU1eZ6r0q1HKAhuL94XcN7fBeiNvBqWHk6sWVMVY9tmYGe4BE9jGKYyKdkrWMFRtV5z UMbpFTEHGLLjRwj2c8rSisx5aoWP2QnfMDtor62QZ1BvHUfdgfhznVUNsaQAdzZ4E9U+ Nm1fK4J1hCtUECLs/+2fPGXgTIYxpVm9tYyj33lhsOMmCXhkpxpkTHWy7/AiQ0ij1OOT GBBLZmsVoTSOecuUd0TYJC74q3evXc/SeKlgeJbTwzGyeQHqgI3fuQ/F9/s78p2FQ3f5 KY+g== X-Gm-Message-State: AODbwcCBtMAewLWreIX2yPAQJRZNdPCWFIlOIi/1uZaEs5F4yIQlAErl PMdAM1X/gigjNwLtPk1o7zZ7 X-Received: by 10.25.115.134 with SMTP id h6mr117810lfk.163.1496305413301; Thu, 01 Jun 2017 01:23:33 -0700 (PDT) Received: from forlindon.lumag.auriga.ru ([188.162.64.12]) by smtp.gmail.com with ESMTPSA id c78sm4185837lfh.25.2017.06.01.01.23.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 01:23:32 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Thu, 1 Jun 2017 11:22:50 +0300 Message-Id: <20170601082320.4673-11-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170601082320.4673-1-dmitry.ereminsolenikov@linaro.org> References: <20170601082320.4673-1-dmitry.ereminsolenikov@linaro.org> Subject: [lng-odp] [PATCH API-NEXT v4 06/23] linux-generic: 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" In addition to truncated digests (used by IPsec) add full-length capabilities to SHA* algos. Signed-off-by: Dmitry Eremin-Solenikov --- platform/linux-generic/odp_crypto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.11.0 diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 472ee3107de3..91ef05aebadf 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} } };