Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp159728lqt; Wed, 5 Jun 2024 22:28:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX93Lf6iMS9Seqn9kybuKuGmn+hGzi+EOX0TMTmP2bpW/t+nbNfkiQIi23BsA7BzjuT1uARfC9vD9wMFU450jwgnKmZYlndKaqmPIp1pA== X-Google-Smtp-Source: AGHT+IGpwkSBDVeoqMp7OOEVoUBO7qnB0k0RLWqA6nr3EDUZK0p6TqUabVvvIHwQVb/WKhgVJvnY X-Received: by 2002:a05:6820:1504:b0:5ac:9f7d:3b3f with SMTP id 006d021491bc7-5ba78f706ebmr5488125eaf.3.1717651690420; Wed, 05 Jun 2024 22:28:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717651690; cv=pass; d=google.com; s=arc-20160816; b=lYp2DwR38G9ExV+TqEChghzny8PMQplpgTTUeq/8fPx4hDErtyEu8j32c+vGD8rDJH kwNOvFB6e80F9yfhQy86lxswGgdDNlgSDBbJ8yZWPOZOXuPufeTUlvEBkc0wikIwWX08 N1FtkaGQi+CgLRLgIVvkPwHXLBc9O8dNM+YH9JkO+JF5BFJCLKeeLwFlhwGijHQqXsDW BcGlVpWHD9LSOBFuoIQesg2KjHN0ViGroSCgALTs7DrKElEwbphU7D/GR7l4L35heTRy yD+cljUDl3h1z42Aoa2HI3m0iwexCjZVKkhfh60sPEbe/XpGpQWg5CFzlFStmEoAIphV lGsg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nnx00aSyXpqSIYk4S/SFknn8vt+FcsbwE+h5hngO9Fw=; fh=V2TNGKG5uKhzZbmZIeBQVqEHN52tCpjUQL3SSVDjxIs=; b=AWcOs8oH+QyfkHL7G3P9q57Lk55nR0AUcFduClowF3MHfl79h9++/YGbSdNBpfT/7T hL/GrrLxnQr8MJI9VK/I8Azt3YGJT5eylodalKifGD4jgOMzjnaBTG6tFY1CuNMfb48t aAZG8w6bPx/mAADr9EgPU7+FKn1x1f1Jc1X2JQ3ADIZSlFvpl3tJKcW9pgSfqc1QpKL3 eoVKxsbMBjfN1AR9UUBH98EPX7MGblqGwe6xAfpcX3cPce/mGJixdhcsW78T3Cj1Rc98 zyYDy9Cv2noqHR7A/oVP9A+DlJJvAO7dh1Vlo/we20soesezBGm1NDqULNlpL1GL8ozP 1WBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fHGaWook; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4772-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4772-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de2045f5d0si572272a12.54.2024.06.05.22.28.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 22:28:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4772-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fHGaWook; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4772-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4772-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EECD428455F for ; Thu, 6 Jun 2024 05:28:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0014A3B1BC; Thu, 6 Jun 2024 05:28:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fHGaWook" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A50F138384; Thu, 6 Jun 2024 05:28:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717651683; cv=none; b=JzaGb47ExJsGRaEBU3cpERlp1EVzz6BTmxnPM8X9bObXS2Ao5BxwPOmIsQ4QYQDYX4klTy0zAP4bvmKNqFBPCo758aNsnNjlKY8hjrLZLFwhoBtB967Ud+73peOBcX3vOFNphmgcF9ztRsVJE6fQAl8815Iosw7FQ18zy9akb9s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717651683; c=relaxed/simple; bh=eENIBCPHkm00GMg6HuX97VGHvgr6QRp4HKMNEJaCIpM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Q49P5QrOYc+viGoEOB9iNEUw977JAznYnq1qK8MJtexrGbI4mBFsmP/wGFI5U/hxS2F79rOH2wqVjWWdBdtYmFfqeRw/Uc0LcvTAzVv9Ga73ab++eKvXJzuqdhFZ5zkb/oJfAMMgo9PkbMubXUrYP2uIMw3J+SUAzVUG7UPu0ow= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fHGaWook; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB61CC2BD10; Thu, 6 Jun 2024 05:28:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717651683; bh=eENIBCPHkm00GMg6HuX97VGHvgr6QRp4HKMNEJaCIpM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fHGaWookzEB1nl4KqrzDbHt8insomG1TZAd8kABfrnhMBGYiN7+jvSri0J4T25XP0 8QqHddMAum8flEVCEVuA89TnTUEzbbE0RlIjlx6M4F30epGEGHmJAJ280aqZz3OEaW MjC3rD673jDehWZFsZrfTHcFaekKQ4cZCrvmd2/sfeBQyCUoNeOlRaGcVubHslXfRI LbGwHJCfPx3Bot+WkIKeZ0PCl7wlzrVJiXmEUkNm8HoPHxgRy7IPipNgfFt6za4KJF FbKGJOsKRc4STSuUd9sRvQOuXjfVsQpqgGN8Pgm21pU7IKxYsDa64+YTRr6djm2xS1 NVDODtslsuwYQ== Date: Wed, 5 Jun 2024 22:28:01 -0700 From: Eric Biggers To: Herbert Xu Cc: Steffen Klassert , netdev@vger.kernel.org, linux-crypto@vger.kernel.org, fsverity@lists.linux.dev, dm-devel@lists.linux.dev, x86@kernel.org, linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Sami Tolvanen , Bart Van Assche Subject: Re: [PATCH v4 6/8] fsverity: improve performance by using multibuffer hashing Message-ID: <20240606052801.GA324380@sol.localdomain> References: <20240603183731.108986-1-ebiggers@kernel.org> <20240603183731.108986-7-ebiggers@kernel.org> <20240604184220.GC1566@sol.localdomain> <20240605191410.GB1222@sol.localdomain> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jun 06, 2024 at 10:00:05AM +0800, Herbert Xu wrote: > On Wed, Jun 05, 2024 at 12:14:10PM -0700, Eric Biggers wrote: > > > > This would at most apply to AH, not to ESP. Is AH commonly used these days? > > No AH is completely useless. However, this applies perfectly to > ESP, in conjunction with authenc. Obviously we would need to add > request linking to authenc (AEAD) as well so that it can pass it > along to sha. > > BTW, does any of this interleaving apply to AES? If so we should > explore adding request linking to skcipher as well. > With AES, interleaving would only help with non-parallelizable modes such as CBC encryption. Anyone who cares about IPsec performance should of course be using AES-GCM, which is parallelizable. Especially since my other patch https://lore.kernel.org/linux-crypto/20240602222221.176625-2-ebiggers@kernel.org/ is making AES-GCM twice as fast... With hashing we unfortunately don't have the luxury of there being widely used and accepted parallelizable algorithms. In particular, all the SHAs are serialized. So that's why interleaving makes sense there. In any case, it seems that what you're asking for at this point is far beyond the scope of this patchset. - Eric