Hello ,
I have problem in understanding and could you clarify for me what is the best
way to extract and safe public and private keys
from generated ES_KEY and then create new key for signature or verify .
Example esdatest.c:
if (!EC_KEY_generate_key(key))
goto x962_int_err;
BIO_printf(out, .);
If I would like to create new ES_KEY for verify to my opinion I need to
perform following actions:
- Extract and safe key-pub_key-X, key-pub_key-Y, key-pub_key-Y to
safeX,safeY,safeY
And then in the other application perform:
if ((new_key = EC_KEY_new_by_curve_name(nid)) == NULL) //create new key for
verify
goto x962_int_err;
pub_key = EC_POINT_new(new_key-group);
-- copy big numbers safeX,safeY,safeY to pub_key-X, pub_key-Y, pub_key-Y
EC_KEY_set_public_key(new_key, pub_key);
Can I use now new_key for verify?
Thanks in advance
Best regards
Mark
Mark Shnaider | Software engineer | ARX
phone: +972.3.9279543 | mobile: +972.54.2448543 | email: [EMAIL PROTECTED] |
www.arx.com