Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1497995pxb; Thu, 4 Feb 2021 14:52:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJza4tfquHYlGTWbAe7dfFBcQ36zLQkjx+ZONsWFU7+GeOHn4b7/nwV2GPtYr+qTOm4valJM X-Received: by 2002:a17:907:aa9:: with SMTP id bz9mr1229306ejc.528.1612479121067; Thu, 04 Feb 2021 14:52:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612479121; cv=none; d=google.com; s=arc-20160816; b=b3QliQ/wHG3uUrGj1/tS2gf5bVp2AGjKaieXmuL6ERZ/vmFa1WeDzEUoNHjmTGCWJt IXb4BLPVkbKXM/KAktlXsg8lO0D4ZqV04X3eMlKaDXOAxnRH5NLBpjohOTHacw/aTcNF bt4sDTtZ0831lBw6JbT0mJh7ulSS8rhK6WW5IIkSi0qpR145hAAi/YJ+gfWUI35DRO7k tytL0aUN7SjgreDl+qVuArseOCRsm4piervw8aKycsY6lGXmWeT3MxWkgU3HrAjgs3ZS lM0PcPTKb5IEyCQTmH8XV2TxUxK3DmbgA+tX8L98St8j6Wp659cB/J6N7LAwc1JLxxcd zw1A== 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=kK656tpjWxPBcXsFf4QkBekgar8/aIJtUUEMrMmLkto=; b=eCDdcjx+t6PVBrEMIdVQYDZoXrU3x0sOiMCe0mj9upUSMYi18LbnJO6lOWOlioQM93 ok8gS9k/VTHrZiyJdep42fR37wHn5O6/y26mP7NBtPjK7HnLhJNEQmxjxP6iIr4lFgTy Q1PqM9mJ5/jXQW6wv6yYN5UJ/c9HVwx6xxX2UuZiCGVVVX9Lvxe1mwPdYRVbtmdHXabm vyKKbIanjAMhaUoEFXpqQMe+t0GghMZjX13L3ZGE3DSbVRUPMsZ9BRxwN/AEBLWkGjUN eIWg2Yue8oqn0TlV13G0I22ql9ZPd5OaKhIzayoRI6i192K6Tjfi9DIlNBmbTp4B9Eqg vKDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ZzRCGR/c"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z20si3740715edb.95.2021.02.04.14.51.36; Thu, 04 Feb 2021 14:52:01 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ZzRCGR/c"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229537AbhBDWvf (ORCPT + 99 others); Thu, 4 Feb 2021 17:51:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:36798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbhBDWve (ORCPT ); Thu, 4 Feb 2021 17:51:34 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3964164DF2; Thu, 4 Feb 2021 22:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612479053; bh=b7/DOj8yTlW6Ki/g1Nc/XJAKb54ufx8aB1nPTSLqICE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZzRCGR/cnuI3jleZl+vzmr2fvdF5hwb1L6+HFRotP9Lu9fxtmlk//iL9GG23sX57C oCH5OzkdwoZ32vLUd1fhYkGcKCvzc+GeoHnp3AS7U9b10cIeDMgypRxRhdHRZVW1CJ SSHiSyDb0az5L6Z0os5cvwvECm117Mc9jkqOg7Gb8nJYgIO4+O5KF8XoagiwE3JFdZ uqet2yZl03S+QF/DBOqsUnEx8OYNZ1WEzACB+JVI3vWJ4r17Aqbo4ZuYNrt2P0au70 uOh0nGTtiy78Fmt+O2acdrNlm6YmgNpi4HcpFm9ULA1OjvKULnyUkJh+2lmctdNMUW S2FoeLYxz1z3w== Date: Thu, 4 Feb 2021 14:50:51 -0800 From: Eric Biggers To: Thara Gopinath Cc: herbert@gondor.apana.org.au, davem@davemloft.net, bjorn.andersson@linaro.org, ardb@kernel.org, sivaprak@codeaurora.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 06/11] crypto: qce: skcipher: Return error for non-blocksize data(ECB/CBC algorithms) Message-ID: References: <20210204214359.1993065-1-thara.gopinath@linaro.org> <20210204214359.1993065-7-thara.gopinath@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210204214359.1993065-7-thara.gopinath@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Feb 04, 2021 at 04:43:54PM -0500, Thara Gopinath wrote: > + /* > + * ECB and CBC algorithms require message lengths to be > + * multiples of block size. > + * TODO: The spec says AES CBC mode for certain versions > + * of crypto engine can handle partial blocks as well. > + * Test and enable such messages. > + */ > + if (IS_ECB(rctx->flags) || IS_CBC(rctx->flags)) > + if (!IS_ALIGNED(req->cryptlen, blocksize)) > + return -EINVAL; CBC by definition only operates on full blocks, so the TODO doesn't make sense. Is the partial block support really CTS-CBC? - Eric