Hzhijun,
 
maybe this part from the openssl FAQs (at www.openssl.org) may help you:
 
------------------------------------------------------------------------------------------------------------------------------ 

1. Why do I get a "PRNG not seeded" error message?

Cryptographic software needs a source of unpredictable data to work correctly. Many open source operating systems provide a "randomness device" (/dev/urandom or /dev/random) that serves this purpose. All OpenSSL versions try to use /dev/urandom by default; starting with version 0.9.7, OpenSSL also tries /dev/random if /dev/urandom is not available.

On other systems, applications have to call the RAND_add() or RAND_seed() function with appropriate data before generating keys or performing public key encryption. (These functions initialize the pseudo-random number generator, PRNG.) Some broken applications do not do this. As of version 0.9.5, the OpenSSL functions that need randomness report an error if the random number generator has not been seeded with at least 128 bits of randomness. If this error occurs and is not discussed in the documentation of the application you are using, please contact the author of that application; it is likely that it never worked correctly. OpenSSL 0.9.5 and later make the error visible by refusing to perform potentially insecure encryption.

If you are using Solaris 8, you can add /dev/urandom and /dev/random devices by installing patch 112438 (Sparc) or 112439 (x86), which are available via the Patchfinder at http://sunsolve.sun.com (Solaris 9 includes these devices by default). For /dev/random support for earlier Solaris versions, see Sun's statement at http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski (the SUNWski package is available in patch 105710).

On systems without /dev/urandom and /dev/random, it is a good idea to use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for details. Starting with version 0.9.7, OpenSSL will automatically look for an EGD socket at /var/run/egd-pool, /dev/egd-pool, /etc/egd-pool and /etc/entropy.

Most components of the openssl command line utility automatically try to seed the random number generator from a file. The name of the default seeding file is determined as follows: If environment variable RANDFILE is set, then it names the seeding file. Otherwise if environment variable HOME is set, then the seeding file is $HOME/.rnd. If neither RANDFILE nor HOME is set, versions up to OpenSSL 0.9.6 will use file .rnd in the current directory while OpenSSL 0.9.6a uses no default seeding file at all. OpenSSL 0.9.6b and later will behave similarly to 0.9.6a, but will use a default of "C:\" for HOME on Windows systems if the environment variable has not been set.

If the default seeding file does not exist or is too short, the "PRNG not seeded" error message may occur.

The openssl command line utility will write back a new state to the default seeding file (and create this file if necessary) unless there was no sufficient seeding.

Pointing $RANDFILE to an Entropy Gathering Daemon socket does not work. Use the "-rand" option of the OpenSSL command line tools instead. The $RANDFILE environment variable and $HOME/.rnd are only used by the OpenSSL command line tools. Applications using the OpenSSL library provide their own configuration options to specify the entropy source, please check out the documentation coming the with application.

------------------------------------------------------------------------------------------------------------------------------

Regards

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 13. August 2004 04:31
An: [EMAIL PROTECTED]
Betreff: Re: question about certificate creation

u mean "openssl.cnf"?
 
what hold back me to make certificate is about "unable to load 'random state'
This means that the random number generator has not been seeded"
 
how to deal with it?
 
Regards
----- Original Message -----
Sent: Thursday, August 12, 2004 8:21 PM
Subject: AW: question about certificate creation

Maybe you didn't specify a configuration file?

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 12. August 2004 10:48
An: [EMAIL PROTECTED]
Betreff: question about certificate creation

this is my first time to play with openssl(version:OpenSSL 0.9.7b 10 Apr 2003), below is the problem i met
 
when i execute the command:
perl CA.pl -newca
 
the following information is found, why? and how to fix it?

CA certificate filename (or enter to create)
 
Making CA certificate ...
Unable to load config info
unable to load 'random state'
This means that the random number generator has not been seeded
with much random data.
Generating a 512 bit RSA private key
342:error:0E06D06A:configuration file routines:NCONF_get_string:no conf or environment variable:conf_lib.c:325:
342:error:24064064:random number generator:SSLEAY_RAND_BYTES:PRNG not seeded:md_rand.c:503:You need to read the OpenSSL FAQ,
 http://www.openssl.org/support/faq.html
342:error:04069003:rsa routines:RSA_generate_key:BN lib:rsa_gen.c:182:
 
Anyone can help me? Thanks
 
Regards
jun

Reply via email to