diffsquare
From the Author
This project is authored by Abhrankan Chakrabarti and demonstrates an efficient implementation of Fermat’s Difference of Squares method for factoring large integers. The implementation is written in Rust and utilizes the malachite crate for arbitrary-precision arithmetic.
Key features include:
- Support for both decimal and hexadecimal inputs.
- Command-line interface with support for optional precision and iteration control.
- Verbose scientific notation output for better readability of large numbers.
GitHub Repository: Abhrankan-Chakrabarti/diffsquare
Installation
To install diffsquare directly using Cargo:
Make sure $HOME/.cargo/bin is in your system's PATH to run diffsquare from anywhere:
Build Instructions
If you'd rather clone and build manually:
Usage Examples
Run the binary using default values or provide custom arguments:
# Using the default modulus
# Using a specific modulus (in decimal)
# Using a specific modulus (in hexadecimal)
# Starting from a specific iteration
# With custom precision for verbose scientific notation output
# Combine all options
You can mix and match the flags:
| Short Flag | Long Flag | Description |
|---|---|---|
-n |
--mod |
The modulus n to factor. |
-i |
--iter |
Starting iteration point for the factorization. |
-p |
--prec |
Precision for verbose scientific notation output. |
-h |
--help |
Show the help message and exit. |
-v |
--version |
Show the version number and exit. |
Latest Commit:
Add Legendre tests, update README with badges and install info, bump to v0.1.4
Tags:
#RustLang #NumberTheory #OpenSource #BigInteger #Cryptography #Fermat #AbhrankanChakrabarti #Malachite