On 1/31/2011 5:37 PM, Ashwin Chandra wrote:
I would like to call this function to generate the same public/private
key everytime.

I thought all I had to do was create the same seed using RAND_seed each
time, however I still keep getting different key pairs.

Is there any way to have RSA_generate_key generate the same
public/private key each time? (I know this doesn’t make sense security
wise, but the work I have to do requires it).


Replace RSA_generate_key with your own function that returns the desired key. Using the same seed each time won't work because intervening operations can leave the PRNG in a different state. You could use your own PRNG to replace OpenSSL's and then put it into a particular state prior to calling RSA_generate_key.

DS


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

Reply via email to