From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57F1FC433EF for ; Mon, 9 May 2022 21:42:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=g2JDsJxIQU1Eecr3EH9fAeLhdOViP3dGeNNLh99QNqA=; b=LJZJrgvl9xPZtU 1Mu2+aefYK8aJPERdSUL+yGDfsEVI0ufsYVq8ShPyYM5WJ4eWB9nRiyV9Gqn1oxF8/axT3r+K7i/P RKNLFH0G2lUmj/V8JoKl1GRGTIcnvwa4qpCXcKJNoB8GI0KtYPp4UaWj/K5r1xed/+z86dzjl6XwC QNhFTGznYFTaPGhmsYxNMqHRvbkJijxkmnKzyORlbQP3Jqw93lh3cNaIzbOIdJSM43LrAOynA/z7/ Qh9kCb4e70Gq2RazDs9885uSZaFiJ9ngzPo7qJ4ntHQOl9pYzr43guWXo1gpTd69ZqKX4CXxUkofQ uTfXvqp8+5Aj8qgVLpoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1noB8Z-00GQGb-CW; Mon, 09 May 2022 21:41:51 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1noB8W-00GQFj-4y for linux-arm-kernel@lists.infradead.org; Mon, 09 May 2022 21:41:49 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9875D616FE; Mon, 9 May 2022 21:41:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB7E2C385BF; Mon, 9 May 2022 21:41:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652132507; bh=JGlBPfdBmX6S3e0RjP60fFEEB0F2ZpIIebHRPLcV2tY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=laT+QmgJ1p7fyHbjk+My3YfixnoTDLkoDbJm7cBXq1btpqTpilTyLym71A68B84e/ rxThIhZg/z41gSoQZTEH/a6BAmxfHazztBn5ox0tzXKHQgHqq0AYzqH0/4I9Jyldcq F+RQkMW0A/26v3pzdjCaJff/Yv3Fmx7czK78P8wPksCcfSc9XEyQ2SDo3rFk3AT3Hu KX1cpgy+wMNcyUJuz91SfG91XLE7iZpqTr5fbzrPB1NNfTp4htlNj1nuo5oNlVg+3R BURStAMQJtelCI7d0eorXCBnuNTpiQlmqv/8xqoHBdUIdtShaA9m6mdw452yFPllh3 5W7JhAygh1maw== Date: Mon, 9 May 2022 14:41:45 -0700 From: Eric Biggers To: Nathan Huckleberry Cc: linux-crypto@vger.kernel.org, linux-fscrypt@vger.kernel.org, Herbert Xu , "David S. Miller" , linux-arm-kernel@lists.infradead.org, Paul Crowley , Sami Tolvanen , Ard Biesheuvel Subject: Re: [PATCH v7 8/9] crypto: arm64/polyval: Add PMULL accelerated implementation of POLYVAL Message-ID: References: <20220509191107.3556468-1-nhuck@google.com> <20220509191107.3556468-9-nhuck@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220509191107.3556468-9-nhuck@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220509_144148_269276_ACC1C6E9 X-CRM114-Status: GOOD ( 16.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, May 09, 2022 at 07:11:06PM +0000, Nathan Huckleberry wrote: > Add hardware accelerated version of POLYVAL for ARM64 CPUs with > Crypto Extensions support. > > This implementation is accelerated using PMULL instructions to perform > the finite field computations. For added efficiency, 8 blocks of the > message are processed simultaneously by precomputing the first 8 > powers of the key. > > Karatsuba multiplication is used instead of Schoolbook multiplication > because it was found to be slightly faster on ARM64 CPUs. Montgomery > reduction must be used instead of Barrett reduction due to the > difference in modulus between POLYVAL's field and other finite fields. > > More information on POLYVAL can be found in the HCTR2 paper: > "Length-preserving encryption with HCTR2": > https://eprint.iacr.org/2021/1441.pdf > > Signed-off-by: Nathan Huckleberry > Reviewed-by: Ard Biesheuvel > --- > arch/arm64/crypto/Kconfig | 5 + > arch/arm64/crypto/Makefile | 3 + > arch/arm64/crypto/polyval-ce-core.S | 361 ++++++++++++++++++++++++++++ > arch/arm64/crypto/polyval-ce-glue.c | 193 +++++++++++++++ > 4 files changed, 562 insertions(+) > create mode 100644 arch/arm64/crypto/polyval-ce-core.S > create mode 100644 arch/arm64/crypto/polyval-ce-glue.c Reviewed-by: Eric Biggers - Eric _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel