From patchwork Thu Jun 1 08:22:49 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: 100826 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp696768qge; Thu, 1 Jun 2017 01:31:33 -0700 (PDT) X-Received: by 10.55.146.68 with SMTP id u65mr313765qkd.77.1496305893307; Thu, 01 Jun 2017 01:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496305893; cv=none; d=google.com; s=arc-20160816; b=V1LvXx1X3BmuTgPKU6Zi/7QgxTHbegZAFgzT/QtOFst7ENCHKM5R0frtQfqIfe60E7 khZIpcYXWQwdKrEwW9QdQ0RSr7KAWjfwsmYKNo7oG27A70twESbDZ6mO27HZzSDcasfW w0chxJwmpRzm1NaEr/RHFbcB1bpOpT/2i208vWHgv9gMCJPm4wXHDEckkw7Gd++BnAzd qQycPgVPIG1hVWg+FSV1VXoin5stnoXn4vu20+WUKgVEJ+UfEtPRJeC2PYxll3vFBrkE MQOkEvhJTq/vdV0rm0Y5iz/KjQUI8X6DVdgUdVTjbRt60lx6e7NXwEUxtcwnHjmOhrQ9 VSlg== 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=QmMhfCnu8Rr4/XobmEmQlK8yq61eg575LqEZHcuWy/WfuMl5PqduLcR2nS2Ie0HMMs r3YaccUIG4nUKc3SDiWGmAqutrX76F0TB2B/YoxkhV3Nq1pCdMJ08TiW7B2bk7OMehbW JATtBnJNVxQoEY8aLg7lcYuolt4u12nwSBYc5yFGFn0QlfqMdnQRVeovsKwcUE2hQvVz hM7tySK/Dmy8gkrcSDDgO7uorbY8F4xcHLQbG6WNCyaohtcXcY+owYRi7xLfy+qB4Bl1 skLEjmiusK518TOOjTTAGFVX2K630jgjg0siyeHUR5RVvU9YNOI1f1pdKIIZyIxso+cj 7b5w== 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 r7si8328583qki.49.2017.06.01.01.31.32; Thu, 01 Jun 2017 01:31:33 -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 DD46E60972; Thu, 1 Jun 2017 08:31:32 +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 554F860D7B; Thu, 1 Jun 2017 08:24:44 +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 BAEEE60BE4; Thu, 1 Jun 2017 08:24:31 +0000 (UTC) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) by lists.linaro.org (Postfix) with ESMTPS id 87EDF60A1A for ; Thu, 1 Jun 2017 08:23:33 +0000 (UTC) Received: by mail-lf0-f42.google.com with SMTP id a136so7456398lfa.0 for ; Thu, 01 Jun 2017 01:23:33 -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=ms/FAWMMCSilQzeHkvucrrTr21t9GXG40DS0ZhJCTyH9TLbJ7ht5E8znZpbTZrPjKD 0TsU479V5+on1aRbeIzs89krEmKCnTsMolgyxfJCA2Y4l82QMobjO4+5t3qzMoNIxhJC 26Pod2XxaoG7vTRkKi8BWX8BWYaRaZwUS62u/7HnQJn8fiC42W8fu/pN+zGtabcLXDAT sZgZiEtFxGIzhLmRWvoJnZv+cu6j+8KOcrsMp21uBxQO9kWAhdC0JU/5QPAfCuhphjPq hhaROf0ALQ6gNQ6Z17vsAQYSn9BES4iKGvobyqB1zsA/Jd62FXSmwuinr3mrmnRR9HdH NqZQ== X-Gm-Message-State: AODbwcBbcxoZEQXNYDsb0rP8hIQP3O4olbOcc5/qmO8Gh+7bv7kJkHAH Ir4nbQIi88828iFeNGkY+uu+ X-Received: by 10.25.56.19 with SMTP id f19mr111422lfa.173.1496305412214; Thu, 01 Jun 2017 01:23:32 -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.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 01:23:31 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Thu, 1 Jun 2017 11:22:49 +0300 Message-Id: <20170601082320.4673-10-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 06/23] 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" 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} } };