Hi Chris,

Including <wolfssl/options.h> fixed the problem.
My application was standalone and the segmentation fault happened by the InitRsaKey.

Thank you very much for your support!


I try to run my 3072-bit RSA code with --enable-fastmath.
Resetting FP_MAX_BITS to 6144 or 8192 does not solve the segmentation fault. I tried resetting it through both tfm.h and -DFP_MAX_BITS=8192 flag.

Any help would be highly appreciated!



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!

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,

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()?