Thanks for your email. i will try this kavita
Marek Marcola <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 11/27/2007 03:51 PM Please respond to openssl-users@openssl.org To openssl-users@openssl.org cc Subject Re: looking for information on generating RSA key Hello, > I am a novice OpenSSL library user. Currently I am implementing code > to generate a RSA key pair. Here > is a part of my code: > > _time_get(&tim); > RAND_add(&tim,sizeof(tim),0); You should get seed from some PRNG source, but on Linux/Unix if this is not enough OpenSSL library will seed yourself reading /dev/urandom,EGD, ... If there will be not enough seed data (32 bytes) RSA_generate_key() will return error (there is check for seeded PRNG). > pMiSslCtx = MiSslInitEx( TLSv1_method(), true ); > > rsa=RSA_generate_key(key_len,RSA_F4,NULLcb,NULL); > > > my key_len is 2048. > > The code crashes in RSA_generate_key() function call, more > particularly in probable_prime(). I am not sure what > I am doign wrong here. Any help would be highly apprecaited. Some simple example attached. Best regards, -- Marek Marcola <[EMAIL PROTECTED]>
rsa1.c
Description: Binary data