Skip to content

Implement ECPP #13

@danaj

Description

@danaj

I just released a version of Math::Prime::Util::GMP with ECPP (Elliptic Curve Primality Proving). With a small set of fixed determinants, it's good for proving 700-bit (216 digit) primes in ~1 second, including a certificate. Adding this to Math::Primality would be nice.

There are a number of improvements that could be made to my implementation to support larger sizes -- at 400 digits or so it occasionally gets bogged down in factoring due to a FPS strategy (basically go depth first and don't backtrack even if we get stuck trying to crack factors off huge numbers that won't cooperate). Adding simple backtracking would help, but once we get much over 500 digits that starts breaking down also (if we get stuck at the top level there's nowhere to backtrack to). I can add more fixed discriminants which delays the issue at the expense of memory.

The algorithm itself is relatively straightforward, but it needs a lot of support polynomial functions as well as some basic factoring (a good Pollard n-1 works wonders, and a good ECM is recommended also). Some of these have CPAN modules that may or may not work (e.g. polynomial root finding), and a lot of the rest should be in Math::Polynomial (i.e. it's already there or should be added if not).

In the long run, making your own Hilbert and Weber polynomials using Math::MPFR would be a big win, especially if you have fast root finding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions