Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5117pxb; Mon, 8 Feb 2021 13:31:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQqH0TrcHeqzrVwI32l3FysGnLtkG5V5Q31pWr+TpDzI0/4KX70s+++gF6JVpT66v4lPBC X-Received: by 2002:a17:906:7006:: with SMTP id n6mr18641998ejj.35.1612819861884; Mon, 08 Feb 2021 13:31:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612819861; cv=none; d=google.com; s=arc-20160816; b=PqL4pea906vmVLfEslsKAJO2olQiT3gMN9D7DGhGWormyKBWRbXfYNPcajVIl39imV fS9TVXev/lHuIGqHdvy+wwuuFk9ZAyXSi2IcD/QfMx9XfK/NcMSqJm8T83Rtc7RKpLzm Qe39DsUaY297otBx2E2ywe2/eGi5iyfBaE3wN3ARR7iwdNMChhVWPEPHWPQGAi+OZpgD sl+4Gmc8giE8NyPDl/PTi3IIoLXqJnQUsDtorT2JBch3SYu30zZyKCF+UiGMytaanpUG r3eftG978IVVG4tdQieTAvNrz130kbBEj1imKyT2kxFrvCgGl9w5bC/OB1jfurOCcD+B EeEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=07eHUYx0ufkPbt7TXtd7pIoMK+nvhV0w+eUf7Y/K/FY=; b=AbgNXwFCKvoJ979Qtg9DxGr4Z9n4CU8+HCV30SQxik1+K6snPmAA4dF5yw1jRlznYL XFbmLJcBjvIbTMgGcSDAuRjkNjOo9Cli40CfSeNprZ32pg+zSxBEKYzMa/yvhUrYNNIG 9VNP4G0V6ouiXBOtSZrF4VkGsEWWoxOxAOeboVMjqEbUvenZH6/ug2L3eAtfKXVrqzs1 2Z1EHxx21ctK1PEWCe0G+0kZ0AzHIG/qe9bdDCKKLFcD8t3Ur8lYzw37//u7cxVBOX8r LJx17igevK8SmZEI+NacS8I0V9qkY1cGhnkkkIJrIjmI1xbc2siGJpdOwVVGIuEEXCVi VREQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f17si6234148ejd.597.2021.02.08.13.29.36; Mon, 08 Feb 2021 13:31:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236128AbhBHV2h (ORCPT + 99 others); Mon, 8 Feb 2021 16:28:37 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:39638 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236320AbhBHV2b (ORCPT ); Mon, 8 Feb 2021 16:28:31 -0500 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 2849772C8B4; Tue, 9 Feb 2021 00:27:46 +0300 (MSK) Received: from altlinux.org (sole.flsd.net [185.75.180.6]) by imap.altlinux.org (Postfix) with ESMTPSA id 05B704A474B; Tue, 9 Feb 2021 00:27:46 +0300 (MSK) Date: Tue, 9 Feb 2021 00:27:45 +0300 From: Vitaly Chikunov To: Ard Biesheuvel Cc: Herbert Xu , Stefan Berger , Meng Yu , "David S. Miller" , Linux Crypto Mailing List , Zaibo Xu , wangzhou1@hisilicon.com, Linux Kernel Mailing List , Daniele Alessandrelli , Mark Gross , "Khurana, Prabhjot" , "Reshetova, Elena" , Patrick Uiterwijk Subject: Re: [PATCH v7 4/7] crypto: add ecc curve and expose them Message-ID: <20210208212745.yi5shr4gkmdqy4xl@altlinux.org> References: <1611299395-675-1-git-send-email-yumeng18@huawei.com> <1611299395-675-5-git-send-email-yumeng18@huawei.com> <20210128050354.GA30874@gondor.apana.org.au> <20210129030004.GA3463@gondor.apana.org.au> <20210208063541.ribifj3445djxfy5@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Ard, On Mon, Feb 08, 2021 at 07:47:44AM +0100, Ard Biesheuvel wrote: > On Mon, 8 Feb 2021 at 07:37, Vitaly Chikunov wrote: > > > > Herbert, > > > > On Fri, Jan 29, 2021 at 02:00:04PM +1100, Herbert Xu wrote: > > > On Thu, Jan 28, 2021 at 09:49:41PM -0500, Stefan Berger wrote: > > > > > > > > In my patch series I initially had registered the akciphers under the names > > > > ecc-nist-p192 and ecc-nist-p256 but now, in V4, joined them together as > > > > 'ecdsa'. This may be too generic for a name. Maybe it should be called > > > > ecsda-nist for the NIST family. > > > > > > What I'm proposing is specifying the curve in the name as well, i.e., > > > ecdsa-nist-p192 instead of just ecdsa or ecdsa-nist. > > > > > > This simplifies the task of handling hardware that only supports a > > > subset of curves. > > > > So, if some implementation supports multiple curves (like EC-RDSA > > currently supports 5 curves), it should add 5 ecrdsa-{a,b,c,..} > > algorithms with actually the same top level implementation? > > Right? > > > > Yes. The only difference will be the init() function, which can be > used to set the TFM properties that define which curve is being used. > The other routines can be generic, and refer to those properties if > the behavior is curve-specific. Thanks. This may be good! JFYI. There is possible non-hardware accelerated implementations for ECC algorithms which (perhaps) may never go to the kernel source, because they are generated code. For example https://gitlab.com/nisec/ecckiila