我们正在检查RSA算法,并想知道将intel i-7内核(@ 2.50 gHz)分解RSA公钥需要多长时间.
我们为此写了一段java,我不知道它有多有效
public static String factorise(long l)
{
double a = Math.floor(Math.sqrt(l));
while(l/a != Math.round(l/a))
{
a--;
}
return (long)a + ", " + (long)(l/a);
}
Run Code Online (Sandbox Code Playgroud)
使用大约2 ^ 45的数字,它花了大约33毫秒.从理论上讲,需要多长时间才能将数字分解为2 ^ 1024左右?
提前致谢 :)