Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp274042pxj; Fri, 14 May 2021 03:10:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiQ3XvjiwtxtmrUPuRdtqgKvAejptJdhGbADrLsxFBJkJuU/KXHEpsMHBi5FyYGd68b6Gv X-Received: by 2002:a02:cbad:: with SMTP id v13mr42808383jap.28.1620987027194; Fri, 14 May 2021 03:10:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620987027; cv=none; d=google.com; s=arc-20160816; b=Vi4R5V4d+8zZaqb+3qQ5Q2Bew1JWK1PgXI768j39G6fE9jmTcaX4Tn94EEsIkc+rmr S2+mWSXrwIdsdZE+hncp0i6J5W9Q5j8Sf4vDeMy1NCLuCNDePvTwoiXjv59wNLSp1lBY /ei5o2KYCGHEOLsd5/JD3mGU1HI/hEi0AReo7BnjpO41CXkWHude+NjJNFm3SNd+PRX7 GGzssbLRp0joEIeqcObqxwok7/J7PKoFUNC4CNhb6qCYf1eIasm2eOO6ylENdOPAc1e5 gWkYIIzmNcLj8c21qH+vwnYvFkzQOv2VuQ98yrxoHIW5kCVvl0Z/M99bIqVWX81MTpjt 7McQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=7c1To0FQNZ5EEWUxaDyZMucJw0C/Lyqkd7z8lkfcHYI=; b=jKcxBvlmtec1/IJuvuZGs2+EXbd6Ek0qpE7DcKdiUCVcfudsDHmFoW1i6YKke8Vw/5 toGrYnX73sqCwEn7r2rmvORvvRXYCLdvvYh6yptGhDp3gafRwSPo1AO1+ooeWv2Ga6Bl sfRMCSIlAIvSk6W8dk+RGMX71Y5LYuKGCUcobb/KU8bRzoFKr2K/uLp0E1AamRK+giIJ 5QtEDkbAP+uqdGw3JMfZkL+CZCsdAGvjhNYs34CbrNPcWk9odzmPzXAq1T+HNPPHLKnp bKWybzbmPS8ZWIWQ/VWmoLo4NQbQM0N101gN83jlz0drZF+ThL92Y0IZSB9wr7DsyBmj Df1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si7223339ioe.38.2021.05.14.03.09.52; Fri, 14 May 2021 03:10:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbhENIHL (ORCPT + 99 others); Fri, 14 May 2021 04:07:11 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:36258 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229654AbhENIHL (ORCPT ); Fri, 14 May 2021 04:07:11 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.89 #2 (Debian)) id 1lhSpY-0007zl-Qd; Fri, 14 May 2021 16:05:56 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1lhSpV-00025g-Ux; Fri, 14 May 2021 16:05:53 +0800 Date: Fri, 14 May 2021 16:05:53 +0800 From: Herbert Xu To: Eric Biggers Cc: Mike Brooks , Ard Biesheuvel , Kestrel seventyfour , Linux Crypto Mailing List Subject: Re: or should block size for xts.c set to 1 instead of AES block size? Message-ID: <20210514080553.bogfwvq6vs6wvdch@gondor.apana.org.au> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, May 11, 2021 at 12:31:17PM -0700, Eric Biggers wrote: > > Well, the problem is that it isn't well defined what the cra_blocksize property > actually means. Depending on the algorithm, it can mean either the minimum > input size, the required alignment of the input size, the exact input size that > is required (in the case of block ciphers), or the input size that is required > by the algorithm's internal compression function (in the case of hashes). > > "xts" follows the convention of cra_blocksize meaning the "minimum input size", > as do "cts" and "adiantum" which have the same constraints on input sizes as > "xts". > > So I'm not sure that changing cra_blocksize for xts to 1 would accomplish > anything useful, other than confuse things further. At this point we can't change the blocksize of cts/xts to 1 without breaking af_alg because it needs to treat them differently than it would for a stream cipher like ctr. But to properly support af_alg on cts/xts we do need to do this. I have a patch-set that adds the final chunk size to do exactly that but I haven't had the time to finish it. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt