From patchwork Mon Oct 14 16:16:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 176264 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4718052ill; Mon, 14 Oct 2019 09:16:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqymeBkVqPlp+73u6PEUWnJtrNJAJLwJqWOk6mQROUzNsx968vRCYsyOA24NvghHZQfppyjp X-Received: by 2002:a50:da0f:: with SMTP id z15mr29080021edj.137.1571069814891; Mon, 14 Oct 2019 09:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571069814; cv=none; d=google.com; s=arc-20160816; b=oFXk57+HV40p2zhtriWtVdkDOlF4G7dVhra5BnXaMK93SlzHZQXWo2vugK1Nit+i/V lLr7/52LtkE+zKkKRbx45/8lDDhsiMRxGQYfsBPEFovE2Ia9Vj1dPJScYp6+jfa/hLdT ZnxZGmj3lPPnkDMW8uqWArfq8WS+3JGuMErrQ0UBXrePC8PVGTNaXVPTuB+P49wwcH9m vfiHBTRoR6Nw3xDgvCbd4zQopMsGlUjrXtCt4f6J61E2rx9lH5IJ2wr7oACRFDfc1HEu bvb6QOoBSsHDjdwncWPGMJ4EsKFey5zrKTLGslD9nrZzUdh52xaxRZaV8lcAZaj/CABI nSsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Mfy391OkCgKorVuTp3Zz3reemWsXeISYwrwbDVYSKs8=; b=nhTB4F/BKniRlOld4iEfzsrSCSb5Q6Wepo/0Ur/Pgakvs5suNkd5h85UYulvGMSbvS mzCp+LYpJ180SRsZ9o8HkQUWiskLkP7tpb4bRLKWouvLUr3Q3Ll3+iRc3J21bKpejqus BfxkHSLmPGSwQFbU9ZY45oIRc7t6DCsLwiDN0u1P44+yni3jjVhzr6u75rS4yU6XuXmA Vtd/yiVq0ajBAGxS9YPrXIUm3t/2XISW6T00XTPRjvsYyK11ly7Y2cMqpllBB3EwM10S r+GFSTkx3JBgrcVmLBiW1PHTzYwFQA7aCGvrOvyPFPYV15rOwcKZMrMK0TAy5QCyGWmg tpVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PFZR2AQw; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o49si12326778edc.261.2019.10.14.09.16.54; Mon, 14 Oct 2019 09:16:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PFZR2AQw; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388001AbfJNQQy (ORCPT + 3 others); Mon, 14 Oct 2019 12:16:54 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:43351 "EHLO mail-wr1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387548AbfJNQQy (ORCPT ); Mon, 14 Oct 2019 12:16:54 -0400 Received: by mail-wr1-f51.google.com with SMTP id j18so20413794wrq.10 for ; Mon, 14 Oct 2019 09:16:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Mfy391OkCgKorVuTp3Zz3reemWsXeISYwrwbDVYSKs8=; b=PFZR2AQw08fG2ZO9qVCmLyhPvpMjU7vcjM9dMRrGo2K2oOR+wrFlib4j9Wt2CL2zGr vgGzoCLZ2U5Vjsg9RBwWP79XWzFIfiNNN6Ww+JhsUTS9Mef2Crrz2BlyF8meqqVP9Tej wMRGNUzyXqbGGsPVynt2CSp6y2STkr8sO0XMhbBeRCcZ3k5COnuJa3/UbbahTpoZS0QF So45R+4QxaHCHKnm28fy6c8638+rzzFDvXcLNWeO4CFKWE1S8wvyCxu16RvQE2oc0x+X MBdyGZ7NU4KHnTKCw2WIs5tn436e+j4ZTRCUMjs0nfFPC1mzJqHDcE/26b8XV3yDUfjp SsGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Mfy391OkCgKorVuTp3Zz3reemWsXeISYwrwbDVYSKs8=; b=Ujn0slVZcDLMjMqa5aCUVZWb1ZWswZ5bMkoFdDnYFApcVn9fP5LMkBC1IjgrtblTwq 1aRpkBvjJhNPydoLuhZUU2J5Z4yPTr5J7Mhet088RfJw7CCoDjf/Qa6GthzYXvIn1cBz k8NPJeQPO2m4Jt+k7B4Ed75nzA2H7/YfnP+CHk5mXnjTXpXXWzqofl7jutNee59pvXet 7dy1F3ODWDLc/twYtyA+QzlfrWnpsjIeIE+E3z9h0eJw5VxXg2Xa82uG7xndMkUR8xZT fBCWlYKrzlSTDpvZ2hOKQ+K0yHjcsVBd38BhLFvTmtsLLZeXpJO1+UTOzXqE0QUzg8Kg 744A== X-Gm-Message-State: APjAAAWnQhDo/ASPzZqxAohNYfAHaUKdqf1XYRub8kjfyPpozL3EkKd2 MyQGzNnG/9g3HnIG5wpv4bYR3L7XFSU5Ug== X-Received: by 2002:a5d:43c2:: with SMTP id v2mr21145585wrr.153.1571069810513; Mon, 14 Oct 2019 09:16:50 -0700 (PDT) Received: from localhost.localdomain (aaubervilliers-681-1-23-27.w90-88.abo.wanadoo.fr. [90.88.143.27]) by smtp.gmail.com with ESMTPSA id a14sm17308655wmm.44.2019.10.14.09.16.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 09:16:49 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, herbert@gondor.apana.org.au, Ard Biesheuvel , Ondrej Mosnacek Subject: [PATCH v2 0/2] crypto: aegis128 SIMD improvements Date: Mon, 14 Oct 2019 18:16:43 +0200 Message-Id: <20191014161645.1961-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Refactor the aegis128 code to get rid of indirect calls, and implement SIMD versions of the init() and final() hooks. This results in a ~2x speedup on ARM Cortex-A57 for ~1500 byte inputs. Changes since v1: - fix missing Sbox loads for plain SIMD on GCC - fix endianness issue in final_simd() routine Cc: Ondrej Mosnacek Ard Biesheuvel (2): crypto: aegis128 - avoid function pointers for parameterization crypto: aegis128 - duplicate init() and final() hooks in SIMD code crypto/aegis128-core.c | 125 ++++++++++---------- crypto/aegis128-neon-inner.c | 50 ++++++++ crypto/aegis128-neon.c | 21 ++++ 3 files changed, 134 insertions(+), 62 deletions(-) -- 2.20.1