lif factorizes large integers fast by implementing multiple algorithms using C++, lif also provides convenient python interface.
Usage:
import lif
lif.trial_division(12)
>>> [2, 2, 3]
Or using the command line interface (CLI):
lif 12 --algo=trial_division
> 2, 2, 3
This library will try to implement the following algorithms
- Trial division
- Wheel factorization
- Pollard's rho algorithm - WIP
- Algebraic-group factorisation algorithms
- Fermat's factorization method
- Euler's factorization method
- Special number field sieve
- Download from github
- Build using
python setup.py build_ext --inplace
- Submit a PR
- Upload your changes to github
- Create a new release
- Rewrite
setup.py
(specifically thedownload_url
) - Than run on your computer:
python setup.py sdist
twine upload dist/*
- Upgrade using
pip install --upgrade lif