Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp894974yba; Wed, 15 May 2019 11:50:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqycH24PIO/pCUBuuUh/vu+g1ZaCoMiCgX4E5kR1O5XFTfOvbWXGQDry/gEkzEFOpYl1qjtE X-Received: by 2002:aa7:8683:: with SMTP id d3mr3964742pfo.145.1557946216752; Wed, 15 May 2019 11:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557946216; cv=none; d=google.com; s=arc-20160816; b=dUur72dCAPIrCBvbcCclYTjh42ZOetvDj1HmTlL/3LrIllFrDAjdSI0OBJF7y9I5Lf aK3Xku++pkYIjudPwRLIZU9+nVHhsz7EwcKyllKGIjqBkPbZmctbI+fHOUTjh8AHWQvP EAKc3xUwMtNh8zdSPbqqpcF7XqKifwLK3cNPq+RGTBttmg9m4jmf9T2WQv5rWTwSWJav F/1Oz5Ghy7Kqt0WfSjBV2ycTAT5+fnCJmvmgs8DE5GKVXGxc0jI8UD5OZagc6aaSzjtW oNDzPXJd+FcSe9BeQgasXTSJooGbubdRj8prdQNmM/9F5j3RtYwNmVAlu3hirIC1qY+e oUgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=wBrpo1MoExfTHDTOuQ8khRkI2TENEgtLi5T2igaQbeQ=; b=KEzRmPiSnEjrBIHADtA5NlCaUQ4m5qnmcruHM9/YXRuMW7c8QD+13ZKjznLElcTQrw N5XsYrg2TLhKmUx2X2iPaMJOroXkmo2O/Kednp35xsOtfqCbMjZ7a0c7HsHxYxcaYP7x sKN3SMFQsM+KnYYINwPoIHmHAiuwU/Gu2AKdJDx54TyXLf4BsFDTBruu+EJWgeg+mQ3Q Vz9+WS6x4C9d7mahH34r+Nx2+oHMKwPwxLPyFOlAOCbJRvVQIdEhihVnwzgZpU9itZAB VB60hcyEJmRldnYjb1FCI9KwpYnACQGC5of/SMQFlqsRhcHIrmCC0v0DRQPkiK2bWns6 /xLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=HaT1YcGr; 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 u28si2554721pga.131.2019.05.15.11.49.54; Wed, 15 May 2019 11:50:16 -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; dkim=pass header.i=@c-s.fr header.s=mail header.b=HaT1YcGr; 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 S1726466AbfEOStu (ORCPT + 99 others); Wed, 15 May 2019 14:49:50 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:65315 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726392AbfEOStu (ORCPT ); Wed, 15 May 2019 14:49:50 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4543Wc4Kftz9vBmK; Wed, 15 May 2019 20:49:48 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=HaT1YcGr; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id XQfzn5YHrpCM; Wed, 15 May 2019 20:49:48 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4543Wc3BsCz9vBmJ; Wed, 15 May 2019 20:49:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1557946188; bh=wBrpo1MoExfTHDTOuQ8khRkI2TENEgtLi5T2igaQbeQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=HaT1YcGrmwozmMTALTyVjfG7UY2ZwxBgHEhiznnF1Rkkcv99Yvl13jdwMLRBwHQr7 /N70qxjjLAiibtIyWXco+5MBOfXNOMQUW9pB1e50lbHz2G0TJstQdW0H1X/PqSmhRe 8T4ZXBEcxNUX6Wy5Mb9RUMSxLVho5RdXsZGxfNYk= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 75A228B914; Wed, 15 May 2019 20:49:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id RaVwrqDXustf; Wed, 15 May 2019 20:49:48 +0200 (CEST) Received: from PO15451 (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 120318B918; Wed, 15 May 2019 20:49:48 +0200 (CEST) Subject: Re: [PATCH] crypto: talitos - fix skcipher failure due to wrong output IV To: Horia Geanta , Herbert Xu , "David S. Miller" Cc: "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" References: From: Christophe Leroy Message-ID: <29db3f20-f931-efc6-02a8-fe160ab8b484@c-s.fr> Date: Wed, 15 May 2019 20:49:48 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Le 15/05/2019 à 16:05, Horia Geanta a écrit : > On 5/15/2019 3:29 PM, Christophe Leroy wrote: >> Selftests report the following: >> >> [ 2.984845] alg: skcipher: cbc-aes-talitos encryption test failed (wrong output IV) on test vector 0, cfg="in-place" >> [ 2.995377] 00000000: 3d af ba 42 9d 9e b4 30 b4 22 da 80 2c 9f ac 41 >> [ 3.032673] alg: skcipher: cbc-des-talitos encryption test failed (wrong output IV) on test vector 0, cfg="in-place" >> [ 3.043185] 00000000: fe dc ba 98 76 54 32 10 >> [ 3.063238] alg: skcipher: cbc-3des-talitos encryption test failed (wrong output IV) on test vector 0, cfg="in-place" >> [ 3.073818] 00000000: 7d 33 88 93 0f 93 b2 42 >> >> This above dumps show that the actual output IV is indeed the input IV. >> This is due to the IV not being copied back into the request. >> >> This patch fixes that. >> >> Signed-off-by: Christophe Leroy > Reviewed-by: Horia Geantă It's missing a Fixes: tag and a Cc: to stable. I'll resend tomorrow. > > While here, could you please check ecb mode (which by definition does not have > an IV) is behaving correctly? > Looking in driver_algs[] list of crypto algorithms supported by talitos, > ecb(aes,des,3des) are declared with ivsize != 0. According to /proc/crypto, test are passed for ecb. Christophe > > Thanks, > Horia >