1 (edited by juvebogdan 2022-09-11 10:57:43)

Topic: EC_GROUP_new_by_curve_name

Hello,

I compiled wolfssl with openssl extra and custom curves all but when i run this

#define ECQV_EC_CURVE NID_secp256k1
const EC_GROUP *group = EC_GROUP_new_by_curve_name(ECQV_EC_CURVE);
i get: 
wolfSSL Entering NIDToEccEnum()
NID not found

I will include complete debug log from wolfssl. I am trying to load pem key from file, get public key, transform it to hex and print.

wolfSSL Entering wolfSSL_EC_GROUP_new_by_curve_name
wolfSSL Entering NIDToEccEnum()
wolfSSL Entering wolfSSL_EC_POINT_new
wolfSSL Entering wolfSSL_PEM_read_PrivateKey
wolfSSL Entering wolfSSL_BIO_s_file
wolfSSL Entering wolfSSL_BIO_new
wolfSSL Entering wolfSSL_BIO_set_fp
wolfSSL Entering wolfSSL_PEM_read_bio_PrivateKey
wolfSSL Entering wolfSSL_BIO_read
wolfSSL Entering wolfSSL_BIO_read
wolfSSL Entering wolfSSL_BIO_read
wolfSSL Entering wolfSSL_BIO_read
wolfSSL Entering PemToDer
wolfSSL Entering GetAlgoId
wolfSSL Entering wolfSSL_d2i_PrivateKey
wolfSSL Entering GetAlgoId
wolfSSL Entering wolfSSL_EVP_PKEY_new_ex
wolfSSL Entering wolfSSL_EC_KEY_new
wolfSSL Entering wolfSSL_EC_GROUP_new_by_curve_name
wolfSSL Entering NIDToEccEnum()
NID not found
wolfSSL Entering wolfSSL_EC_POINT_new
wolfSSL Entering wolfSSL_EC_KEY_LoadDer
wolfSSL Entering GetAlgoId
wolfSSL Entering GetAlgoId
wolfSSL Entering GetObjectId()
wolfSSL Entering SetECKeyExternal
wolfSSL Entering EccEnumToNID()
wolfSSL Entering SetECPointExternal
wolfSSL Leaving wolfSSL_PEM_read_bio_PrivateKey, return 0
wolfSSL Entering wolfSSL_BIO_free
wolfSSL Entering wolfSSL_EVP_PKEY_get1_EC_KEY
wolfSSL Entering wolfSSL_EVP_PKEY_free
wolfSSL Entering wolfSSL_EC_KEY_free
wolfSSL Entering wolfSSL_EC_KEY_get0_public_key
wolfSSL Entering wolfSSL_EC_POINT_copy
No ECPoint internal set, do it
wolfSSL Entering SetECPointInternal
Entering SetIndividualInternal
Entering SetIndividualInternal
Entering SetIndividualInternal
wolfSSL Entering SetECPointExternal
wolfSSL Entering wolfSSL_EC_KEY_free
wolfSSL Entering wolfSSL_EC_POINT_free
wolfSSL Entering wolfSSL_EC_GROUP_free
pk : 0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
wolfSSL_OPENSSL_free

the public key printed here is completely wrong. The code in openssl returns correct.

What can be the issue here?

Thanks

Share

Re: EC_GROUP_new_by_curve_name

Hi Bogdan,

Please check your email for a response from our ZenDesk portal.

Thanks,
Eric @ wolfSSL Support

Re: EC_GROUP_new_by_curve_name

Thanks.

Replied

Share