我正在使用 Java 实现一个 RSA 加密程序.现在我正在使用 BigInteger.probablePrime(1024, rnd) 来获取素数.这里 rnd 是由 Random rnd = new Random() 生成的随机数.我需要测试各种加密速度.
I am implementing an RSA encryption program using Java. Right now I am using BigInteger.probablePrime(1024, rnd) to get prime numbers. Here rnd is a random number generated by Random rnd = new Random() .
I need to test various speeds of encryption.
我的问题是:
BigInteger.probablePrime(1024, rnd) 使用什么算法?
上面的算法和其他算法有什么区别:比如 Rabin-Miller、Fermats、Lucas-Lehmer?
what is the difference between the algorithm above and other algorithms: like Rabin-Miller, Fermats, Lucas-Lehmer?
谢谢.
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.
这篇关于Java 中 BigInteger.probablePrime() 与其他素数算法的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
Java从数组中删除重复项?Java Remove Duplicates from an Array?(Java从数组中删除重复项?)
如何修复调用失败来自服务器的意外响应:在 AnHow to fix Invocation failed Unexpected Response from Server: Unauthorized in Android studio(如何修复调用失败来自服务器的意外响应:在
AES 加密,解密文件中有多余的垃圾字符AES encryption, got extra trash characters in decrypted file(AES 加密,解密文件中有多余的垃圾字符)
AES 错误:给定的最终块未正确填充AES Error: Given final block not properly padded(AES 错误:给定的最终块未正确填充)
在 JAVA 中使用 AES/GCM 检测不正确的密钥Detecting incorrect key using AES/GCM in JAVA(在 JAVA 中使用 AES/GCM 检测不正确的密钥)
Java 中的 AES-256-CBCAES-256-CBC in Java(Java 中的 AES-256-CBC)