Hello,

is there a way to ask the random engine about how much randomness
it contains ?
RAND_status() returns 1 if the random pool contains at least
20 bytes (ENTROPY_NEEDED in rand_lcl.h).

That is OK for SSL handshake, but for asymetric key generation
we need a lot of more entropy.

Something like RAND_status1(size_t needed) would be better...

eg:
  ...
  if (RAND_status1(key_length) <= 0)
  { /* this part never reached if we have a crypto device... */
    RAND_load_file(...); /* load some additional ramdom data */
  }
  ...

Bye

Goetz

-- 
Goetz Babin-Ebell, TC TrustCenter AG, http://www.trustcenter.de
Sonninstr. 24-28, 20097 Hamburg, Germany
Tel.: +49-(0)40 80 80 26 -0,  Fax: +49-(0)40 80 80 26 -126

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to