Topic: wc_ecc_verify_hash and public key instance

Hello,

I can see that the wc_ecc_verify_hash functions takes a non constant ecc_key* instance as last parameter.

I also checked the code and it seems it modifies the key's state.

My question now is this -- is it safe to always use the same ecc instance for multipe wc_ecc_verify_hash calls even they seem to get modified?

If not what's the fastest and most efficient way on embedded to clone the public ecc_key instance to be used one for the wc_ecc_verify_hash call?

thanks
Alex

Share

Re: wc_ecc_verify_hash and public key instance

Hi Alex,

The key parameter is not constant for the async state machine and in order to utilize the key's heap memory. So long as one hash verify operation completes before reusing the key, it can be reused.

Thanks,
Eric - wolfSSL Support