* [PATCH 0/2] crypto: extend 'cra_driver_name' with curve name
@ 2021-05-10 8:59 Hui Tang
2021-05-10 8:59 ` [PATCH 1/2] crypto: ecdh - " Hui Tang
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hui Tang @ 2021-05-10 8:59 UTC (permalink / raw)
To: herbert, davem; +Cc: linux-crypto, xuzaibo, wangzhou1, linux-kernel
Extend initialization of ecdh 'cra_driver_name' with curve name.
Hui Tang (2):
crypto: ecdh - extend 'cra_driver_name' with curve name
crypto: hisilicon/hpre - extend 'cra_driver_name' with curve name
crypto/ecdh.c | 4 ++--
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
--
2.8.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] crypto: ecdh - extend 'cra_driver_name' with curve name
2021-05-10 8:59 [PATCH 0/2] crypto: extend 'cra_driver_name' with curve name Hui Tang
@ 2021-05-10 8:59 ` Hui Tang
2021-05-10 8:59 ` [PATCH 2/2] crypto: hisilicon/hpre " Hui Tang
2021-05-21 8:22 ` [PATCH 0/2] crypto: " Herbert Xu
2 siblings, 0 replies; 4+ messages in thread
From: Hui Tang @ 2021-05-10 8:59 UTC (permalink / raw)
To: herbert, davem; +Cc: linux-crypto, xuzaibo, wangzhou1, linux-kernel
Currently, 'cra_driver_name' cannot be used to specify ecdh algorithm
with a special curve, so extending it with curve name.
Although using 'cra_name' can also specify a special curve, but ecdh
generic driver cannot be specified when vendor hardware accelerator
has registered.
Signed-off-by: Hui Tang <tanghui20@huawei.com>
---
crypto/ecdh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/ecdh.c b/crypto/ecdh.c
index 04a427b..07eb34f 100644
--- a/crypto/ecdh.c
+++ b/crypto/ecdh.c
@@ -141,7 +141,7 @@ static struct kpp_alg ecdh_nist_p192 = {
.init = ecdh_nist_p192_init_tfm,
.base = {
.cra_name = "ecdh-nist-p192",
- .cra_driver_name = "ecdh-generic",
+ .cra_driver_name = "ecdh-nist-p192-generic",
.cra_priority = 100,
.cra_module = THIS_MODULE,
.cra_ctxsize = sizeof(struct ecdh_ctx),
@@ -166,7 +166,7 @@ static struct kpp_alg ecdh_nist_p256 = {
.init = ecdh_nist_p256_init_tfm,
.base = {
.cra_name = "ecdh-nist-p256",
- .cra_driver_name = "ecdh-generic",
+ .cra_driver_name = "ecdh-nist-p256-generic",
.cra_priority = 100,
.cra_module = THIS_MODULE,
.cra_ctxsize = sizeof(struct ecdh_ctx),
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] crypto: hisilicon/hpre - extend 'cra_driver_name' with curve name
2021-05-10 8:59 [PATCH 0/2] crypto: extend 'cra_driver_name' with curve name Hui Tang
2021-05-10 8:59 ` [PATCH 1/2] crypto: ecdh - " Hui Tang
@ 2021-05-10 8:59 ` Hui Tang
2021-05-21 8:22 ` [PATCH 0/2] crypto: " Herbert Xu
2 siblings, 0 replies; 4+ messages in thread
From: Hui Tang @ 2021-05-10 8:59 UTC (permalink / raw)
To: herbert, davem; +Cc: linux-crypto, xuzaibo, wangzhou1, linux-kernel
Currently,'cra_driver_name' cannot be used to specify ecdh algorithm
with a special curve, so extending it with curve name.
Signed-off-by: Hui Tang <tanghui20@huawei.com>
---
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c b/drivers/crypto/hisilicon/hpre/hpre_crypto.c
index a380087..c07a7f5 100644
--- a/drivers/crypto/hisilicon/hpre/hpre_crypto.c
+++ b/drivers/crypto/hisilicon/hpre/hpre_crypto.c
@@ -1940,7 +1940,7 @@ static struct kpp_alg ecdh_nist_p192 = {
.cra_ctxsize = sizeof(struct hpre_ctx),
.cra_priority = HPRE_CRYPTO_ALG_PRI,
.cra_name = "ecdh-nist-p192",
- .cra_driver_name = "hpre-ecdh",
+ .cra_driver_name = "hpre-ecdh-nist-p192",
.cra_module = THIS_MODULE,
},
};
@@ -1957,7 +1957,7 @@ static struct kpp_alg ecdh_nist_p256 = {
.cra_ctxsize = sizeof(struct hpre_ctx),
.cra_priority = HPRE_CRYPTO_ALG_PRI,
.cra_name = "ecdh-nist-p256",
- .cra_driver_name = "hpre-ecdh",
+ .cra_driver_name = "hpre-ecdh-nist-p256",
.cra_module = THIS_MODULE,
},
};
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] crypto: extend 'cra_driver_name' with curve name
2021-05-10 8:59 [PATCH 0/2] crypto: extend 'cra_driver_name' with curve name Hui Tang
2021-05-10 8:59 ` [PATCH 1/2] crypto: ecdh - " Hui Tang
2021-05-10 8:59 ` [PATCH 2/2] crypto: hisilicon/hpre " Hui Tang
@ 2021-05-21 8:22 ` Herbert Xu
2 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2021-05-21 8:22 UTC (permalink / raw)
To: Hui Tang; +Cc: davem, linux-crypto, xuzaibo, wangzhou1, linux-kernel
On Mon, May 10, 2021 at 04:59:46PM +0800, Hui Tang wrote:
> Extend initialization of ecdh 'cra_driver_name' with curve name.
>
> Hui Tang (2):
> crypto: ecdh - extend 'cra_driver_name' with curve name
> crypto: hisilicon/hpre - extend 'cra_driver_name' with curve name
>
> crypto/ecdh.c | 4 ++--
> drivers/crypto/hisilicon/hpre/hpre_crypto.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
All applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-21 8:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 8:59 [PATCH 0/2] crypto: extend 'cra_driver_name' with curve name Hui Tang
2021-05-10 8:59 ` [PATCH 1/2] crypto: ecdh - " Hui Tang
2021-05-10 8:59 ` [PATCH 2/2] crypto: hisilicon/hpre " Hui Tang
2021-05-21 8:22 ` [PATCH 0/2] crypto: " Herbert Xu
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).