crypto: extend 'cra_driver_name' with curve name
cover crypto: extend 'cra_driver_name' with curve name
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
PATCH 1/2 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.
--- crypto/ecdh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
crypto/ecdh.c +2 -2
@@ -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),
Signature · 1 line
2.8.1
PATCH 2/2 crypto: hisilicon/hpre - extend 'cra_driver_name' with curve name
In reply to Hui TangCurrently,'cra_driver_name' cannot be used to specify ecdh algorithm with a special curve, so extending it with curve name.
--- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/hisilicon/hpre/hpre_crypto.c +2 -2
@@ -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, }, };
Signature · 1 line
2.8.1
Herbert Xu
maintainerQuoted 9 lines · Hui Tang
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 namecrypto/ecdh.c | 4 ++-- drivers/crypto/hisilicon/hpre/hpre_crypto.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
All applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt