Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp69772pxa; Tue, 11 Aug 2020 17:38:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnDpD/FVhRRBMz8lvRAiVgWSF9D7B+nJiUbZk59wVdGhik22MuBo60NwkgwR+1ioXzXlUL X-Received: by 2002:a17:906:ca4d:: with SMTP id jx13mr28319220ejb.548.1597192688195; Tue, 11 Aug 2020 17:38:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597192688; cv=none; d=google.com; s=arc-20160816; b=RIwKYgmntKrPGUaZEMEHkSNM/XUgowAANJNzJ7FzFl1KCWfXTgOpichfs4PAG0ggPX C9U4CkJbHwIQ9gesHbDaKEQAzu2v6vtkc3c37vCfjlNUK093mldjrVjHW5/u8XenF++x mTjwW/dyuCBAR0KBFIkjL0S9eMmDjwOPriaQk6C41uGP0ipeyw682kGxVv9GYW8B60g8 eCI0Y3+NxAYqyHo8nuQtvVYq2YAWMrS2obodRrN3US5BTVyhB2SR4aws/IShjOf6OrOJ kv9iehSSm+oap+3oM1eHA3WstCSxl2TiBmn6Z1I0sO7SgkyDzd6A3B8ed9JpsURz16FA Xf+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=RPSOaS5UCRn8/hCQawSo6pWVbC3k9nggDDrXkLCF8aI=; b=N+j0cfk5a7AR7A/K3z2I5Ma0Tfz8cbZMUKVTFocV+/FFrH9NNYrcadBgpPpPfWnczl SSXDahQCMhzbVTPqErPmscBeA5Zgh0/7bVAoE14UFXE5oSn51guO2Z9IdKO5I1SHUx9z ZyiCQXM21pm9q5YIHKwFBXXMnEyM9DTqBuBRXF3lMCLhdGtfPhGevW9uydTGGiv49iMv DBSN52BO58zzFwACZH7G1f1cg7KI05JY/o/cV4NGf0kbmuIvtRPCIT0U+YP03HL3MRio epdNfgmw8s3oMOC9Ed9TNP4hC1eoTg7vfr7r+NFW64lYREWnXq7E3df3zl36HjWEzyxH mq6Q== 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 bs4si231656edb.568.2020.08.11.17.37.37; Tue, 11 Aug 2020 17:38:08 -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 S1726333AbgHLAh0 (ORCPT + 99 others); Tue, 11 Aug 2020 20:37:26 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:51294 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726143AbgHLAh0 (ORCPT ); Tue, 11 Aug 2020 20:37:26 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1k5ekq-0007Xc-WE; Wed, 12 Aug 2020 10:36:34 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Wed, 12 Aug 2020 10:36:32 +1000 Date: Wed, 12 Aug 2020 10:36:32 +1000 From: Herbert Xu To: Horia =?utf-8?Q?Geant=C4=83?= Cc: Eric Biggers , "Van Leeuwen, Pascal" , "Andrei Botila (OSS)" , "David S. Miller" , "linux-crypto@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-s390@vger.kernel.org" , "x86@kernel.org" , "linux-arm-kernel@axis.com" , Andrei Botila , Antoine Tenart Subject: Re: [PATCH 19/22] crypto: inside-secure - add check for xts input length equal to zero Message-ID: <20200812003632.GB4166@gondor.apana.org.au> References: <20200807162010.18979-1-andrei.botila@oss.nxp.com> <20200807162010.18979-20-andrei.botila@oss.nxp.com> <20200810134500.GA22914@gondor.apana.org.au> <20200810170305.GA3352718@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Aug 11, 2020 at 06:28:39PM +0300, Horia Geantă wrote: > > What about, for example, CBC? > AFAICT cbc(aes) with input length = 0 is valid. That's just because CBC accepts any input which is a multiple of blocksize. > Same for CTR (with the note that blocksize = 1) and several other algorithms > mentioned in the cover letter. CTR accepts any input size. > What's the rule in these cases? What input size is accepted depends on the algorithm. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt