Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5875392ybi; Wed, 12 Jun 2019 09:56:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeQRvrPuUatiRmMMalKslLeJ9nuuDGJth+QsfUsvVA+F87yx8ibdUoprKi3ziOaF84oPWZ X-Received: by 2002:a62:e801:: with SMTP id c1mr63967214pfi.41.1560358598219; Wed, 12 Jun 2019 09:56:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560358598; cv=none; d=google.com; s=arc-20160816; b=bljDivnJ9zncRh/DzqsPOB4i2WIdrIlMsiWdZzufPZvIUe1xoa5dWYlZVGMjkDxDVL gv2jqhZJ5amXftAcPmyT9BWiveby9S9BEzsSUT7eW4+0fEF9ea+8I/b9wdwwlodm3l0L U6xwj/WQEOiTI4yKJZico92hepL2jZ940mGrXJpsza8UGcOPzXqYO4pr6DKt1fLzjuk4 CKGkjy/ol8912HvNGaq4ut7tw8/Et7j0Txn2lkCwOA5nV7AaICPzWZfGiY4iML5vLYtM qjLfZKYZxe1Ke2OIIoRKy6rrZlHeC4GKFGXX2O4B0G5oxY13HgkwYbTZSg7XytVS+XRB l/Fw== 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=C/5d4kCUKW7PTlG1H51x0eheWQoU7mBlAdSdiTli1NQ=; b=yUv3LkBOXJkeDbTWl+pUQQNeNeaMyoywCFLpI1U7FNglj9MfvHB/1JY3AMEj090tUt IKhUC9hhsufM2112K0e+AuoySjcBIS0oS8rZ2qWHNzg7YodZuCMBEwJHnoQZAQ/gZXCV AYquwzLyaV/ex7eFuVw1/n8U1qFC+L/Hc3i7gdBbANAO2SPOIln+/ekJ39P+83hmZ1BP Qe9xV93r9VVo9u+ozlYLR+5xcMxfs+NJElliXGImAnD2du+AiyAWGIO4PKK1o/pAo6IE brkwj6Q8bYeOrNCY10g3RkoyM6erpm4h7cG4YRzQZiz/xj63QphdEMZHhuvVcPkoSDsY WGnw== 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 w15si190514ply.127.2019.06.12.09.56.19; Wed, 12 Jun 2019 09:56:38 -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 S2409052AbfFLLfj (ORCPT + 99 others); Wed, 12 Jun 2019 07:35:39 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:56071 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409013AbfFLLfj (ORCPT ); Wed, 12 Jun 2019 07:35:39 -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 1hb1XV-0002w6-4S; Wed, 12 Jun 2019 13:35:37 +0200 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1hb1XU-0002rB-Ds; Wed, 12 Jun 2019 13:35:36 +0200 Date: Wed, 12 Jun 2019 13:35:36 +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: <20190612113536.eixnu5sqphynyjfr@pengutronix.de> References: <20190515130746.cvhkxxffrmmynfq3@pengutronix.de> <20190515132225.oczgouglycuhqo4l@pengutronix.de> <20190612094050.6esonhumzv2ywhdh@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 13:35:05 up 25 days, 17:53, 84 users, load average: 0.08, 0.07, 0.08 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 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. 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 |