From patchwork Thu Jun 1 09:03:22 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: 100843 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp707496qge; Thu, 1 Jun 2017 02:08:43 -0700 (PDT) X-Received: by 10.55.114.2 with SMTP id n2mr365630qkc.157.1496308123256; Thu, 01 Jun 2017 02:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496308123; cv=none; d=google.com; s=arc-20160816; b=PJZSbAL6Fgvg8I/jv6CjGAw6gKw8e9+b2RBkm2qrjLQS7s5f2+CLfloVkRkU5q/juE oLhxGUMZCVMu00GwMxwU/4gUNrIJMfQ4y3add0LCztBOpdYkZLO40M0NunP3tIfaxQkR yTMysXruD+7PXc/5brPnQHGUUcTonTBZyKA2sM1naRbfJw2211iKEzrYRwA7bMaPmSXe UmyXLvWPq0mwtysbblYaEedOqtJYP4Agjj5IvnFSB0doi5OFcF35kdQKBVlvIUGa1V3E V5xs3TyIc4AOttI7y2rh3Z25yr8mr/YyF8zs4CfNbLm3PGIP/3tjA2YGWUKl+tO5MAYC r2wg== 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=DlcqzxqUOfjftqTiY66NXsx0U/M1XOxa2MsD8JfIhrmDV8DUFTlw64JHeLesyCXzwz UVNw5WyA2uD5NyPP8yctJYmdJ/Rm0NtxyuV6lCNVGB+1q1lKnaei8qJVBfM3PkHkVNdQ qFHQG2hkwZcQ1Cfw+Q4jDAq3VDM501thcEuQhDdeF0MxvYSSh09q3P+1/wNFrZ6FLyDO A0lFbztf0aRJkvwmLowJU/Iwkz+vDaWiiXOtRjR4+xZUmCIcqdWhC3XkQYgFIaFUq5p5 PwkrJ5Blyez4Ou3Ak0W+HJinmSZ8L/emHAMPZucoCC70rvdIgWklL2YSES9FUVvaAShP WVhA== 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 u63si18722874qkc.158.2017.06.01.02.08.43; Thu, 01 Jun 2017 02:08:43 -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 DD6F1608C3; Thu, 1 Jun 2017 09:08:42 +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 7AE55608C4; Thu, 1 Jun 2017 09:04:29 +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 15EE060D4E; Thu, 1 Jun 2017 09:04:26 +0000 (UTC) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by lists.linaro.org (Postfix) with ESMTPS id 2FE87607F1 for ; Thu, 1 Jun 2017 09:03:50 +0000 (UTC) Received: by mail-lf0-f54.google.com with SMTP id c184so17849619lfe.2 for ; Thu, 01 Jun 2017 02:03:50 -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=m6oB+k6ZhM3IKV8qDjbkEMf0SJEuQ0HvrefGuUwmslvQtT6eppcgMzyhEdX6AI2l9b FfNFBIPs1I7vpDGppgK2/70iJsCD66OtFzRltkJQvhDlZ6LaqQvOesDtaTh50P6AizT8 HXEXU5fZNnH19YTbEUNAnVp0wYEv5qZmCSE1NrY9gSRDOsgU70Cjt4N1oCuqey7HmUQw z+ieYcut50je0e4F/9RS9Ehbu2qa+B0+NVQygTNh85E/8pC7XOEdbqO+bZzJqvYUj9zB j0Fmvs/+efnDjJdz2xsHYDdGvC2/2Wi+szPd8HL3h5keEbjkve5dPFExw6Uf4aVUtm1o mQPg== X-Gm-Message-State: AODbwcBNdnLDIxYUxNaOXCGeLzSAaiOm4LP230xxN7wtbGjzmf8EQf/U xPKsV21P14M1YBuA3AFCuat0 X-Received: by 10.25.56.67 with SMTP id d3mr205371lfj.80.1496307828849; Thu, 01 Jun 2017 02:03:48 -0700 (PDT) Received: from forlindon.lumag.auriga.ru ([188.162.64.12]) by smtp.gmail.com with ESMTPSA id 129sm4232819ljf.36.2017.06.01.02.03.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 02:03:48 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Thu, 1 Jun 2017 12:03:22 +0300 Message-Id: <20170601090339.9313-7-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170601090339.9313-1-dmitry.ereminsolenikov@linaro.org> References: <20170601090339.9313-1-dmitry.ereminsolenikov@linaro.org> Subject: [lng-odp] [PATCH API-NEXT v5 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} } };