Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3773814pxb; Sun, 7 Feb 2021 22:50:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJziTEv0mUmHQLB8gJQJ9M7xG7wkI9kjywt6VckoMZmjMGjMmWQ+njitDw2fRwHgw6rQBMp1 X-Received: by 2002:a17:906:26ca:: with SMTP id u10mr15559875ejc.165.1612767029987; Sun, 07 Feb 2021 22:50:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612767029; cv=none; d=google.com; s=arc-20160816; b=aqawW2ItZTmUBJ+wr9ByNewyb4cH65vCzMNZn0T8RKiqZTGfacKSKgT7FebKy8en8M CjmkZRp8eJTU71E8O4LBHUdjzA7S2eTMmmmDYPvFx4jM/7Y7bGcEaB5aR2mO+OgPzG4Q yAZiFI6jeXJws9S2sc0KZ7nJCUPbdYpDk8ZPZyiyw365WNnVgtmsbmzKUfeJw5sOgt4e 05tHiF4+SeABz83lhI+9tq6iMZzIAYFdXUyY0i/yFMsHSIyMH+vgdO1/e9QykheYkuL2 V8CxamW86qboE/3OINKV/y576U75SrSu4ShjjyLLX15oiDwsrLRNZx3hgvKnCnxM17t0 z6og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=LBPom8oQuVZAx1bGSWx53W0orgth6C3FO+N0dVPSpDg=; b=PWUH2+UKHnLaUJoNkd1U6/BCdnRl/zNWmoKG8m1EKhuC9OJKUYQ7RbQ5ajWl+AnVR/ H9AjzJUJw3bF44EPQKNxO/UPVqIFgkosYiDR+qbqNx20KUb4XF/0UohgdLgZVEMfh2al HUa0peeTkdyDUlTDfLPSS1oddYT2lpr29kszONswyvXiC+D9IrOOpjqWCtAdD4OM0pOx ghWLI5vjcU/rUe0J5QguzQpl2ZfS37Y5zoOINPrTPSQMw0EHvGL3mCIqQOn/kjol0ZKB reSR/576Gk5bc23x2cau0LVQjMjQbyH+OtbhmqdDa06JtWGr4zDJih+38SoY/M6opr90 j3tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gw3TI3PN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si9413734edg.401.2021.02.07.22.49.59; Sun, 07 Feb 2021 22:50:29 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gw3TI3PN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229623AbhBHGsr (ORCPT + 99 others); Mon, 8 Feb 2021 01:48:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:57200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbhBHGsh (ORCPT ); Mon, 8 Feb 2021 01:48:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 978EC64E6D; Mon, 8 Feb 2021 06:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612766876; bh=kQATBibazqnNCmN8dcGfS5T7v+WBIVLbjyFvnpYwQdw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=gw3TI3PNLQk1cQ1dyOFGagIq18ghucI70xiSo1HbNnnErndBFGRhpvtMk5F9Ly706 BBZEwwpa2Mjp9IHfa3DZ/sERUtmK0/AnxleiecIvx5RTvVdQ/5buOkvCpYWtl9wwd4 0M03oJ/rnDMZeLoqZKF0TQOGHdyMdYjjDaFUocMGY0y1MSltRF/7gowQ58rHI1I1vB kowLUUZVziqA6UH4D8nUHCb7JOqeK1T3BnIxWsbobj6h+RnTxzx0cgredyFfzVRtcj YwkEAJs/C9XI7q6fObvL64+cpchOXXfY1GyXIPRLU7sXI1Z1o+g6t/whepXKtGslEr nOikoYmfawLIA== Received: by mail-oi1-f174.google.com with SMTP id l3so4626587oii.2; Sun, 07 Feb 2021 22:47:56 -0800 (PST) X-Gm-Message-State: AOAM531mVo5NQ8Un6W5db3AMEuJWlgk6ZnfM1jjKGiYLEMqvHMMdYZp+ 3/JMs0fUQqAm02ndt+x1l6K5AD/SQT4vfb8e9ts= X-Received: by 2002:aca:b6c1:: with SMTP id g184mr10460313oif.47.1612766875935; Sun, 07 Feb 2021 22:47:55 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <20210208063541.ribifj3445djxfy5@altlinux.org> From: Ard Biesheuvel Date: Mon, 8 Feb 2021 07:47:44 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 4/7] crypto: add ecc curve and expose them To: Vitaly Chikunov 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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. > > > There is a parallel discussion of exactly what curves we should > > support in the kernel. Personally if there is a user in the kernel > > for it then I'm happy to see it added. In your specific case, as > > long as your use of the algorithm in x509 is accepted then I don't > > have any problems with adding support in the Crypto API. > > > > Cheers, > > -- > > Email: Herbert Xu > > Home Page: http://gondor.apana.org.au/~herbert/ > > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt