Crate ecm

Source
Expand description

§ecm-rs

CI Crate.io Codecov

Lenstra’s Elliptic Curve Factorization Implementation with Big Integers.

The code is based on the sympy implementation and translated to Rust.

§Performance

Using a Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz CPU, the following results were obtained:

Numbersympyecm-rssympy / ecm-rs
3988834343372870.074s0.057s1.23x faster
461670451314151130.148s0.039s3.8x faster
642118166005151930.552s0.017s32.47x faster
1685415121310946513230.071s0.038s1.87x faster
6312110323156707768410.081s0.128s0.63x faster
41328465138186541364510.266s0.038s7.0x faster
45165113264513412816845130.495s0.038s13.03x faster
31465312465312412451324513211.22s0.22s5.55x faster
42690211800541894161981697868942271.916s0.018s106.44x faster
706000565581575429997696139445280913.555s3.467s3.91x faster

§License

Licensed under either of

at your option.

§Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Enums§

Error
Error occured during ecm factorization.

Functions§

ecm
Performs factorization using Lenstra’s Elliptic curve method.
ecm_one_factor
Returns one factor of n using Lenstra’s 2 Stage Elliptic curve Factorization with Suyama’s Parameterization. Here Montgomery arithmetic is used for fast computation of addition and doubling of points in elliptic curve.
ecm_with_params
Performs factorization using Lenstra’s Elliptic curve method.