Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2338482ybi; Mon, 17 Jun 2019 03:09:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRyUx6LrSvZGg+bvWwMj83n2duawb/znMynl+Dsarhsji0y9VvL0yPZhpiVbGx9TDqICNg X-Received: by 2002:a65:5685:: with SMTP id v5mr49158393pgs.184.1560766146967; Mon, 17 Jun 2019 03:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560766146; cv=none; d=google.com; s=arc-20160816; b=CD6OXW6gwtwgGW8E+4rIMg6BN0XABORMBmO/f7UeGVT5PtqwxBACs1YFho+8bEKuTB OxBgjci3aTL1vIKC6udot0U7ZT5+7mzo7xGfECgSvvHvi/tYRgcVWvY10LKvkm0XMf0a 949RG4TI7eYWHh3r8kCaAM1f1kFIAxxpTkyGa+2pfE2pbKK1L0m0eRZe4s+I4EJkEbuh V1v/vfkZqzKHUemGPstr4sH1RP3Om8At/xQ5fk7xaIWavZP5LKSI5fk8mP7Uhyhf//Rn bhCwoZh/aU0TXn/k1cd4Vi7ir4EWU0mc9unTpWlDUMFDMtA+1pZSwjBCmaQXJT5Dgbab BX8A== 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=phk4zsb0gDUn1k5C8Ohpca86H3DKls+/C8fbYuXQYXg=; b=fsqnQ9xPKZfUX4Qznrc3QRFf7nN3GyX7AW1v075dph06osaSWfvmCZBfJ/7qPlhlqw uA5lwoqtExGacdCFGA3ktlpJ/8qM1OdFVrJgU0qLwNGPF/15kRxeyUZByiK/EH0ljHnS 17cJJn4c2ufQmvJ72PGfCgz4pAlRFCNMCMT5Cn9zLOEK3ZYoQ+OyRMvvVNT6b1VqXg/8 70rSOHWTrdkM79Tb36/mi8RMHBJlBUWasUW/LnTg9t2qMODmIHg6J2CuZA6LLNCgWudi Ecy0fVL/r5T61T3UEFuuD/XSJKlTKpOhiofd5ukTpXOjTWFgFceEjff1fjn96eFZp4d8 bgWQ== 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 b139si10214919pfb.38.2019.06.17.03.08.46; Mon, 17 Jun 2019 03:09:06 -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 S1727949AbfFQKIp (ORCPT + 99 others); Mon, 17 Jun 2019 06:08:45 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:32813 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726960AbfFQKIp (ORCPT ); Mon, 17 Jun 2019 06:08:45 -0400 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hcoZ9-0005Kn-HA; Mon, 17 Jun 2019 12:08:43 +0200 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1hcoZ8-0005Qj-Gh; Mon, 17 Jun 2019 12:08:42 +0200 Date: Mon, 17 Jun 2019 12:08:42 +0200 From: Sascha Hauer To: Horia Geanta Cc: Fabio Estevam , "linux-crypto@vger.kernel.org" , "kernel@pengutronix.de" Subject: Re: ctr(aes) broken in CAAM driver Message-ID: <20190617100842.wqoqan5o7hxpmgdq@pengutronix.de> References: <20190515130746.cvhkxxffrmmynfq3@pengutronix.de> <20190515132225.oczgouglycuhqo4l@pengutronix.de> <20190612094050.6esonhumzv2ywhdh@pengutronix.de> <20190612113536.eixnu5sqphynyjfr@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190612113536.eixnu5sqphynyjfr@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 12:07:27 up 30 days, 16:25, 85 users, load average: 0.29, 0.27, 0.25 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-crypto@vger.kernel.org Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Jun 12, 2019 at 01:35:36PM +0200, Sascha Hauer wrote: > On Wed, Jun 12, 2019 at 10:33:56AM +0000, Horia Geanta wrote: > > On 6/12/2019 12:40 PM, Sascha Hauer wrote: > > > Hi Horia, > > > > > > On Wed, May 15, 2019 at 01:35:16PM +0000, Horia Geanta wrote: > > >> For talitos, the problem is the lack of IV update. > > >> > > >> For caam, the problem is incorrect IV update (output IV is equal to last > > >> ciphertext block, which is correect for cbc, but not for ctr mode). > > >> > > >> I am working at a fix, but it takes longer since I would like to program the > > >> accelerator to the save the IV (and not do counter increment in SW, which > > >> created problems for many other implementations). > > > > > > Any news here? With the fix Ard provided gcm(aes) now works again, but > > > only as long as the crypto self tests are disabled. > > > > > I've recently submitted support for IV update done in HW (caam engine), > > which fixes this issue: > > https://patchwork.kernel.org/cover/10984927/ > > Thanks, I haven't seen this. I'll give it a try. This works here, thanks I don't have the original patch mails, so I'm adding it here: Tested-by: Sascha Hauer Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |