From: Meng Yu <yumeng18@huawei.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>,
<marcel@holtmann.org>, <johan.hedberg@gmail.com>,
<luiz.dentz@gmail.com>, <tudor.ambarus@microchip.com>
Cc: <linux-crypto@vger.kernel.org>, <xuzaibo@huawei.com>,
<wangzhou1@hisilicon.com>, <yumeng18@huawei.com>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH v9 0/7] add ECDH and CURVE25519 algorithms support for Kunpeng 930
Date: Tue, 23 Feb 2021 15:10:12 +0800 [thread overview]
Message-ID: <1614064219-40701-1-git-send-email-yumeng18@huawei.com> (raw)
1. Move curve ID from the key into the algorithm name (like 'ecdh-nist-pxxx'
so we get its tfm like 'crypto_alloc_kpp("ecdh-nist-p256", 0, 0)'),
in 'crypto/ecc.c' (has been verified by testmgr) and 'crypto/atmel-ecc.c'
(only compiled, not do test), and modify 'testmgr.c' and 'net/bluetooth/smp.c'
(only compiled, not do test) to adapt the modification;
2. Add new file 'include/crypto/ecc_curve.h', and move 'struct ecc_point' and
'struct ecc_curve' definitions to it, also add new APIs 'ecc_get_curveXXX'
into it, with these APIs, users in kernel tree can get ECDH and
curve25519 parameters;
3. Add ECDH and CURVE25519 algorithms support for Kunpeng 930.
v8->v9:
- patch #3: squash patches 3-5 in v8 into one in v9
- patch #4: delete ECDH curve parameters: P224, P384 and P521
- patch #5: delete ecdh-nist-p224, ecdh-nist-p384 and ecdh-nist-p521 support in HPRE
v7->v8:
- patch #3 and #5: move the curve ID from the key into the algorithm name instead
v6->v7:
- patch #4: add function interface to expose elliptic curve parameters
- patch #4: eliminate warning by 'kernel test robot'
- patch #5: add function interface to expose curve25519 parameters
v5->v6:
- patch #1: add a new patch (the first patch), which is the "depend on" patch before
v4->v5:
- patch #4: delete P-128 and P-320 curve, as the few using case in the kernel
v3 -> v4:
- patch #3: add new, and move ecc_curve params to "include/crypto"
v2 -> v3:
- patch #5: fix sparse warnings
- patch #5: add 'CRYPTO_LIB_CURVE25519_GENERIC' in 'Kconfig'
v1 -> v2:
- patch #5: delete `curve25519_null_point'
Meng Yu (7):
crypto: hisilicon/hpre - add version adapt to new algorithms
crypto: hisilicon/hpre - add algorithm type
crypto: move curve_id of ECDH from the key to algorithm name
crypto: and expose ecc curves
crypto: hisilicon/hpre - add 'ECDH' algorithm
crypto: add curve25519 params and expose them
crypto: hisilicon/hpre - add 'CURVE25519' algorithm
crypto/ecc.c | 11 +-
crypto/ecc.h | 37 +-
crypto/ecc_curve_defs.h | 17 +
crypto/ecdh.c | 72 ++-
crypto/ecdh_helper.c | 4 +-
crypto/testmgr.c | 13 +-
crypto/testmgr.h | 34 +-
drivers/crypto/atmel-ecc.c | 14 +-
drivers/crypto/hisilicon/Kconfig | 1 +
drivers/crypto/hisilicon/hpre/hpre.h | 17 +-
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 881 +++++++++++++++++++++++++++-
drivers/crypto/hisilicon/hpre/hpre_main.c | 12 +-
drivers/crypto/hisilicon/qm.c | 4 +-
drivers/crypto/hisilicon/qm.h | 4 +-
drivers/crypto/hisilicon/sec2/sec.h | 4 +-
drivers/crypto/hisilicon/sec2/sec_crypto.c | 4 +-
drivers/crypto/hisilicon/sec2/sec_crypto.h | 4 +-
drivers/crypto/hisilicon/zip/zip.h | 4 +-
drivers/crypto/hisilicon/zip/zip_crypto.c | 4 +-
include/crypto/ecc_curve.h | 60 ++
include/crypto/ecdh.h | 2 -
net/bluetooth/ecdh_helper.c | 2 -
net/bluetooth/selftest.c | 2 +-
net/bluetooth/smp.c | 6 +-
24 files changed, 1085 insertions(+), 128 deletions(-)
create mode 100644 include/crypto/ecc_curve.h
--
2.8.1
next reply other threads:[~2021-02-23 7:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-23 7:10 Meng Yu [this message]
2021-02-23 7:10 ` [PATCH v9 1/7] crypto: hisilicon/hpre - add version adapt to new algorithms Meng Yu
2021-02-23 7:10 ` [PATCH v9 2/7] crypto: hisilicon/hpre - add algorithm type Meng Yu
2021-02-23 7:10 ` [PATCH v9 3/7] crypto: move curve_id of ECDH from the key to algorithm name Meng Yu
2021-02-23 10:44 ` Tudor.Ambarus
2021-02-24 1:19 ` yumeng
2021-02-24 1:29 ` yumeng
2021-02-24 10:15 ` Tudor.Ambarus
2021-02-25 0:56 ` yumeng
2021-02-23 7:10 ` [PATCH v9 4/7] crypto: and expose ecc curves Meng Yu
2021-02-23 7:10 ` [PATCH v9 5/7] crypto: hisilicon/hpre - add 'ECDH' algorithm Meng Yu
2021-02-23 7:10 ` [PATCH v9 6/7] crypto: add curve25519 params and expose them Meng Yu
2021-02-23 7:10 ` [PATCH v9 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=1614064219-40701-1-git-send-email-yumeng18@huawei.com \
--to=yumeng18@huawei.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=johan.hedberg@gmail.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=tudor.ambarus@microchip.com \
--cc=wangzhou1@hisilicon.com \
--cc=xuzaibo@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;
as well as URLs for NNTP newsgroup(s).