From patchwork Thu Jun 1 09:03:16 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: 100837 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp705845qge; Thu, 1 Jun 2017 02:03:52 -0700 (PDT) X-Received: by 10.55.5.135 with SMTP id 129mr373401qkf.181.1496307832136; Thu, 01 Jun 2017 02:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496307832; cv=none; d=google.com; s=arc-20160816; b=CvwKAhRuWR9uuF29y6D2TaKs8jOk8AJU+FFrtuwMypxoAlcveKT35GloFrZEb4SE1e kL/ygQd6jMj6Fz/nCbLkFGfOkFTauQ+0tEZam+zGaTeu+fwUDBkCF2OuUioC3aN0byCE Avk3VpatBYhxlkH9nk/ZNMImYnFtluzy2uAsSz5sMBU0M3pI5WkL9QQV9+9gw5tnpapp UtnOYdiUrUjjgiA7HJBIHYeyvZRrhAXs6AmDqMRIFoTw5fQzCTLDMX2zfEHUej8izfMc O3eRaDgN/mc6H19pVZ/IKor8iCRzQsk8DBbbW3FsLLvJpFeAy3Ksisd2e/5Z5GzE4es0 tHLg== 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:message-id:date:to:from :delivered-to:arc-authentication-results; bh=MxmBf97E0RQQlS2X46R+8BcxdRiiedhnlSjhG0UNtlw=; b=TipHTaGE+TLiWYQ1lItvm1f1+5KE/CKopyBoKZq2PHSVCxrM/tKZehFVyZcfVOwpmr NNAZWYnoy6u6TJpyphEwgZR9oczjWOXqntei4LJCFtWEVyKiCJAB/7Qz/76j8Dr1qSG8 lvrDBXngXZC38nW0xjrbuJB8IN3PFV9YxMiNKYe05XP6sBwIGjgHuny4cRL+PLxsMS1o UfkRLLmUWOLWMHduZHm4QJuTI9rSMhidyPvm1HaxoDt5xFdRlRJ7Qq3uludHdg8gTTF1 NCHnZ6Lc7OjNkCFUHmwb+2KCG9iE0HpX2gL4jezUxX5t7x+5wKYiLJMFVM5bcbgc/f6w Mc8Q== 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 d143si18647730qke.153.2017.06.01.02.03.51; Thu, 01 Jun 2017 02:03:52 -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 A4068609DC; Thu, 1 Jun 2017 09:03:51 +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 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 F3EA660832; Thu, 1 Jun 2017 09:03:46 +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 4EB70607E5; Thu, 1 Jun 2017 09:03:44 +0000 (UTC) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) by lists.linaro.org (Postfix) with ESMTPS id 610C1607E5 for ; Thu, 1 Jun 2017 09:03:43 +0000 (UTC) Received: by mail-lf0-f47.google.com with SMTP id c184so17848010lfe.2 for ; Thu, 01 Jun 2017 02:03:43 -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; bh=MxmBf97E0RQQlS2X46R+8BcxdRiiedhnlSjhG0UNtlw=; b=K19uhlai9+i/LrpdRwWttjcvP2DW7bHIH8jcQcJZv3vIOs5hnSrblNX7jTLA0HVPIa +w55ArOW59cowmvl9YlP3NSrSS7JqkzQ20p/IXJmxGwd0IVZSW5RYhcwbppcCNrmOjxP PZgQxmv9vODPzjS59wCht8JXCI515waHyWPfNRsr+8XRzBICnz92clfw2STqzIcuTgVB dv2eZBXtMCT1pEGMQO5qQXHJJFDnQEqlNA9ffY4Gi1hxSlsAEsyHqrnIQS8D1pQhaEAM CS9wIumX9KM8V/EM+e8Ud0boa0MCGWMf1pg3tvQmIaThD7GvDi3gsPrNHdLMug733Dtp Q33A== X-Gm-Message-State: AODbwcBnTEOaaLsUFOmU5TJsJAJnpS4jIAJ9zoa6d4PFj/4LLDfVZuPv DuSfDsbV3iBZfyUUFtKO0jU2 X-Received: by 10.25.242.5 with SMTP id q5mr191656lfh.11.1496307821911; Thu, 01 Jun 2017 02:03:41 -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.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 02:03:41 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Thu, 1 Jun 2017 12:03:16 +0300 Message-Id: <20170601090339.9313-1-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [lng-odp] [PATCH API-NEXT v5 00/23] Major cryptography code rework 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" This is a cummulative patchset incorporating: - AAD/ auth_digest_len implementation - crypto engine working across packet segments - SHA-1/SHA-512 implementation - small fixes GitHub bot did not send this serie for quite some time, so I'm sending it manually. On GitHub exactly the same patch serie is visible as PR #34. Dmitry Eremin-Solenikov (23): validation: crypto: explicitly pass auth_digest_len to crypto subsystem validation: crypto: explicitly pass AAD to crypto subsystem test: odp_crypto: update performance test to set auth_digest_length example: ipsec: set auth_digest_len linux-generic: crypto: use auth_digest_len when calculating HMACs linux-generic: crypto: add SHA* capabilities for full length digests linux-generic: crypto: update AES-GCM support to reflect aad and auth_digest_len linux-generic: crypto: remote extra memcpy in AES-GCM linux-generic: crypto: make AES-GCM thread safe linux-generic: crypto: explicitly disable padding for AES-GCM linux-generic: crypto: rewrite AES-CBC support using EVP functions linux-generic: crypto: rewrite 3DES-CBC support using EVP functions linux-generic: crypto: merge AES-CBC and 3DES-CBC support linux-generic: crypto: make HMAC work across segmented packets linux-generic: crypto: make en/decryption work across packet segments linux-generic: crypto: NULL session->next pointer on session allocation test: odp_crypto: bail out if odp_crypto_session_create failed crypto: linux-generic: add capabilities for CIPHER_NULL and AUTH_NULL validation: crypto: add tests for NULL cipher validation: crypto: add HMAC-SHA-1 test cases validation: crypto: add HMAC-SHA-512 test cases linux-generic: crypto: add SHA-1 authentication support linux-generic: crypto: add HMAC-SHA-512 authentication support example/ipsec/odp_ipsec_cache.c | 1 + .../linux-generic/include/odp_crypto_internal.h | 17 +- platform/linux-generic/odp_crypto.c | 628 +++++++++++---------- test/common_plat/performance/odp_crypto.c | 58 +- test/common_plat/validation/api/crypto/crypto.h | 8 +- .../validation/api/crypto/odp_crypto_test_inp.c | 417 ++++++++++++-- .../validation/api/crypto/test_vectors.h | 181 ++++-- .../validation/api/crypto/test_vectors_len.h | 18 +- 8 files changed, 871 insertions(+), 457 deletions(-) -- 2.11.0 Reviewed-by: Petri Savolainen