[openssl-users] Naive: how to generate EC public key from EC private key?

Blumenthal, Uri - 0553 - MITLL uri at ll.mit.edu
Thu Mar 17 21:17:39 UTC 2016


I’ve an extremely naïve question. I am generating ephemeral EC keys for
ECDH, following the example in
https://wiki.openssl.org/index.php/EVP_Key_and_Parameter_Generation

But it looks like the example ends on generation of the private key:
/* Generate the key */
if (!EVP_PKEY_keygen(kctx, &key)) goto err;

The next step must be obvious, but somehow I can’t figure it out. So my
question is: from having EVP_PKEY *privateECKey how do I get EVP_PKEY
*publicECKey?

Thanks!

P.S. The same question applies to RSA as well.
-- 
Regards,
Uri Blumenthal


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20160317/4a9b6e5e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4324 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20160317/4a9b6e5e/attachment.bin>


More information about the openssl-users mailing list