Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1534285iob; Thu, 5 May 2022 03:33:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy41LRcrfmSF8lq/nkEgwFyp1KfNRjfYKw4SeGKlIpqeCetn4Hh8aGamlV17UMhJpdMQBhp X-Received: by 2002:a17:906:60c2:b0:6e7:681e:b4b7 with SMTP id f2-20020a17090660c200b006e7681eb4b7mr25346485ejk.130.1651746809720; Thu, 05 May 2022 03:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651746809; cv=none; d=google.com; s=arc-20160816; b=UTm9xY3Shf2MNP6lSmhN6H3jQzbfWpFq3cYDej+IH8gKLOQtTDIkgMmdbrL+z6lX65 5zI2WGNIc83umY2+ckgrDeoML3he234ec6xPqRuDGohlBOPy5ne7RZNY+HoMxLDMe21P eaKWLfKip0YlUQlWE329Lh66g3oL7N9twRXuUCsgH1iCxM7MDDK/HeR6IxeTM/8hov2b DgQdN0o8PZZJQD/EPbqDyDNFLB8wBeL3Fr+gSCIkKHB4TYxavgN7UwGf7ngPIgoDrbJz HZ+q9b8EnOHnJLCN6rvXU3HQz+S1tuwcKLvAooxbumKvTlUT8ZXJn1Et3/CIv5Sk9NXG ZAtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=o8JlGYeefqtcLey8HH5xI2Hzk8c2q37hLSAsZahYFlA=; b=BUS82sZGNgpf1KWBjEh249tlE8rBVNZvMX7uqRQXsD6tdk9NOkGJ6pxgm8PgEcW8sw aG02J12OD6VKKgx7qgp6q+FNb+OJwggo/H21qtxjL+THNN6uDNM0BjghSmzNfHjSHsuI COlmRI16f5ofrThZJtUZ8NGHyrJDa9zReq95X4MtUpJkQXE70FeF92F3oqy2MDzfJFgU gTxQeVbnH8n6BM1VutWU7YvgJ+ItyRmwsCYskOMs2MSHd71Iuv7/DUGcxpRkzcuGwj4v 1k07Uo3cZpBcQQnXXiVxmqpHPnEyWnihzo2xiE+rSXkvaJuVzgJolNuZnnNbb25/EbkS LHCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iZfuXtnq; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay25-20020a056402203900b0041cd1200204si1290231edb.556.2022.05.05.03.32.56; Thu, 05 May 2022 03:33:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iZfuXtnq; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242826AbiEEEsq (ORCPT + 99 others); Thu, 5 May 2022 00:48:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236408AbiEEEsp (ORCPT ); Thu, 5 May 2022 00:48:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09AA246664; Wed, 4 May 2022 21:45:06 -0700 (PDT) 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 0B91D61ACC; Thu, 5 May 2022 04:45:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DA1CC385A4; Thu, 5 May 2022 04:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651725905; bh=PTaOk+WTUH819ovGW3Jcx/OVdxVUDa4lj5AEtN66c4A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iZfuXtnqNPNiCo9t+O8LsLeK1k37cHkSRwwhgyMNZY8Jtu+5vkDW/hyKlRCyxuQF/ 0cPlFztUJzgQDNLRo0TVOgvZ7l/41dkOk4xpKHYp1u9GlNlmHedD1sOTlsGEBFztOt tc0Vhv9ozN2cIFGQLwiS5czYZsrQNhHDBLXoTyr2CKG8lzrzb1TUAZDWaTGTT4rJ6I JnCvEU5HlDNHmBsKmmXqTUyC5g1+b1tN4wSMLqGmmYAsiyAGDW3xsx/LrjG0Ib8HFE BJYGo3mAxEpGnj5ABXqWDNbSVrOcNe4/ujkIojIrt5lQ7Jf1tB6jp1ilozNcyv9lII 0qr9OhxJiiI2g== Date: Wed, 4 May 2022 21:45:03 -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 v6 4/9] crypto: x86/aesni-xctr: Add accelerated implementation of XCTR Message-ID: References: <20220504001823.2483834-1-nhuck@google.com> <20220504001823.2483834-5-nhuck@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220504001823.2483834-5-nhuck@google.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, May 04, 2022 at 12:18:18AM +0000, Nathan Huckleberry wrote: > Add hardware accelerated versions of XCTR for x86-64 CPUs with AESNI > support. These implementations are modified versions of the CTR > implementations found in aesni-intel_asm.S and aes_ctrby8_avx-x86_64.S. The commit message still needs to be fixed, as I noted on v5, since there is now only one implementation being added, and aesni-intel_asm.S isn't being changed. > > More information on XCTR 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/x86/crypto/aes_ctrby8_avx-x86_64.S | 232 ++++++++++++++++-------- > arch/x86/crypto/aesni-intel_glue.c | 114 +++++++++++- > crypto/Kconfig | 2 +- > 3 files changed, 266 insertions(+), 82 deletions(-) Otherwise this patch looks good: Reviewed-by: Eric Biggers - Eric