Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp877977pxb; Thu, 28 Jan 2021 02:32:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSntNojmGVpXfFtvJSH4xVWFVdh0dTJCerEU6iTc+IjgackY3Iqa/x8CAb9665l8iihg2v X-Received: by 2002:a17:906:6053:: with SMTP id p19mr10532293ejj.93.1611829975256; Thu, 28 Jan 2021 02:32:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611829975; cv=none; d=google.com; s=arc-20160816; b=czngeZM3e+k9g209vkJSKpIHPenpu7IdlJC2BDCxGwvmwkTit479rIhxMWG9NG/Dz3 Rw30ZRn4n2i5H0VyUkH/8lhlHgAFGrKvu0LqFOLj8IctxpTL/COqJExzWlF6brZWRmAu uou4pFEsnh9RRUqX3MxXfaUtHBEqL780qdYhONkvg19Y/6gWcDksaKrnRoMp4hFxOcbd YEHc44SnYrdMdBh8A1W1gMrXKFFMj+F7LNnAEb6SNY83ZMfhzyeqGYE7YXIVwRKowFnr WMHZylduqNymjJszSYjAkhRXlEzx3p8pMZIbuddgrtQTxM2/79jZXR8YK7pL0pl0RltK xcVQ== 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=5KExjknD5ROY6MJJH4AMpEpBg69K6IyRGy7DJFghQSU=; b=baFFBj31Xm81ngKv2tmDertBF0XYZ+UApqGip9isUL8IeXdk/3V155S9PQuHsr/h9A go9oUD3d3VmmsQKIP0Gw8fi0kKd3nbnVC8omsH/ruDO6NtJibAvtVrOrr/aGV6E/XIO4 s0lt9LPqlot5+mZUhAR/UAZ/42AAHJbFuTxr9AlHAESC1yqp3WfxOumDIwfgRcZ6z2S3 bVVmaiuaGGZ1iS5YZMpZgYDShcQO2mJpk04Uy4dkh8p4+QKSgOMF5VaOaiBySUrN0U13 YiPixCMSu86YlDr9nj4stJZN21nYKxmegjHkEPO1YEYo3BjdBzpKOBIxyGb50S+Zq9wE 9Gfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MAYXKQPj; 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 c14si2552362edv.132.2021.01.28.02.32.19; Thu, 28 Jan 2021 02:32:55 -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=MAYXKQPj; 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 S232448AbhA1Kb3 (ORCPT + 99 others); Thu, 28 Jan 2021 05:31:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:34012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232361AbhA1KbR (ORCPT ); Thu, 28 Jan 2021 05:31:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D733064DD8; Thu, 28 Jan 2021 10:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611829836; bh=5KExjknD5ROY6MJJH4AMpEpBg69K6IyRGy7DJFghQSU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MAYXKQPj7Phr0zKfdsdjR2NowUBYLccrkv2I6+gY2N6398NJOihK8JG+nh7rdDN8V SAQ9k+8cyUM+Zco07Q03Q5gkTVDYH5k7z0yTlatTFg4YLRFRJqZsYWXzI1Jqp542mS NLSHH7IrIPoBBOZ//T4vvZlkleINnEAFVTLK1gnFBP1aUqUWPqbaAmlPEpNcGRwQ0E tk272i1ALAQnXZu07LkjIt+U7AQYw50nPr0lOeQCEMFWNxFLjCoJ5UzLX5LLUZb6R9 scnMfik+RQOt3rsjsv0X+OItouKYfbm6WDq4vq4Jr5RYKKMIxx6mqAfYYelMVo4M3Z 2CGguzMFcf1qg== Received: by mail-oo1-f41.google.com with SMTP id y72so1291889ooa.5; Thu, 28 Jan 2021 02:30:35 -0800 (PST) X-Gm-Message-State: AOAM5324UhQmKWy2NI0HD3t2eUZSb4IWhlsxGagUNbE8jg0s8PttIeuy 66TcRrKqJVFqWjdGfQEHmm3DyPZR7QrybAvCBzM= X-Received: by 2002:a4a:e1e4:: with SMTP id u4mr565755ood.41.1611829835089; Thu, 28 Jan 2021 02:30:35 -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> In-Reply-To: <20210128050354.GA30874@gondor.apana.org.au> From: Ard Biesheuvel Date: Thu, 28 Jan 2021 11:30:23 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 4/7] crypto: add ecc curve and expose them To: Herbert Xu Cc: 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" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, 28 Jan 2021 at 06:04, Herbert Xu wrote: > > On Fri, Jan 22, 2021 at 03:09:52PM +0800, Meng Yu wrote: > > 1. Add ecc curves(P224, P384, P521) for ECDH; > > OK I think this is getting unwieldy. > > In light of the fact that we already have hardware that supports > a specific subset of curves, I think perhaps it would be better > to move the curve ID from the key into the algorithm name instead. > > IOW, instead of allocating ecdh, you would allocate ecdh-nist-pXXX. > > Any comments? > Agreed. Bluetooth appears to be the only in-kernel user at the moment, and it is hard coded to use p256, so it can be easily updated. But this also begs the question which ecdh-nist-pXXX implementations we actually need? Why are we exposing these curves in the first place?