summaryrefslogtreecommitdiff
path: root/crypto/ecdh.c
diff options
context:
space:
mode:
authorHui Tang <tanghui20@huawei.com>2021-05-10 16:59:47 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2021-05-21 16:17:29 +0800
commitc5ae16f5c6b91dc78a08885a753489d608de4abd (patch)
treee938e6344cda091430d740369ef9b1d6f9929527 /crypto/ecdh.c
parent2d016672528a592ada5188e53ac746e1b8b7a978 (diff)
crypto: ecdh - extend 'cra_driver_name' with curve name
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. Fixes: 6763f5ea2d9a ("crypto: ecdh - move curve_id of ECDH from ...") Signed-off-by: Hui Tang <tanghui20@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ecdh.c')
-rw-r--r--crypto/ecdh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ecdh.c b/crypto/ecdh.c
index 04a427b8c956..07eb34fef25b 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),