Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp619082rwd; Mon, 12 Jun 2023 20:06:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6yl95rHl1d+YBgTnKbfNOb2D0neNPq9VtmP5mz7XFDV/qhO4kymAznCZIOKKJ/2SpLPgbg X-Received: by 2002:a17:906:5188:b0:977:c446:3a24 with SMTP id y8-20020a170906518800b00977c4463a24mr9696290ejk.7.1686625562647; Mon, 12 Jun 2023 20:06:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686625562; cv=none; d=google.com; s=arc-20160816; b=uwoyYYwjkiLvOvgFiejBELjnfM86cJCcInK2EzYh+uvg3j+AOau8utWbUOBbIooBib E6Uzfa9jRkK46NhmaWX/NipQouHf+ACu4fxxR8UImzfKHXQZEn+CHFdA+5FWihNf5xO4 w7vXOjDNe9sH0chOSq31c8KLavfIufLuoMAxoBau0IlBdEoezzkzziuq6c7HeR5qEcTG bOcYlUWOOPfT6ZcdvzppgxfWnA6pmK3Xp48pOmReo+R1poVurhMsBQUbUr+BjWiRN8TX 4WezHq/IiZQw6tdunUsjHZ232BBEJ9i4uzbCrmYv7d4iLN3FNhzrchsSXZZurTtorGUH N6YA== 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=u5b/yBv9piXx3FclIZEwDnvb/c/ZF589sUn4/7+Ix5c=; b=SZu8ga6lh6OhrQz+4fCPs7Ly7b0oGFMU3rDS9fiSW8jimYLPpB/fBKeuKJtgStqY9N Z5h8hiEZGP5rksuxQPTeqdulcTQpXeZG0npKftCzH3G+ZzimAxsWEAWlnAppdS2z6e8A yEyOKfDaofi7OIlig+iEbDmkqTVdZ4myi9Bdu7DgVNq5nkxYXIz0tz1i08XtXjnPn7DJ 8ztdysiMAA4c15lz/0Ed9rs9SZ+eQj3Pkp3WOCXzxNN5IWe7XXDjSg+7Mu5tQAPymv2l Cte+Oy9yeov+84Y/fGrPN/f8l9xQlCtCpHhxd+pgCD60LS94TRJUBhtWTt9vKQqLJBdr CIIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fmFutB7U; 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 h18-20020a170906855200b009786c837a05si6083306ejy.738.2023.06.12.20.05.35; Mon, 12 Jun 2023 20:06:02 -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=fmFutB7U; 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 S239282AbjFMDFA (ORCPT + 99 others); Mon, 12 Jun 2023 23:05:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239405AbjFMDEM (ORCPT ); Mon, 12 Jun 2023 23:04:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB1BB2117; Mon, 12 Jun 2023 20:03:09 -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 184E3630DF; Tue, 13 Jun 2023 03:02:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25F47C433EF; Tue, 13 Jun 2023 03:02:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686625338; bh=QE/bJwOrqp//Jql9+14/MwBTyhw4er96hvgONGtQRQA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fmFutB7UJyIqIvyYtzg1AhRZiCqep9yi7UDUTZD+BRwy69iezaNkdsmMzjfXkNDkF uq1944kIbErb3We3MTv2UfHDOJhnAakKbShcn8gxn9Ek6+a93OlDiNM3W8XbAOc5Mb eACE/U6o9yjpFlxF02c7JlDOccZjNV8T9K/sg6ZWGR1paTU3AgwWRErDIhSBSkP7Z7 nBO64y9c/jjjL/RVX3c3kY1uym4Lh4PP4MACduOmXaZEEJqCEPU5xfBbC60Gj7xT0c p5iL/yfQtr88Y2hO5W/gGWwB5jAKyTgwz9L6CUZmw6Tg78mKJQ7Aqnu89AETEYoJTZ IHUWlMs3YxGIA== Date: Mon, 12 Jun 2023 20:02:16 -0700 From: Eric Biggers To: Heiko Stuebner Cc: palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, herbert@gondor.apana.org.au, davem@davemloft.net, conor.dooley@microchip.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, christoph.muellner@vrull.eu, Heiko Stuebner Subject: Re: [PATCH v5 0/4] Implement GCM ghash using Zbc and Zbkb extensions Message-ID: <20230613030216.GC883@sol.localdomain> References: <20230612210442.1805962-1-heiko.stuebner@vrull.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230612210442.1805962-1-heiko.stuebner@vrull.eu> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Hi Heiko, On Mon, Jun 12, 2023 at 11:04:38PM +0200, Heiko Stuebner wrote: > From: Heiko Stuebner > > This was originally part of my vector crypto series, but was part > of a separate openssl merge request implementing GCM ghash as using > non-vector extensions. > > As that pull-request > https://github.com/openssl/openssl/pull/20078 > got merged recently into openssl, we could also check if this could > go into the kernel as well and provide a base for further accelerated > cryptographic support. I'm still a bit skeptical of the usefulness of a standalone "ghash" implementation, when in practice it will only be used as part of "gcm(aes)". Directly implementing "gcm(aes)" (instead of relying on crypto/gcm.c to compose "ghash" and "ctr(aes)") also allows some performance optimizations. I asked about this on v4 (https://lore.kernel.org/linux-crypto/ZCSG71bRuTzVutdm@gmail.com/), but I didn't receive a response. Any thoughts on this? - Eric