Skip to content

Commit

Permalink
crypto: ecdh - extend 'cra_driver_name' with curve name
Browse files Browse the repository at this point in the history
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: 6763f5e ("crypto: ecdh - move curve_id of ECDH from ...")
Signed-off-by: Hui Tang <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Hui Tang authored and herbertx committed May 21, 2021
1 parent 2d01667 commit c5ae16f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/ecdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down

0 comments on commit c5ae16f

Please sign in to comment.