Title: RSA Key Generation and Entropy

This email is to be read subject to the disclaimer below.


Hi,

I'm having trouble generating unique pairs of RSA keys. It seems that no matter how many times and with what kind of data I add using RAND_add, the same keys get generated over and over again. If I generate a particular key set, then 2 or 3 key sets later a memcmp confirms it and the original match.

I currently generate a large number of GUIDs and add them with RAND_add.

Every call to RAND_status returns 1 (indicating enough entropy) then I call RSA_generate_key and compare the private key to previous only to find they match.

What order of function calls should be made to generate unique keys? Also, what is the best way to ensure enough entropy on a win32 machine without the /dev/random?

Any help or sample key generation code would be extremely helpful.

David



The contents of this message are the views of the Author and do not
necessarily reflect the views of PARKERS' EDGE PTY LIMITED.

__________________________________________________________________________

Unencrypted electronic mail is not secure and may not be authentic.

If you have any doubts as to the contents please telephone to confirm.
This electronic transmission is intended only for those to whom it is
addressed.  It may contain information that is confidential, privileged or
exempt from disclosure by law.  Any claim to privilege is not waived or lost
by reason of mistaken transmission of this information.

If you are not the intended recipient you must not distribute or copy this
transmission and should please notify the sender.  Your costs for doing this
will be reimbursed by the sender.

Parkers' Edge +61 2 9249 8900
__________________________________________________________________________


Reply via email to