Same RSA pair is being generated
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Dan_Kozin
Posted On:   Thursday, August 22, 2002 01:46 AM

Hello,



When I run this code, the same pair of Public/Private keys is generated always. If I put it in a loop, the same pair is generated every time the loop executes. Its probably something simple that I am missing (never had to use the JCE/JCA before), can anyone help with this one.




KeyPairGenerator gen = KeyPairGenerator.getInstance("RSA");


KeyPair pair = gen.generateKeyPair();



Thank you,

Dan

Re: Same RSA pair is being generated

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, August 22, 2002 09:46 AM

Don't you have to "seed" or otherwise initialize the generator somehow? otherwise presumably you are starting with the same position in the same pseudo-random number sequence, each time.

About | Sitemap | Contact