Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1059243pxa; Fri, 28 Aug 2020 02:26:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzE+wh+63YToIqxgIx4zTO/NHnfBI+U+e4xZzpUg9IBzWZvlCNOTRUYa6Wj8t74fMqK5D+ X-Received: by 2002:aa7:d3c7:: with SMTP id o7mr924476edr.386.1598606819258; Fri, 28 Aug 2020 02:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598606819; cv=none; d=google.com; s=arc-20160816; b=e67Be2VUPUF8h5Qlf7MKBLUvnjwQZlryZr2Gaw9hP5yiQdOzSLjKVpG9ppOloxH+J/ mrvU1OJgzXhSboF4xxtTbrCOizQ8dJPNiyPtcotcllixUw/LiyS6B9B8tJqLNM+oLcQ6 W8OhsKA+w8Yt80AMEtIpQ3hRHAPPc0O2N7SxRAxn5Eartnr78dt1L6F9FjVYTLWIW5Jz hxTNjTqiUVLS29I9RiBuL4mILzIkUK3FBLx7AbDY+iifSeSAis+vqiUMyz6142sBmEPP 8UGrVw4ZIaxzjjPHgVYG7QYTaKhE8P2XT5tJwhP2OlZvVGl+wVegPvjjh+J10sKsdsjI m/ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=uqpn5eiFWnWeaEUdA/Tb1+An29gMvhuXpyva0ED4gco=; b=CeIxx9cRe8TdUFvck5LMliwq+dihMK3TJadVJt+utpOP6B35hX0d4eOTGm/THMyc/c vO7vnjcZ2JqpCkqzmBS14HNw+bhfLZjReb5bNX3P++HQmyyCxSLdRyF7EuijRZNrcV32 rjZ3mn37vXzENeQ2ro132VKl1MR28uPV6Tdv1kyQgMrYwE6n0vLUA45qPsBBaptawLqx Pxky4YyE97xFMPP0vZ9Tgc4x/vAtwOTnw5iqsu4d35+JWKYgMnfzJplBSLpq+rHulrgV x4uDOx8DtETR4jvN60QL7t/EqXa43I+iJ2WKnFFGGMlKdMkuXvnUYcmxFc2gu22PGWnF DeWQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t4si300099ejd.29.2020.08.28.02.26.26; Fri, 28 Aug 2020 02:26:59 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728501AbgH1JYN (ORCPT + 99 others); Fri, 28 Aug 2020 05:24:13 -0400 Received: from mga03.intel.com ([134.134.136.65]:27139 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728554AbgH1JYJ (ORCPT ); Fri, 28 Aug 2020 05:24:09 -0400 IronPort-SDR: EF+ZDrteYkofyfdRvSVB1tn9RP8PO900mwCLXXsOkvUTCi/8rt+96zwF2F1Bdvp1ZfuSsIUvoe LxaFPUVAWW0g== X-IronPort-AV: E=McAfee;i="6000,8403,9726"; a="156640753" X-IronPort-AV: E=Sophos;i="5.76,363,1592895600"; d="scan'208";a="156640753" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Aug 2020 02:24:08 -0700 IronPort-SDR: kGYpc7iKBlLVuT30qtPuLV2opAuMqwLzP0vMF4NW9HJuUL7fepk04oQOYa6/Q/rHR8x3eXbWWU HnAuW7Q7vY4Q== X-IronPort-AV: E=Sophos;i="5.76,363,1592895600"; d="scan'208";a="475606774" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314) ([10.237.222.51]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Aug 2020 02:24:07 -0700 Date: Fri, 28 Aug 2020 10:23:59 +0100 From: Giovanni Cabiddu To: Ard Biesheuvel Cc: Herbert Xu , Linux Crypto Mailing List , qat-linux , "Przychodni, Dominik" Subject: Re: [PATCH] crypto: qat - aead cipher length should be block multiple Message-ID: <20200828092359.GA62902@silpixa00400314> References: <20200822072934.4394-1-giovanni.cabiddu@intel.com> <1cffce42de2f4e7b84514a27bd9a889d@irsmsx602.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1cffce42de2f4e7b84514a27bd9a889d@irsmsx602.ger.corp.intel.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sat, Aug 22, 2020 at 02:04:10PM +0100, Ard Biesheuvel wrote: > On Sat, 22 Aug 2020 at 09:29, Giovanni Cabiddu > wrote: > > > > From: Dominik Przychodni > > > > Include an additional check on the cipher length to prevent undefined > > behaviour from occurring upon submitting requests which are not a > > multiple of AES_BLOCK_SIZE. > > > > Fixes: d370cec32194 ("crypto: qat - Intel(R) QAT crypto interface") > > Signed-off-by: Dominik Przychodni > > Signed-off-by: Giovanni Cabiddu > > I only looked at the patch, and not at the entire file, but could you > explain which AES based AEAD implementations require the input length > to be a multiple of the block size? CCM and GCM are both CTR based, > and so any input length should be supported for at least those modes. This is only for AES CBC as the qat driver supports only authenc(hmac(sha1),cbc(aes)), authenc(hmac(sha256),cbc(aes)) and authenc(hmac(sha512),cbc(aes)). Regards, -- Giovanni