Hello,

To generate EC key pair you should:
  - choose EC curve (eg secp256r1, secp384r1, ...)
  - generate private key: d = random(0,...,n) (0 < d < n)
  - generate public key dG = d*G 

where n = generator order, G = generator.

If you have private key d then you should calculate public key dG = d*G
using chosen EC curve.

Best regards,
--
Marek Marcola <marek.marc...@malkom.pl>

owner-openssl-us...@openssl.org wrote on 04/14/2012 12:32:22 PM:

> opensshelpmeplz <okayh...@mailinator.com> 
> Sent by: owner-openssl-us...@openssl.org
> 
> 04/15/2012 02:24 PM
> 
> Please respond to
> openssl-users@openssl.org
> 
> To
> 
> openssl-users@openssl.org
> 
> cc
> 
> Subject
> 
> ECC generate public key with given private key
> 
> 
> I need to generate a public EC key given a private EC key that I provide
> myself. Is it possible to do this with OpenSSL? I have no problems to
> generate a key pair , and I know how to set private and public key to
> specific values, but is there some way to give it a private key and get 
a
> corresponding public key that is tied to the provided private key? I am
> using the Ruby wrapper for what it is worth.... 
> 
> thanks for any help, I have spent many hours trying to figure this out 
now.
> -- 
> View this message in context: 
http://old.nabble.com/ECC-generate-public-key-with-given-
> private-key-tp33686367p33686367.html
> Sent from the OpenSSL - User mailing list archive at Nabble.com.
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@openssl.org

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to