Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp913558pxu; Wed, 16 Dec 2020 19:10:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgBOsqfe6QZhSlvch7q4/hl/+okFdeNcddwnID/Ku+K18QCkOHt8RhWHp1p+3N/KrPtUvA X-Received: by 2002:a17:906:958e:: with SMTP id r14mr34102905ejx.319.1608174603751; Wed, 16 Dec 2020 19:10:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608174603; cv=none; d=google.com; s=arc-20160816; b=UybGc7JmO6oxdA8E+E01nYNg4LgAjRx9q1dU+oLQX6DmNCdib704fjamuAo96h3frT ybx+6rLi+ID19JrPGJLifhgpQqu8+vzOXHOVzmlSisH6SvvEd1BmEp8daokH1vsDlxDE d2pY6/ZfxlWYrdAcAeo+BH5PUOpTeNnkt3HQvyMveBiw5HQ4NgaIBP1efL2ADQ63mQcs 1dsZPNRWUDZpCvd0GNktaTFPZjNWOz080yq/KsU/NLdlEkPPaGu+rVpLlDPVApm0w9rc IH0DvAt2QYM0StyPi29nB0LKML3oeb8z8R/Glh1HFOMms7IwyQKAUiEgccRFARI0qtFW IVyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=ufm3HHw9Ovt16I/9E5VpOsJkY+durVnTw5n1IbL/Esw=; b=EY0aK5eu8DaFXBEKv2VV/ieq+L6DCuUrDXaQ6Punz03nG3KrDBqwCfupVET40HiS0I gYn8/eJ4s3HuBtCAmdMdrkPFv8B2GdknMdMJ6v+Pr/rGg3NPUpdZhWgy6JNisazihcgo uYoTAFtrqfn5hsZKdRj+3nzqwoypSAErPaY+YCRUjifBYWTlHwhmvbJ+50hSUFG6NkrW ML3y2Ff0KjLduPwUDOLVh2+TuxhDdUVLlDn8syk/WNwqMgYzFO7uyhm1vuoBzZa9/m1O x7Jo+XKCWnzFZd0G+OfO5/uAkSXXS7U2P/l71b1jyTKr+wHwaIhTuHYDKtiMnsFr2u1D EzmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 v1si3524004edy.108.2020.12.16.19.09.40; Wed, 16 Dec 2020 19:10:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727892AbgLQDIT (ORCPT + 99 others); Wed, 16 Dec 2020 22:08:19 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:9898 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726812AbgLQDIT (ORCPT ); Wed, 16 Dec 2020 22:08:19 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4CxH364gCNz7Fq4; Thu, 17 Dec 2020 11:06:58 +0800 (CST) Received: from [10.67.103.10] (10.67.103.10) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Thu, 17 Dec 2020 11:07:29 +0800 Subject: Re: [PATCH v4 4/5] crypto: hisilicon/hpre - add 'ECDH' algorithm To: Stephan Mueller CC: , , , References: <13db294664a6b2e26a892dd544c714d3e385b0cc.camel@chronox.de> <3903e2e8-165f-51b5-056c-24b8ce52e842@huawei.com> <711de58c-4f7c-4643-4b8b-6af98ed1a7bc@huawei.com> From: yumeng Message-ID: <06fa1f72-fad8-a3e5-987a-d322918ac30a@huawei.com> Date: Thu, 17 Dec 2020 11:07:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.10] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020/12/17 4:10, Stephan Mueller 写道: > Am Mittwoch, dem 16.12.2020 um 10:39 +0800 schrieb yumeng: >> >> >> >>> Am Freitag, den 11.12.2020, 14:30 +0800 schrieb Meng Yu: >>>> >>>> +/* size in bytes of the n prime */ >>>> +#define HPRE_ECC_NIST_P128_N_SIZE      16 >>> >>> Do we truly need P-128? Besides, I do not see that curve being defined in >>> contemporary cipher specs. >>> >>>> +#define HPRE_ECC_NIST_P192_N_SIZE      24 >>>> +#define HPRE_ECC_NIST_P224_N_SIZE      28 >>>> +#define HPRE_ECC_NIST_P256_N_SIZE      32 >>>> +#define HPRE_ECC_NIST_P320_N_SIZE      40 >>> >>> Do we truly need P-320? Besides, I do not see that curve being defined in >>> contemporary cipher specs. >> >> Yes, in rfc 5903, only P-256, P-384 and P-521 is defined, but in >> 'rfc5639' and  "SEC 2: Recommended Elliptic Curve Domain Parameters", >> other curves like P-128, P-192, P-224, and P-320 curve parameters are >> found, and they are used in 'openssl'; >> How about your idea? > > Who is going to use that curve considering that common protocols that are > implemented in the kernel do not use it? > > Thanks > Stephan > I see in "SEC 2: Recommended Elliptic Curve Domain ParametersVersion2.0" that 'Recommend Elliptic Curve Domain Parameters over Fp' are secp192, secp224, secp256, secp384, and secp521, secp128 and secp320 are not recommended. So you mean it's better not to include secp128 and secp320, right? Thanks,