
From: lizhi <lizhi206@huawei.com> Fix incorrect nid configuration in the params fill. Signed-off-by: lizhi <lizhi206@huawei.com> Signed-off-by: Qi Tao <taoqi10@huawei.com> --- uadk_tool/benchmark/hpre_uadk_benchmark.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uadk_tool/benchmark/hpre_uadk_benchmark.c b/uadk_tool/benchmark/hpre_uadk_benchmark.c index 70d81fef..b4a5d975 100644 --- a/uadk_tool/benchmark/hpre_uadk_benchmark.c +++ b/uadk_tool/benchmark/hpre_uadk_benchmark.c @@ -1139,7 +1139,7 @@ static int get_ecc_param_from_sample(struct hpre_ecc_setup *setup, setup->key_bits = key_bits; - if (setup->nid == 714 || key_bits == 256) { // NID_secp256k1 + if (setup->nid == 415 || key_bits == 256) { // NID_secp256r1 /* sm2 */ if (subtype == SM2_TYPE) { setup->priv_key = sm2_priv; @@ -1181,6 +1181,7 @@ static int get_ecc_param_from_sample(struct hpre_ecc_setup *setup, setup->sign_size = sizeof(sm2_sign_data); } else { + /* x448, x25519 and ecdh-256 can share same private key of ecdh_da_secp256k1*/ setup->priv_key = ecdh_da_secp256k1; setup->except_pub_key = ecdh_except_b_pubkey_secp256k1; setup->pub_key = ecdh_cp_pubkey_secp256k1; -- 2.33.0