[openssl-users] PEM_write_bio_RSAPrivateKey assure Randomness of PK
redpath
redpath at us.ibm.com
Wed May 23 17:08:01 UTC 2018
SO if I add this RAND usage below, em I seeding to assure a different RSA key
pair each time run of
creating a RSA pair.
I would certainly replace the time with the UUID of the device to be unique
to the device.
You would have to acquire the device to know the seeding. Hey keep the Time
one too.
void init_openssl(void){
if (initialized!=0)
return;
initialized= 1;
ERR_load_BIO_strings();
ERR_load_crypto_strings();
OpenSSL_add_all_algorithms();
OpenSSL_add_all_ciphers();
OpenSSL_add_all_digests();
unsigned long Time=(unsigned long)time(NULL);
RAND_add(&Time,sizeof(Time),0); //better than nothing for a starting
point
}
--
Sent from: http://openssl.6102.n7.nabble.com/OpenSSL-User-f3.html
More information about the openssl-users
mailing list