Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp466468pxu; Fri, 11 Dec 2020 06:40:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtbltX2Dud5Bml/1fZMW7ro4Rjg1dTQpezkLwWvP5JmAzZmelM75cJbdDJo/tbzDD2L/bS X-Received: by 2002:a17:906:174f:: with SMTP id d15mr11079230eje.15.1607697606351; Fri, 11 Dec 2020 06:40:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607697606; cv=none; d=google.com; s=arc-20160816; b=v32InN+nBP4jW5Gj++gWNT0PhlQ0vgs5+M5AUSsLJRBYdvzHkp9pOU4yWMYyj0Stle qIpJROTz0o7pOkLC/sl0ShohaoJTusxhPi6d4WEWLQGWTPijpQmElvbsZ1PT5cvciEHL WBVhRxVMzG6hN//RUGYMiQE9rTPW9m8rcON1PUy+UJpOmtSKuucCPk9bdwljG6gGjQcF 7Zx2/6oUydE51ZXRw4QP7WwYdQbKf8YMSYkkpCPuKxRVblC4+x/JKUnXqFnAkrhtjMr6 vJwfVBLTwnOFiYsZjyOfgyuOf+4XwXN7nA/KkWbNYtsoDU7L1XRSWPh+KMKSVRoGtjDC ZjAA== 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:dkim-signature; bh=B/LBAUjjfTRgH46xG4Nbin5AyWdAJwByXke5lnj2Egw=; b=Luwn5+0aWNHd5/hQqbZb7srGQoz09Twy1bvyqU3CqXEZNjpL2s4T5r2rFQ6ndpOBrn XS4ItqRw52Cjlhddx1P5HzMOHFeonljjgNuWEJpYKC70FzNqmMeo0XTx0qIUAojyQmG6 TVMneA+W+BgiiPSjBW5kdxGqVSM1GnKSn33ElYuoFaJGmT9EcU6MsKCKqhbE3+lK7OyY l+lUlpUW3PAv8w86fxGX/RG+9GZrv2Lmoj5/t3arOMo3gq+msQ3/2YfepRxoTiIPJUeI RdUhXv1fMc7YBC6Syf+2YNJWLFbMCmQ+fbK6yI+vlK+RDhEFvok/2r9iJC0sr68qSLWL M0gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chronox.de header.s=strato-dkim-0002 header.b="CBGBYHJ/"; 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 dn20si5052588ejc.748.2020.12.11.06.39.43; Fri, 11 Dec 2020 06:40:06 -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; dkim=pass header.i=@chronox.de header.s=strato-dkim-0002 header.b="CBGBYHJ/"; 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 S2395513AbgLKOMB (ORCPT + 99 others); Fri, 11 Dec 2020 09:12:01 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([81.169.146.167]:10615 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390593AbgLKOLb (ORCPT ); Fri, 11 Dec 2020 09:11:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1607695713; s=strato-dkim-0002; d=chronox.de; h=References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:From: Subject:Sender; bh=B/LBAUjjfTRgH46xG4Nbin5AyWdAJwByXke5lnj2Egw=; b=CBGBYHJ/iKJU4EnEnL/OfhH5NFyJmPBukRnxuzU9xFo+fKmrG8H62Q7WGS+XBGbRsg ino0Feqrk/54BYnKuLPQboJ0JQroqHXsUPx7mrywfTGGXx2+kzFZNCqry5uOnhc1wCEb veDSsSkSBqhBigiUNZ/+hjhtYnBpxof2hUN9qMAX8QBSOoIC25p5qjc14Jo1O/EBB4Yk 3329jF7sR0c9g8FfnzBSXVDooRZGDQSlcJj6YilWm+S0xwoF+ANzsTJ9/aiygPxMwdt0 mWaLLwsMScobGk/7jxAPvOnBwyPyUeHX5fob/WplUK2Xl+s7jn9wXjGtXagNjJvnLPN1 ni+A== X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNzyCzy1Sfr67uExK884EC0GFGHev6G4xuq1eJ0Y=" X-RZG-CLASS-ID: mo00 Received: from tauon.chronox.de by smtp.strato.de (RZmta 47.7.1 DYNA|AUTH) with ESMTPSA id L0a6acwBBE8N0pb (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 11 Dec 2020 15:08:23 +0100 (CET) Message-ID: <13db294664a6b2e26a892dd544c714d3e385b0cc.camel@chronox.de> Subject: Re: [PATCH v4 4/5] crypto: hisilicon/hpre - add 'ECDH' algorithm From: Stephan Mueller To: Meng Yu , herbert@gondor.apana.org.au, davem@davemloft.net Cc: linux-crypto@vger.kernel.org, xuzaibo@huawei.com, wangzhou1@hisilicon.com, linux-kernel@vger.kernel.org Date: Fri, 11 Dec 2020 15:08:22 +0100 In-Reply-To: <1607668234-46130-5-git-send-email-yumeng18@huawei.com> References: <1607668234-46130-1-git-send-email-yumeng18@huawei.com> <1607668234-46130-5-git-send-email-yumeng18@huawei.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.1 (3.38.1-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > +#define HPRE_ECC_NIST_P384_N_SIZE      48 > +#define HPRE_ECC_NIST_P521_N_SIZE      66 > + > +/* size in bytes */ > +#define HPRE_ECC_HW256_KSZ_B   32 > +#define HPRE_ECC_HW384_KSZ_B   48 > +#define HPRE_ECC_HW576_KSZ_B   72 > + > +#define HPRE_ECDH_MAX_SZ       HPRE_ECC_HW576_KSZ_B] Ciao Stephan