You don't need to change OpenSSL to do what you say you want; just create an EC_KEY with the curve,
set the desired private key value, and do a point multiplication to get the public key value and set that. This is assuming a key to be used in OpenSSL software. If you are using hardware crypto (in OpenSSL through an "engine"), or even "external" software such as Windows CAPI, you have to live with any restrictions imposed by that hardware or other software on how you create and use keys. Aside for clarity: the two keys in a public key or asymmetric scheme are called "public" and "private". "secret" is used for the one key in a symmetric cipher, or HMAC etc. Although there is some similarity between private and secret, it is best to use these words in the standard way to avoid confusion. From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of M.W. Aruna Withanage Sent: Monday, September 30, 2013 12:24 To: openssl-users@openssl.org Subject: *** Spam *** openssl ECDH random number Hi, For my MSc project I am using openSSL for encryption and key distribution. I have a requirement to replace the secret random number(private key) generated for ECDH with my own random number. I hope to edit the openSSL source. For that I need to know what is the source file I need to look at? So I can edit that file and replace the openssl generated secret key with my own secret key. Thank You and best regards Aruna