BigInteger.probablePrime()和其他素数算法之间的差异 [英] Difference between BigInteger.probablePrime() and other primality algorithms

查看:2549
本文介绍了BigInteger.probablePrime()和其他素数算法之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实施RSA加密程序。现在我使用 BigInteger.probablePrime(1024,rnd)其中 rnd 是由<$ cc $ c> Random rnd = new Random()获取素数。我需要测试各种加速速度。我的问题是 BigInteger.probablePrime(1024,rnd)使用什么算法?和使用一些其他算法,如Rabin-Miller,Fermats,Lucas-Lehmer有什么区别?谢谢。

I am implementing an RSA encryption program. Right now I am using BigInteger.probablePrime(1024, rnd) where rnd is a random number generated by Random rnd = new Random() to get prime numbers. I need to test various speeds of encryption. My question is what algorithm does the BigInteger.probablePrime(1024, rnd) use? and what is the difference between that and using some other algorithm like Rabin-Miller, Fermats, Lucas-Lehmer? Thank you.

推荐答案

BigInteger Miller-Rabin和Lucas-Lehmer算法测试原始性。

BigInteger's probable prime methods use both the Miller-Rabin and Lucas-Lehmer algorithms to test primality.

查看内部方法 BigInteger.primeToCertainty

See the internal method BigInteger.primeToCertainty.

这篇关于BigInteger.probablePrime()和其他素数算法之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆