Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp704095rdb; Tue, 5 Dec 2023 18:36:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0bR7imcijdQPA/9ZDuTKxGDFNMtYhEugiuDTXRONitQaBozq5Uyf86gRDsD5hA9/andKq X-Received: by 2002:a17:906:298:b0:a19:a19b:c6ff with SMTP id 24-20020a170906029800b00a19a19bc6ffmr101749ejf.79.1701830212212; Tue, 05 Dec 2023 18:36:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701830212; cv=none; d=google.com; s=arc-20160816; b=EbhNlfXgNo7+4ZtXDcjbBj6AL7k+TseJ3evjqk6wXziS9JKZqHrJrGIzeZKyXsW5RB 4Uv6vIbe3iLkQiQcGGK21rHQQNgxozoOVNoskHdF3vLg+BGWX8dgnFumARWKOUxVOwmA yvMvYozpLvDKKClj/VU1J194lkVeHLYhyE44bE1e81K9Y4oMj+/DBoa3m22mx2i5zBQq /1keTqEsGWhRdLUicWUz8iyMSc8TxCbhW8ylrTOK48FDr3F15JoWbSBuJ1JrqjuB6vaC 2dT1aZS6t/436FQtEJsLVOiOR57sz2bDLnTBQ5D0qZfu7OwnGRhtPkL6FqXeJNNvSJlt SA4w== ARC-Message-Signature: i=1; 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; bh=dGlvTFswbl1PnfHwo7U1/trs8ZU15fOEFeo736zD+Ec=; fh=gvAaTn7V2ako+socwadq3mowY+XpjEU7R+nroQHn0Qk=; b=lU9IP9DVHugGP359HCTVDPW+Xz3IEA7FP1L/8N7M50EqlN5q50FwVGrwDSsl0KqURq 5T9f04f4l5oA6SBn6eKZWOL5TQ2bGqrMWADa5bnbTPbGa8m38LWb7fvnYU7LlUe776kU IO2+uO7N7nz00N3VOSyE03Z8qIQ9V64SVKwIIQConVCm2MQIZRW33i6inzJzQea7ipBk HfDbZr/DnMOAiYrKl3zyus53XV49kBBi/2Rp80E8FeHa4Yy6W0CR7X+2azrqQRvSGLyg 7DKGsnAM6cTc91hD5JRDeDzmb6vS4GcE05KbOs3E4Z83Wh9VOsc1McpJosY2FTajvRy4 pPkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-607-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-607-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z15-20020a170906668f00b00a1c5257f7e0si1226558ejo.786.2023.12.05.18.36.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 18:36:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-607-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-607-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-607-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id EA1F61F2164B for ; Wed, 6 Dec 2023 02:36:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 734D018AF8 for ; Wed, 6 Dec 2023 02:36:50 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4661D69 for ; Tue, 5 Dec 2023 17:44:07 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1rAgxG-007NYP-Dj; Wed, 06 Dec 2023 09:44:03 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Wed, 06 Dec 2023 09:44:12 +0800 Date: Wed, 6 Dec 2023 09:44:12 +0800 From: Herbert Xu To: Eric Biggers Cc: Linux Crypto Mailing List , Ard Biesheuvel Subject: Re: [PATCH 4/8] crypto: skcipher - Add lskcipher Message-ID: References: <20230914082828.895403-1-herbert@gondor.apana.org.au> <20230914082828.895403-5-herbert@gondor.apana.org.au> <20230920062551.GB2739@sol.localdomain> <20230922031030.GB935@sol.localdomain> <20231205201757.GB1093@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: <20231205201757.GB1093@sol.localdomain> On Tue, Dec 05, 2023 at 12:17:57PM -0800, Eric Biggers wrote: > > Note that 'cryptsetup benchmark' uses AF_ALG, and there are recommendations > floating around the internet to use it to benchmark the various algorithms that > can be used with dm-crypt, including Adiantum. Perhaps it's a bit late to take > away support for algorithms that are already supported? AFAICS, algif_skcipher > only splits up operations if userspace does something like write(8192) followed > by read(4096), i.e. reading less than it wrote. Why not just make > algif_skcipher return an error in that case if the algorithm doesn't support it? Yes that should be possible to implement. Also I've changed my mind on the two-pass strategy. I think I am going to try to implement it at least internally in the layer between skcipher and lskcihper. Let me see whether this is worth persuing or not for adiantum. The reason is because after everything else switches over to lskcipher, it'd be silly to have adiantum remain as skcipher only. But if adiantum moves over to lskcipher, then we'd need to disable the skcipher version of it or linearise the input. Both seem unpalatable and perhaps a two-pass approach won't be that bad. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt