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
Latest Commit:
Add package metadata to Cargo.toml
Tags:
#RustLang #NumberTheory #OpenSource #BigInteger #Cryptography #Fermat #AbhrankanChakrabarti #Malachite
Build Instructions
Make sure you have Rust installed. Then clone the repo and build the project:
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. |