Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3974271pxb; Mon, 1 Feb 2021 09:13:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiAkG3U4J2rTGrtXQKRpZ1s3I21em4GlOYL5c6BzLihoDSkF7/W6NJs7MHG0BKsmRvZvk5 X-Received: by 2002:a17:906:5e45:: with SMTP id b5mr18730375eju.69.1612199614089; Mon, 01 Feb 2021 09:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612199614; cv=none; d=google.com; s=arc-20160816; b=PhcOctYhmW+P8KrvSvfSjLQycQwmYritR30L6hzgJu9lkwNuUr7r++1pJvD/RM8fva ExhwgzhS0/V566vgIxnLaKOYsaqtqJhN7Uc5v8NmNT13SJaGy7Gn3gV2YQNCJj4OsCWT gpkIrc7ejdwWC6mBUJNrLY7aUB8ck+uCCLy2kRPFeipx5kFG/Pnt7RLAGao/QRkcngVt to5917MWd0KaD3YXCFyW41e2ELPbOUTJaMGl3OdwM6ccl+qJInKOvoLIhK40P3z3olKh li2RKI5qsZIadK6Gm5xh4OLL7PyDXukC9OHLkTl80KqakbdQoiUAyTXOlpBZbtyOojG4 8hpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:ironport-sdr:ironport-sdr; bh=/fdLtNxuFOQQwGezXZ5+GvrtjN1n7j03BbGydKuIsU0=; b=d9KiREcjiEsmMqsV+7+y8aRRZLY+79wEeRHTEtc9i+zD7wUdiW+YG/hmbLu750CH2N kHrz7yXQp4FF6wIbawZfI02OvJCR180VJ5wlbZkGjnh9dN5LQmBIGzeb4++Fcza7z1em Ckzmc6ZC5WITuYxSrRLq5+rE+OJVRQxRELkBDa/MLh3PdVnThrbWsw0yWB3A2fDdkuTh 6UO6XmxwXW93SgoFi60eZ6AxXWxp6cfcu4bCzxMTgKsT6PNQE82Pn2JJqj/lYquvh2im npivzt3a1UkXP7NOg/+OnY1mrZj1mVmvpLGKGOb/KxaGH7TA7UDA+6ygfuVdf9Nw8bxu VSlA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ba30si11365110edb.470.2021.02.01.09.13.08; Mon, 01 Feb 2021 09:13:34 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231664AbhBARLo (ORCPT + 99 others); Mon, 1 Feb 2021 12:11:44 -0500 Received: from mga04.intel.com ([192.55.52.120]:58930 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231284AbhBARLf (ORCPT ); Mon, 1 Feb 2021 12:11:35 -0500 IronPort-SDR: GsAfh9fYpW+M4YAYDVi33Kntmm86+5S13BrGdLYHP3Zi1rQnB983ZAO+YJnDyLzw9lGCG8EshA XxoXATWa/5YA== X-IronPort-AV: E=McAfee;i="6000,8403,9882"; a="178155736" X-IronPort-AV: E=Sophos;i="5.79,393,1602572400"; d="scan'208";a="178155736" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 09:09:49 -0800 IronPort-SDR: 7g/nrfiQHaZNp5laeul/q4onJMeUVAA3thjEDrpRMpjApx57DJGIKyCqiXa9xg5u/Ctxv8DCfU B2j0dimBY5dA== X-IronPort-AV: E=Sophos;i="5.79,393,1602572400"; d="scan'208";a="391001227" Received: from ljfrost-mobl1.amr.corp.intel.com ([10.252.14.106]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 09:09:45 -0800 Message-ID: Subject: Re: [PATCH v7 4/7] crypto: add ecc curve and expose them From: Daniele Alessandrelli To: Herbert Xu , Ard Biesheuvel Cc: Meng Yu , "David S. Miller" , Linux Crypto Mailing List , Zaibo Xu , wangzhou1@hisilicon.com, Linux Kernel Mailing List , Mark Gross , "Khurana, Prabhjot" , "Reshetova, Elena" , Daniele Alessandrelli Date: Mon, 01 Feb 2021 17:09:41 +0000 In-Reply-To: <20210128103908.GA32495@gondor.apana.org.au> 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> <20210128103908.GA32495@gondor.apana.org.au> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, 2021-01-28 at 21:39 +1100, Herbert Xu wrote: > Once they're distinct algorithms, we can then make sure that only > the ones that are used in the kernel is added, even if some hardware > may support more curves. I like the idea of having different algorithms names (ecdh-nist- pXXX) for different curves, but I'm not fully convinced by the above statement. What's the downside of letting device drivers enable all the curves supported by the HW (with the exception of obsolete curves / algorithms), even if there is (currently) no user of such curves in the kernel? Code size and maintainability? I think that once there is support for certain curves, it's more likely that drivers / modules using them will appear. Also, even if there are no in-tree users, there might be a few out-of- tree ones.