Topic: Import ecc key is hanging/returning err after compression

Hello geeks,

We are using wolfssl in our project which is based on Silabs BLE mcu (BGM210PA32).

Initially we were using the wc_ecc_export_x963 and wc_ecc_import_x963, and the export and import was working fine.

Now when I use the export with compression wc_ecc_export_x963_ex ( it is successfully compressing to 33bytes) and then during the import the program is getting hanged indefinitely. Also sometimes I observed the error,
WC_HW_E  = -248,  /* Error with hardware crypto use */

I am quite sure the controller we use has Wolfssl Hardware acceleration support, but still couldn't understand why we get the -248 err.

Could you please comment on the hanging issue we observe while using the enabling the compression api.

For your info, these api's we use in our project to import and export:
wc_ecc_init()
wc_ecc_make_key_ex()
wc_ecc_export_x963_ex()
wc_ecc_import_x963

Thanks in advance.

Share

Re: Import ecc key is hanging/returning err after compression

Hello ddnr,

What curve are you specifying with wc_ecc_export_x963_ex()?
The API wc_ecc_import_x963() only supports the default curve for a key size.
That is, the import could be creating a key with the wrong curve.

The API wc_ecc_import_x963_ex() allows the caller to specify the curve ID.
The curve ID can be obtained by calling:

wc_ecc_get_curve_id_from_name("BRAINPOOLP160R1")

Thanks,
Eric @ wolfSSL Support

Re: Import ecc key is hanging/returning err after compression

Hi @ddnr,

Can you share what version of Gecko you are using?
Can you also check what version of SE firmware (I think you can check in the IDE or using this API)?

Cheers,

Share