Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

isProbablePrime performance with certainty parameter

843811Jul 19 2010 — edited Jul 26 2010
According to the documentation for isProbablePrime
"The execution time of this method is proportional to the value of this parameter. "

In testing a 2048 bit RSA key probable prime P of 309 digits, I noticed that isProbablePrime returns fairly quickly (within 1 second PIII 850 MHz) and that this doesn't seem to depend significantly on what value of certainty I use (even very high values > 200). If the routine used is Miller-Rabin, I thought the execution time would be quite long for very high certaintiy values . What is the explanation? Does isProbablePrime use more than one algorithm for its test?

The prime P I'm testing is posted about 1/2 way down on this page:
[.NET 4 BigInteger and RSA Signature and Encryption|http://www.jensign.com/JavaScience/dotnet/RSAdotnet4/]
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 23 2010
Added on Jul 19 2010
6 comments
1,044 views