From: Saulo Alessandre <saulo.alessandre@gmail.com>
To: herbert@gondor.apana.org.au
Cc: ardb@kernel.org, daniele.alessandrelli@linux.intel.com,
davem@davemloft.net, elena.reshetova@intel.com,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
mgross@linux.intel.com, prabhjot.khurana@intel.com,
wangzhou1@hisilicon.com, xuzaibo@huawei.com, yumeng18@huawei.com,
saulo.alessandre@gmail.com
Subject: [PATCH v7 4/7] crypto: add ecc curve and expose them
Date: Wed, 3 Feb 2021 15:03:44 -0300 [thread overview]
Message-ID: <20210203180344.2418055-1-saulo.alessandre@gmail.com> (raw)
In-Reply-To: <20210128050354.GA30874@gondor.apana.org.au>
On 28/01/2021 02:03, 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.
>
I think I understand you, I'm not using ECDH at the moment, but IMHO maybe
we could use enum OID of oid_registry.h as curve ID and eliminate the
duplicate ECC_CURVE_NIST_{...} from ecdh.h. Or perhaps put another param
in struct ecc_curve with OID, because the name already exists.
> IOW, instead of allocating ecdh, you would allocate ecdh-nist-pXXX.
>
> Any comments?
I recently sent a patch for the ECDSA signature verification, that use
the NIST-P curves to check elf32 binary modules and signatures in
about 450k T-DRE voting machines, in the Brazilian Elections across
the country. I put the other curves because we started testing them
(P256, P384) for speed measurement, but we ended up using P521 in our
production version since 2017 in the 4.9.xxx kernel, and now in 5.4.xxx.
In this patch I'm using akcipher allocate like ecdsa(sha1,sha256,...),
because the ecdsa algo is generic, and using the curve name and ndigits
inside vli_mmod_fast to discover the curve, but I agree the correct way
would be allocate ecdsa-nist-p521(sha1,...) and have all params for the
curve inside strut ecc_curve, remembering that we have anothers curves
incoming, like Edwards.
regards,
--
Email: Saulo Alessandre <saulo.alessandre@gmail.com>
next prev parent reply other threads:[~2021-02-03 18:06 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 7:09 [PATCH v7 0/7] add ECDH and CURVE25519 algorithms support for Kunpeng 930 Meng Yu
2021-01-22 7:09 ` [PATCH v7 1/7] crypto: hisilicon/hpre - add version adapt to new algorithms Meng Yu
2021-01-22 7:09 ` [PATCH v7 2/7] crypto: hisilicon/hpre - add some updates to adapt to Kunpeng 930 Meng Yu
2021-01-22 7:09 ` [PATCH v7 3/7] crypto: hisilicon/hpre - add algorithm type Meng Yu
2021-01-22 7:09 ` [PATCH v7 4/7] crypto: add ecc curve and expose them Meng Yu
2021-01-28 5:03 ` Herbert Xu
2021-01-28 10:30 ` Ard Biesheuvel
2021-01-28 10:39 ` Herbert Xu
2021-02-01 17:09 ` Daniele Alessandrelli
2021-02-02 5:13 ` Herbert Xu
2021-02-02 9:27 ` Alessandrelli, Daniele
2021-02-02 9:42 ` Herbert Xu
2021-02-02 12:35 ` Alessandrelli, Daniele
2021-02-04 5:31 ` Herbert Xu
2021-01-29 2:49 ` Stefan Berger
2021-01-29 3:00 ` Herbert Xu
2021-02-08 6:35 ` Vitaly Chikunov
2021-02-08 6:47 ` Ard Biesheuvel
2021-02-08 21:27 ` Vitaly Chikunov
2021-02-01 3:45 ` yumeng
2021-02-03 18:03 ` Saulo Alessandre [this message]
2021-02-04 5:41 ` Herbert Xu
2021-01-22 7:09 ` [PATCH v7 5/7] crypto: add curve 25519 " Meng Yu
2021-01-22 7:09 ` [PATCH v7 6/7] crypto: hisilicon/hpre - add 'ECDH' algorithm Meng Yu
2021-01-22 7:09 ` [PATCH v7 7/7] crypto: hisilicon/hpre - add 'CURVE25519' algorithm Meng Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210203180344.2418055-1-saulo.alessandre@gmail.com \
--to=saulo.alessandre@gmail.com \
--cc=ardb@kernel.org \
--cc=daniele.alessandrelli@linux.intel.com \
--cc=davem@davemloft.net \
--cc=elena.reshetova@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgross@linux.intel.com \
--cc=prabhjot.khurana@intel.com \
--cc=wangzhou1@hisilicon.com \
--cc=xuzaibo@huawei.com \
--cc=yumeng18@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®