Topic: wc_ecc_import_raw input parameters

I want to import the ecc key I generated with openssl with nistp384 curve using wc_ecc_import_raw(). What base point should i use?
I used Qx and Qy recommended for nistp384, d from the generated by openssl key, but the signature generatted with the key does not verify.
The example from the test.c works fine.
Could someone help me on how to choose the parameters for wc_ecc_import_raw()?

-Olga

Share

Re: wc_ecc_import_raw input parameters

Hi olga,

I am looking into your question and will get back to you as soon as possible (hopefully tomorrow in the AM).


Best Regards,

Kaleb

Re: wc_ecc_import_raw input parameters

Dear Kaleb,

I think I figured it out - there is a mistake in the comments. The Qx and Qy input parameters are not the coordinates of the base point - these are the coordinates of the public key.

Best regards,
Olga

Share

Re: wc_ecc_import_raw input parameters

Hi olga,

That is good to hear. I will notify our team and we will fix the comments.


Best,

Kaleb

Re: wc_ecc_import_raw input parameters

Hi Olga,

Just checking in to see if you got your ECC key import working.  I wanted to point out that we have several other ECC key import functions as well:

int wc_ecc_import_x963(const byte* in, word32 inLen, ecc_key* key);
int wc_ecc_import_private_key(const byte* priv, word32 privSz, const byte* pub, word32 pubSz, ecc_key* key);

Our API docs for ECC functions are located here:

https://wolfssl.com/wolfSSL/Docs-wolfss … i-ecc.html

Best Regards,

Re: wc_ecc_import_raw input parameters

Hello,

Thank you for checking in! I got wc_ecc_import_raw() working. As far as I understood, wc_ecc_import_raw() is the only function I can use if I want to import ECC keys generated by openssl. Or could I also use the two functions that you mentioned?

I have a new issue though: I try to measure the average time wc_ecc_verify_hash takes. The first signature verification always takes around 2200 ms, but the subsequent verifications of the same signature take only 330 ms. I looked for a code mistake, but couldn't find one. Could it be that something stays in the cache?

Thank you very much!
Olga

Share