On 2014-04-05 9:26 GMT+02:00 Jan Mercl <
0xj...@gmail.com>:
The problem with AKS is there is no known implementation or variation
which is useful in practice. I tried running this program with a
21-digit number (first prime after 1e20) and it didn't finish after 20
minutes of CPU, which makes it about a billion times slower than
Miller-Rabin which can be deterministic for numbers of that size using
appropriate bases. It is also slower than the naive algorithm of
dividing by all numbers up to the square root (which would need a few
billion divisions and run in several seconds).
I also tried a 100-digit number and it couldn't even get past the
first iteration and started eating more than 1GB of memory, which
indicates that the algorithm would not even be able to run with a
1000-bit number (due to RAM constraint, and the CPU time would be a
polynomial amount of years).
Using a FFT-based multiplication algorithm for the involved
polynomials may help a bit but not solve the memory requirement which
grows very rapidly.
The API would thus have very few practical purposes. An elliptic curve
test which produces a proof of primality would be more useful.
Rémy.