Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp48429ybi; Thu, 23 May 2019 23:22:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqz37Z5e0J3DnEkQhop8F6TJdI21BUig9/mRLsUJJzzDKWKWWjzpTuq23JvPJZ9bLOyIAXzB X-Received: by 2002:a63:7b1e:: with SMTP id w30mr98424022pgc.406.1558678922157; Thu, 23 May 2019 23:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558678922; cv=none; d=google.com; s=arc-20160816; b=1GfeEP67Hm+ep7A6SI4K/fEZuDeBjAJBrvuMBpcTi6zDvPdtdK2VsbU7ZrW7iJs90T wlyqyIOOCpYvmMlAo1pX9OtSevE3G+fcRo2wRcnJXyakwYdkWPsZIIc1O8uYABw7l7La 0QUzqF1lUA/l+HimkhcqPtmgJ/5uRdq/Jt99W9jEFhc/HrOQ9NVjYWbkFT6HUY7XZJDr ZXgpNx1Q7OzSXFzlIZz1wkXmA3YTWXadGI87pD2fejd72emQn8nNPur8M9D9gp3BKwYI o3FUuFeQ/0y3AXm7xkrMhdblYJEk/0qilOItWHD18KywI4ny4yxpF4KJvst+agz3ZAVx z2mw== 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=0kNON5XTeKK4o7LieIj9N9uE6W9s+0vmPCSwsAjAG70=; b=xyMojADPzo/r8dupiljKLTAgnCLiMPAGTUzkdDH3rhHuCqnT1AQurffM9ecWNIfr5M P+tzcedDxmTgCWTU3htbLjyhPaCiaKzSnxJhIiwmBYtjTSVShVR1FglcOnlHnXLHYu0s VUCI1efmgD7LK8E3YVxFQelPB+XxSXTpqoXh7qL9nlqBrVs62MkmTzbL1w8SHjEc3jPK PpDfycEDCeBgYUmlM6y3eb21sZ97hcwEqlfWmXllc+0bRGK5CWwDWUxd/QaxNZLKClY3 jSJ1+xfkyERZ0NDvjVAcIVeP6kJ1Lfgpvw/SBwv9Y5wzXoeIEskHJFaU1i3EIOiPkeVX 8qQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=ULwrlH1K; 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 f16si2530186plr.340.2019.05.23.23.21.43; Thu, 23 May 2019 23:22:02 -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=ULwrlH1K; 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 S2388176AbfEXGVG (ORCPT + 99 others); Fri, 24 May 2019 02:21:06 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:22769 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387936AbfEXGVG (ORCPT ); Fri, 24 May 2019 02:21:06 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 459GTX42qqzB09ZK; Fri, 24 May 2019 08:21:04 +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=ULwrlH1K; 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 fK8K6824bS2b; Fri, 24 May 2019 08:21:04 +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 459GTX31F3zB09ZH; Fri, 24 May 2019 08:21:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1558678864; bh=0kNON5XTeKK4o7LieIj9N9uE6W9s+0vmPCSwsAjAG70=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ULwrlH1K0ASETy0giF4mNwBV1Rhlz++Eh6YKI2BTX80Jr3WXh8cCQeFhMuKotoYrz HjCn18qzYS87Ryzp7d84Yo+YLnpXR9wABuP5JfUTq2jNELidjJOdkgyLkyIbHucxXT u06Orb7132NVnEwaK/datac9eT9KE99APGspfsS8= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 585AC8B790; Fri, 24 May 2019 08:21:05 +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 Nh7rH7RRI6wZ; Fri, 24 May 2019 08:21:05 +0200 (CEST) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3C7D48B76F; Fri, 24 May 2019 08:21:05 +0200 (CEST) Subject: Re: another testmgr question To: Pascal Van Leeuwen Cc: Eric Biggers , "linux-crypto@vger.kernel.org" References: <20190523185833.GA243994@google.com> <20190523200557.GA248378@gmail.com> From: Christophe Leroy Message-ID: <6e5a9618-fc54-f649-6ca3-5c8ced027630@c-s.fr> Date: Fri, 24 May 2019 08:21:05 +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 Hi Pascal, Le 23/05/2019 à 23:43, Pascal Van Leeuwen a écrit : >> -----Original Message----- >> From: Eric Biggers [mailto:ebiggers@kernel.org] [...] >> Note that it's not necessary that your *hardware* supports empty messages, >> since you can simply do this in the driver instead: >> >> if (req->cryptlen == 0) >> return 0; >> > For skciphers, yes, it's not such a problem. Neither for basic hash. > (And thanks for the code suggestion BTW, this will be a lot more efficient > then what I'm doing now for this particular case :-) > For HMAC, however, where you would have to return a value depending on the > key ... not so easy to solve. I don't have a solution for that yet :-( I had the same issue when porting the SEC2 Talitos driver to also support SEC1. See following commit to see the way it has been fixed: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d02905ebd22c0271a25e424ab209c8b7067be67 Christophe > > And I'm pretty sure this affects all Inside Secure HW drivers in the tree: > inside-secure, amcc, mediatek and omap ... > > Regards, > Pascal van Leeuwen > Silicon IP Architect, Multi-Protocol Engines, Inside Secure > www.insidesecure.com >