Creating a new ICA EC key via ica_ec_key_init() is time consuming, because libica performs EC key checks on the key components.
Currently every sign, verify or derive operation creates a new ICA key, and thus suffers from the long taking EC key checks with every operation.
Change this to create an ICA key on the first usage of an EC key, and attach the ICA key to the EC_KEY object as ex-data. That way, subsequent operations using the same key will reuse the attached ICA key and do not have to create a new ICA key again.
Creating a new ICA EC key via ica_ec_key_init() is time consuming, because libica performs EC key checks on the key components.
Currently every sign, verify or derive operation creates a new ICA key, and thus suffers from the long taking EC key checks with every operation.
Change this to create an ICA key on the first usage of an EC key, and attach the ICA key to the EC_KEY object as ex-data. That way, subsequent operations using the same key will reuse the attached ICA key and do not have to create a new ICA key again.