Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp532552yba; Fri, 3 May 2019 06:27:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxh+QavzcE0cVom6ReArGClZkVtsPb5N7HkdrQCB18PaKd8HmpWtp8lsJ9HyMF9zx6ucbd1 X-Received: by 2002:a65:6282:: with SMTP id f2mr10240023pgv.152.1556890047667; Fri, 03 May 2019 06:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556890047; cv=none; d=google.com; s=arc-20160816; b=NJqrZ90GvHpICmbfgfXfQIsTBymAEmFpNZdKxnmfH/PmWGipFjBKn59sk0z8TYRmDz hxne9aE4IFjFcd1ea8+247MvtRF9WfYOSRFFusrtqYIJ7vHJBiT26CfzUFcvbvm7fRu8 iUFkUY95HHYU9HzhZUMQLEIu02/BcDN9XiLke5iuJCRPJ7uKPQV8tnJ1y0TOaJFzSY28 HKTcRDEkqiUDLa9unpSlG4xOiYRE85EQj/IXOcRgR+OJJo0vemY6ppaoRE530J8DdFQC DPKjIXTK5nsLowit5FlT2h03TdcPiLBQYLPSpVLdTRI2VV0lDrAHyl++6cRkFLoHNzgZ WlTQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=gbGYUcJfiadacp0+RSDabBb0BHYowWTJY7pLCKUIRcQ=; b=OGI8AClMVTr9orkVxY4WBHftjlQ5p2/zTTR0n2s31GOc2BQJ4ROR3NpsrwNr0aX1Y/ eivW+RgfP9sKSO897VImOR/q2mPRNZipvorxN+X85ZxVWfBhZO0GmKQ91dHsvnnaIdIk 1VN36LFE2L9ZaLB/sfgMR98TQoMJmGaP/582txT5kI1DJDwgZZ37KC8c0qafB/Zy8ntq rhJYciB+nh7Zp447jrImuf6volBa0t67cHIDQCYuYuvxWkW/z6mfi7DgWxAaVBnxBtI+ CR2AtbTFXQdWmYOeH/B0NwqkNxP2VErWKbANKev7XuGnFoCBNaSjaNGcS/Mo35isKGgp LXsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g69si2138062pgc.408.2019.05.03.06.27.10; Fri, 03 May 2019 06:27:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727914AbfECNZl (ORCPT + 99 others); Fri, 3 May 2019 09:25:41 -0400 Received: from [5.180.42.13] ([5.180.42.13]:38092 "EHLO deadmen.hmeau.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1727892AbfECNZk (ORCPT ); Fri, 3 May 2019 09:25:40 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hMRNL-0005m0-P4; Fri, 03 May 2019 14:08:51 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hMRNI-0003By-3L; Fri, 03 May 2019 14:08:48 +0800 Date: Fri, 3 May 2019 14:08:48 +0800 From: Herbert Xu To: Christian Lamparter Cc: linux-crypto@vger.kernel.org, Kees Cook , Eric Biggers , stable@vger.kernel.org Subject: Re: [PATCH 1/4] crypto4xx: fix ctr-aes missing output IV Message-ID: <20190503060847.egfmvu2heoq62hsr@gondor.apana.org.au> References: <4c860f87b9339da1d1f700ba6a56a7a5e2eb14da.1555932334.git.chunkeey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4c860f87b9339da1d1f700ba6a56a7a5e2eb14da.1555932334.git.chunkeey@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Apr 22, 2019 at 01:25:58PM +0200, Christian Lamparter wrote: > Commit 8efd972ef96a ("crypto: testmgr - support checking skcipher output IV") > caused the crypto4xx driver to produce the following error: > > | ctr-aes-ppc4xx encryption test failed (wrong output IV) > | on test vector 0, cfg="in-place" > > This patch fixes this by reworking the crypto4xx_setkey_aes() > function to: > > - not save the iv for ECB (as per 18.2.38 CRYP0_SA_CMD_0: > "This bit mut be cleared for DES ECB mode or AES ECB mode, > when no IV is used.") > > - instruct the hardware to save the generated IV for all > other modes of operations that have IV and then supply > it back to the callee in pretty much the same way as we > do it for cbc-aes already. > > - make it clear that the DIR_(IN|OUT)BOUND is the important > bit that tells the hardware to encrypt or decrypt the data. > (this is cosmetic - but it hopefully prevents me from > getting confused again). > > - don't load any bogus hash when we don't use any hash > operation to begin with. > > Cc: stable@vger.kernel.org > Signed-off-by: Christian Lamparter > --- > drivers/crypto/amcc/crypto4xx_alg.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt